summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in14
-rw-r--r--source3/client/mount.cifs.c14
-rw-r--r--source3/client/umount.cifs.c34
-rw-r--r--source3/configure.in7
-rw-r--r--source3/groupdb/mapping_ldb.c87
-rw-r--r--source3/include/ads.h6
-rw-r--r--source3/include/ntdomain.h9
-rw-r--r--source3/include/proto.h144
-rw-r--r--source3/include/rpc_client.h1
-rw-r--r--source3/include/rpc_spoolss.h297
-rw-r--r--source3/include/smb.h1
-rw-r--r--source3/include/wbc_async.h68
-rw-r--r--source3/lib/netapi/examples/server/server_getinfo.c16
-rw-r--r--source3/lib/netapi/netapi.h612
-rw-r--r--source3/lib/netapi/serverinfo.c272
-rw-r--r--source3/lib/netapi/tests/Makefile.in2
-rw-r--r--source3/lib/netapi/tests/common.h2
-rw-r--r--source3/lib/netapi/tests/netapitest.c5
-rw-r--r--source3/lib/netapi/tests/netserver.c61
-rw-r--r--source3/lib/util_sock.c18
-rw-r--r--source3/lib/wb_reqtrans.c181
-rw-r--r--source3/lib/wbclient.c138
-rw-r--r--source3/libads/kerberos.c42
-rw-r--r--source3/libads/ldap_printer.c2
-rw-r--r--source3/librpc/gen_ndr/libnetapi.h613
-rw-r--r--source3/librpc/gen_ndr/ndr_libnetapi.c3621
-rw-r--r--source3/librpc/gen_ndr/ndr_libnetapi.h297
-rw-r--r--source3/librpc/idl/libnetapi.idl613
-rw-r--r--source3/libsmb/libsmb_xattr.c11
-rw-r--r--source3/modules/onefs.h58
-rw-r--r--source3/modules/onefs_streams.c84
-rw-r--r--source3/modules/vfs_onefs.c114
-rw-r--r--source3/passdb/pdb_get_set.c82
-rw-r--r--source3/printing/nt_printing.c716
-rw-r--r--source3/rpc_client/cli_spoolss.c397
-rw-r--r--source3/rpc_parse/parse_prs.c17
-rw-r--r--source3/rpc_parse/parse_spoolss.c1001
-rw-r--r--source3/rpc_server/srv_eventlog_lib.c6
-rw-r--r--source3/rpc_server/srv_pipe.c211
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c54
-rw-r--r--source3/rpc_server/srv_samr_nt.c2
-rw-r--r--source3/rpc_server/srv_spoolss.c423
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c1264
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c2
-rw-r--r--source3/rpcclient/cmd_spoolss.c580
-rw-r--r--source3/smbd/lanman.c112
-rw-r--r--source3/smbd/posix_acls.c12
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/torture/torture.c7
-rw-r--r--source3/utils/net_conf.c6
-rw-r--r--source3/utils/net_rpc_printer.c78
-rw-r--r--source3/winbindd/idmap_tdb.c91
-rw-r--r--source3/winbindd/idmap_tdb2.c90
-rw-r--r--source3/winbindd/winbindd_proto.h21
-rw-r--r--source3/winbindd/winbindd_user.c7
55 files changed, 9007 insertions, 3618 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 8e8932bc5f..ee75eb30e6 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -308,7 +308,8 @@ LIBNDR_GEN_OBJ = ../librpc/gen_ndr/ndr_wkssvc.o \
../librpc/gen_ndr/ndr_xattr.o \
../librpc/gen_ndr/ndr_epmapper.o \
../librpc/gen_ndr/ndr_named_pipe_auth.o \
- ../librpc/gen_ndr/ndr_ntsvcs.o
+ ../librpc/gen_ndr/ndr_ntsvcs.o \
+ $(LIBNDR_GEN_OBJ2)
RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o
@@ -481,6 +482,7 @@ LIBMSRPC_GEN_OBJ = ../librpc/gen_ndr/cli_lsa.o \
../librpc/gen_ndr/cli_ntsvcs.o \
../librpc/gen_ndr/cli_epmapper.o \
../librpc/gen_ndr/cli_drsuapi.o \
+ ../librpc/gen_ndr/cli_spoolss.o \
$(LIBNDR_GEN_OBJ) \
$(RPCCLIENT_NDR_OBJ)
@@ -567,7 +569,8 @@ RPC_NTSVCS_OBJ = rpc_server/srv_ntsvcs_nt.o \
RPC_DFS_OBJ = ../librpc/gen_ndr/srv_dfs.o rpc_server/srv_dfs_nt.o
-RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o
+RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o \
+ ../librpc/gen_ndr/srv_spoolss.o
RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog_nt.o \
$(LIB_EVENTLOG_OBJ) ../librpc/gen_ndr/srv_eventlog.o
@@ -941,6 +944,7 @@ SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/uta
SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) \
$(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
lib/wb_reqtrans.o lib/wbclient.o \
+ @LIBWBCLIENT_STATIC@ \
$(LIBNDR_GEN_OBJ0)
MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
@@ -1464,11 +1468,11 @@ bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ @LIBTALLO
@$(CC) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
$(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
-bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
+bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@$(CC) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \
- $(LIBTDB_LIBS) $(ZLIB_LIBS)
+ $(LIBTDB_LIBS) $(ZLIB_LIBS) $(WINBIND_LIBS)
bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@@ -2253,7 +2257,7 @@ bin/librpc_dssetup.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DSSETUP_OBJ)
@echo "Linking $@"
@$(SHLD_MODULE) $(RPC_DSSETUP_OBJ)
-bin/librpc_spoolss.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
+bin/librpc_spoolss2.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
@echo "Linking $@"
@$(SHLD_MODULE) $(RPC_SPOOLSS_OBJ)
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 9f4d1d3fd0..a736609580 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -85,6 +85,7 @@
const char *thisprogram;
int verboseflag = 0;
+int fakemnt = 0;
static int got_password = 0;
static int got_user = 0;
static int got_domain = 0;
@@ -1030,7 +1031,7 @@ int main(int argc, char ** argv)
char * resolved_path = NULL;
char * temp;
char * dev_name;
- int rc;
+ int rc = 0;
int rsize = 0;
int wsize = 0;
int nomtab = 0;
@@ -1103,8 +1104,8 @@ int main(int argc, char ** argv)
mount_cifs_usage ();
exit(EX_USAGE);
case 'n':
- ++nomtab;
- break;
+ ++nomtab;
+ break;
case 'b':
#ifdef MS_BIND
flags |= MS_BIND;
@@ -1209,6 +1210,9 @@ int main(int argc, char ** argv)
break;
case 't':
break;
+ case 'f':
+ ++fakemnt;
+ break;
default:
printf("unknown mount option %c\n",c);
mount_cifs_usage();
@@ -1410,7 +1414,7 @@ mount_retry:
}
}
- if (mount(dev_name, mountpoint, "cifs", flags, options)) {
+ if (!fakemnt && mount(dev_name, mountpoint, "cifs", flags, options)) {
switch (errno) {
case ECONNREFUSED:
case EHOSTUNREACH:
@@ -1440,6 +1444,8 @@ mount_retry:
goto mount_exit;
}
+ if (nomtab)
+ goto mount_exit;
atexit(unlock_mtab);
rc = lock_mtab();
if (rc) {
diff --git a/source3/client/umount.cifs.c b/source3/client/umount.cifs.c
index aff7cea397..81925eda27 100644
--- a/source3/client/umount.cifs.c
+++ b/source3/client/umount.cifs.c
@@ -33,6 +33,7 @@
#include <errno.h>
#include <string.h>
#include <mntent.h>
+#include <limits.h>
#include "mount.h"
#define UNMOUNT_CIFS_VERSION_MAJOR "0"
@@ -231,6 +232,37 @@ static int remove_from_mtab(char * mountpoint)
return rc;
}
+/* Make a canonical pathname from PATH. Returns a freshly malloced string.
+ It is up the *caller* to ensure that the PATH is sensible. i.e.
+ canonicalize ("/dev/fd0/.") returns "/dev/fd0" even though ``/dev/fd0/.''
+ is not a legal pathname for ``/dev/fd0'' Anything we cannot parse
+ we return unmodified. */
+static char *
+canonicalize(char *path)
+{
+ char *canonical = malloc (PATH_MAX + 1);
+
+ if (!canonical) {
+ fprintf(stderr, "Error! Not enough memory!\n");
+ return NULL;
+ }
+
+ if (strlen(path) > PATH_MAX) {
+ fprintf(stderr, "Mount point string too long\n");
+ return NULL;
+ }
+
+ if (path == NULL)
+ return NULL;
+
+ if (realpath (path, canonical))
+ return canonical;
+
+ strncpy (canonical, path, PATH_MAX);
+ canonical[PATH_MAX] = '\0';
+ return canonical;
+}
+
int main(int argc, char ** argv)
{
int c;
@@ -304,7 +336,7 @@ int main(int argc, char ** argv)
argv += optind;
argc -= optind;
- mountpoint = argv[0];
+ mountpoint = canonicalize(argv[0]);
if((argc < 1) || (argv[0] == NULL)) {
printf("\nMissing name of unmount directory\n");
diff --git a/source3/configure.in b/source3/configure.in
index 306566f26e..37ee9a131f 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -414,7 +414,7 @@ AC_SUBST(DYNEXP)
dnl Add modules that have to be built by default here
dnl These have to be built static:
-default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
+default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss2 rpc_eventlog auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
dnl These are preferably build shared, and static if dlopen() is not available
default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer"
@@ -1042,6 +1042,7 @@ AC_CHECK_FUNCS(setenv strcasecmp fcvt fcvtl)
AC_CHECK_FUNCS(syslog vsyslog timegm)
AC_CHECK_FUNCS(setlocale nl_langinfo)
AC_CHECK_FUNCS(nanosleep)
+AC_CHECK_LIB_EXT(rt, LIBS, nanosleep)
AC_CHECK_FUNCS(mlock munlock mlockall munlockall)
AC_CHECK_FUNCS(memalign posix_memalign hstrerror)
AC_CHECK_HEADERS(sys/mman.h)
@@ -6296,7 +6297,7 @@ do
done
dnl Always build these modules static
-MODULE_rpc_spoolss=STATIC
+MODULE_rpc_spoolss2=STATIC
MODULE_rpc_srvsvc=STATIC
MODULE_idmap_tdb=STATIC
MODULE_idmap_passdb=STATIC
@@ -6339,7 +6340,7 @@ SMB_MODULE(rpc_ntsvcs, \$(RPC_NTSVCS_OBJ), "bin/librpc_ntsvcs.$SHLIBEXT", RPC)
SMB_MODULE(rpc_netlogon, \$(RPC_NETLOG_OBJ), "bin/librpc_NETLOGON.$SHLIBEXT", RPC)
SMB_MODULE(rpc_netdfs, \$(RPC_DFS_OBJ), "bin/librpc_netdfs.$SHLIBEXT", RPC)
SMB_MODULE(rpc_srvsvc, \$(RPC_SVC_OBJ), "bin/librpc_svcsvc.$SHLIBEXT", RPC)
-SMB_MODULE(rpc_spoolss, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss.$SHLIBEXT", RPC)
+SMB_MODULE(rpc_spoolss2, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss2.$SHLIBEXT", RPC)
SMB_MODULE(rpc_eventlog, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog.$SHLIBEXT", RPC)
SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC)
SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_rpcecho.$SHLIBEXT", RPC)
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c
index af99b86c45..a162c194d6 100644
--- a/source3/groupdb/mapping_ldb.c
+++ b/source3/groupdb/mapping_ldb.c
@@ -217,24 +217,26 @@ static bool get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map)
int ret;
struct ldb_dn *dn;
struct ldb_result *res=NULL;
-
- dn = mapping_dn(ldb, &sid);
- if (dn == NULL) goto failed;
+ bool result = false;
- ret = ldb_search(ldb, ldb, &res, dn, LDB_SCOPE_BASE, NULL, NULL);
- talloc_steal(dn, res);
- if (ret != LDB_SUCCESS || res->count != 1) {
+ dn = mapping_dn(talloc_tos(), &sid);
+ if (dn == NULL) {
goto failed;
}
- if (!msg_to_group_map(res->msgs[0], map)) goto failed;
+ ret = ldb_search(ldb, dn, &res, dn, LDB_SCOPE_BASE, NULL, NULL);
+ if (ret != LDB_SUCCESS || res->count != 1) {
+ goto failed;
+ }
- talloc_free(dn);
- return True;
+ if (!msg_to_group_map(res->msgs[0], map)) {
+ goto failed;
+ }
-failed:
+ result = true;
+ failed:
talloc_free(dn);
- return False;
+ return result;
}
/*
@@ -244,16 +246,23 @@ static bool get_group_map_from_gid(gid_t gid, GROUP_MAP *map)
{
int ret;
struct ldb_result *res=NULL;
+ bool result = false;
- ret = ldb_search(ldb, ldb, &res, NULL, LDB_SCOPE_SUBTREE, NULL, "(&(gidNumber=%u)(objectClass=groupMap))", (unsigned)gid);
- if (ret != LDB_SUCCESS || res->count != 1) goto failed;
-
- if (!msg_to_group_map(res->msgs[0], map)) goto failed;
+ ret = ldb_search(ldb, talloc_tos(), &res, NULL, LDB_SCOPE_SUBTREE,
+ NULL, "(&(gidNumber=%u)(objectClass=groupMap))",
+ (unsigned)gid);
+ if (ret != LDB_SUCCESS || res->count != 1) {
+ goto failed;
+ }
- return True;
+ if (!msg_to_group_map(res->msgs[0], map)) {
+ goto failed;
+ }
+ result = true;
failed:
- return False;
+ TALLOC_FREE(res);
+ return result;
}
/*
@@ -263,16 +272,22 @@ static bool get_group_map_from_ntname(const char *name, GROUP_MAP *map)
{
int ret;
struct ldb_result *res=NULL;
+ bool result = false;
- ret = ldb_search(ldb, ldb, &res, NULL, LDB_SCOPE_SUBTREE, NULL, "(&(ntName=%s)(objectClass=groupMap))", name);
- if (ret != LDB_SUCCESS || res->count != 1) goto failed;
-
- if (!msg_to_group_map(res->msgs[0], map)) goto failed;
+ ret = ldb_search(ldb, talloc_tos(), &res, NULL, LDB_SCOPE_SUBTREE,
+ NULL, "(&(ntName=%s)(objectClass=groupMap))", name);
+ if (ret != LDB_SUCCESS || res->count != 1) {
+ goto failed;
+ }
- return True;
+ if (!msg_to_group_map(res->msgs[0], map)) {
+ goto failed;
+ }
-failed:
- return False;
+ result = true;
+ failed:
+ TALLOC_FREE(res);
+ return result;
}
/*
@@ -318,15 +333,14 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_
}
if (sid_name_use == SID_NAME_UNKNOWN) {
- ret = ldb_search(ldb, ldb, &res, basedn, LDB_SCOPE_SUBTREE, NULL,
- "(&(objectClass=groupMap))");
+ ret = ldb_search(ldb, tmp_ctx, &res, basedn, LDB_SCOPE_SUBTREE,
+ NULL, "(&(objectClass=groupMap))");
} else {
- ret = ldb_search(ldb, ldb, &res, basedn, LDB_SCOPE_SUBTREE, NULL,
- "(&(sidNameUse=%u)(objectClass=groupMap))",
- sid_name_use);
+ ret = ldb_search(ldb, tmp_ctx, &res, basedn, LDB_SCOPE_SUBTREE,
+ NULL, "(&(sidNameUse=%u)(objectClass=groupMap))",
+ sid_name_use);
}
- talloc_steal(tmp_ctx, res);
if (ret != LDB_SUCCESS) goto failed;
(*pp_rmap) = NULL;
@@ -367,14 +381,17 @@ static NTSTATUS one_alias_membership(const DOM_SID *member,
int ret, i;
struct ldb_result *res=NULL;
fstring string_sid;
- NTSTATUS status = NT_STATUS_INTERNAL_DB_CORRUPTION;
+ NTSTATUS status;
if (!sid_to_fstring(string_sid, member)) {
return NT_STATUS_INVALID_PARAMETER;
}
- ret = ldb_search(ldb, ldb, &res, NULL, LDB_SCOPE_SUBTREE, attrs, "(&(member=%s)(objectClass=groupMap))", string_sid);
+ ret = ldb_search(ldb, talloc_tos(), &res, NULL, LDB_SCOPE_SUBTREE,
+ attrs, "(&(member=%s)(objectClass=groupMap))",
+ string_sid);
if (ret != LDB_SUCCESS) {
+ status = NT_STATUS_INTERNAL_DB_CORRUPTION;
goto failed;
}
@@ -392,9 +409,9 @@ static NTSTATUS one_alias_membership(const DOM_SID *member,
}
}
- return NT_STATUS_OK;
-
-failed:
+ status = NT_STATUS_OK;
+ failed:
+ TALLOC_FREE(res);
return status;
}
diff --git a/source3/include/ads.h b/source3/include/ads.h
index abff9eaa8c..0fa19b55a6 100644
--- a/source3/include/ads.h
+++ b/source3/include/ads.h
@@ -364,12 +364,6 @@ typedef void **ADS_MODLIST;
#ifdef HAVE_KRB5
typedef struct {
- NTSTATUS ntstatus;
- uint32 unknown1;
- uint32 unknown2; /* 0x00000001 */
-} KRB5_EDATA_NTSTATUS;
-
-typedef struct {
#if defined(HAVE_MAGIC_IN_KRB5_ADDRESS) && defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) /* MIT */
krb5_address **addrs;
#elif defined(HAVE_KRB5_ADDRESSES) /* Heimdal */
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 2d6a358391..0eff9bdbac 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -70,13 +70,10 @@ typedef struct _output_data {
uint32 data_sent_length;
/*
- * The current PDU being returned. This inclues
+ * The current fragment being returned. This inclues
* headers, data and authentication footer.
*/
- unsigned char current_pdu[RPC_MAX_PDU_FRAG_LEN];
-
- /* The amount of data in the current_pdu buffer. */
- uint32 current_pdu_len;
+ prs_struct frag;
/* The amount of data sent from the current PDU. */
uint32 current_pdu_sent;
@@ -89,7 +86,7 @@ typedef struct _input_data {
* pdu is seen, then the data is copied into the in_data
* structure. The maximum size of this is 0x1630 (RPC_MAX_PDU_FRAG_LEN).
*/
- unsigned char current_in_pdu[RPC_MAX_PDU_FRAG_LEN];
+ uint8_t *current_in_pdu;
/*
* The amount of data needed to complete the in_pdu.
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 267ee74482..5009e6dcdb 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2267,6 +2267,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
#include "librpc/gen_ndr/srv_svcctl.h"
#include "librpc/gen_ndr/srv_winreg.h"
#include "librpc/gen_ndr/srv_wkssvc.h"
+#include "librpc/gen_ndr/srv_spoolss.h"
#include "librpc/ndr/libndr.h"
@@ -4787,11 +4788,12 @@ uint32 update_c_setprinter(bool initialize);
uint32 get_c_setprinter(void);
int get_builtin_ntforms(nt_forms_struct **list);
bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form);
+bool get_a_builtin_ntform_by_string(const char *form_name, nt_forms_struct *form);
int get_ntforms(nt_forms_struct **list);
int write_ntforms(nt_forms_struct **list, int number);
-bool add_a_form(nt_forms_struct **list, const FORM *form, int *count);
-bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret);
-void update_a_form(nt_forms_struct **list, const FORM *form, int count);
+bool add_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int *count);
+bool delete_a_form(nt_forms_struct **list, const char *del_name, int *count, WERROR *ret);
+void update_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int count);
int get_ntdrivers(fstring **list, const char *architecture, uint32 version);
const char *get_short_archi(const char *long_archi);
WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe,
@@ -5427,8 +5429,6 @@ NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli,
WERROR rpccli_spoolss_open_printer_ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
const char *printername, const char *datatype, uint32 access_required,
const char *station, const char *username, POLICY_HND *pol);
-WERROR rpccli_spoolss_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol);
WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
char *name, uint32 flags, uint32 level,
uint32 *num_printers, PRINTER_INFO_CTR *ctr);
@@ -5458,26 +5458,10 @@ WERROR rpccli_spoolss_addprinterdriver (struct rpc_pipe_client *cli,
PRINTER_DRIVER_CTR *ctr);
WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
uint32 level, PRINTER_INFO_CTR*ctr);
-WERROR rpccli_spoolss_deleteprinterdriverex(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, const char *arch,
- const char *driver, int version);
-WERROR rpccli_spoolss_deleteprinterdriver (struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, const char *arch,
- const char *driver);
WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
char *name, char *environment,
fstring procdir);
-WERROR rpccli_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, uint32 level, FORM *form);
-WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, uint32 level,
- const char *form_name, FORM *form);
-WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, const char *formname,
- uint32 level, FORM_1 *form);
-WERROR rpccli_spoolss_deleteform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, const char *form_name);
WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *handle, int level, uint32 *num_forms,
FORM_1 **forms);
@@ -5490,16 +5474,10 @@ WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, uint32 jobid, uint32 level,
JOB_INFO_CTR *ctr);
-WERROR rpccli_spoolss_startpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd);
-WERROR rpccli_spoolss_endpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd);
WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, char *docname,
char *outputfile, char *datatype,
uint32 *jobid);
-WERROR rpccli_spoolss_enddocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd);
WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *valuename,
REGISTRY_VALUE *value);
@@ -5520,19 +5498,9 @@ WERROR rpccli_spoolss_enumprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *m
WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *keyname,
REGVAL_CTR *ctr);
-WERROR rpccli_spoolss_writeprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, uint32 data_size, char *data,
- uint32 *num_written);
-WERROR rpccli_spoolss_deleteprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, char *valuename);
-WERROR rpccli_spoolss_deleteprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, char *keyname,
- char *valuename);
WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *keyname,
uint16 **keylist, uint32 *len);
-WERROR rpccli_spoolss_deleteprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, char *keyname);
/* The following definitions come from rpc_client/cli_spoolss_notify.c */
@@ -5854,19 +5822,6 @@ bool spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_
bool spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth);
-bool make_spoolss_q_deleteprinterdriverex( TALLOC_CTX *mem_ctx,
- SPOOL_Q_DELETEPRINTERDRIVEREX *q_u,
- const char *server,
- const char* arch,
- const char* driver,
- int version);
-bool make_spoolss_q_deleteprinterdriver(
- TALLOC_CTX *mem_ctx,
- SPOOL_Q_DELETEPRINTERDRIVER *q_u,
- const char *server,
- const char* arch,
- const char* driver
-);
bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
const POLICY_HND *handle,
const char *valuename, uint32 size);
@@ -5875,32 +5830,9 @@ bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
const char *keyname,
const char *valuename, uint32 size);
bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth);
-bool spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth);
bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth);
-bool make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd);
-bool spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth);
@@ -5990,8 +5922,6 @@ bool make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u,
uint32 command);
bool spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth);
@@ -6015,8 +5945,6 @@ bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
bool spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth);
bool spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth);
bool spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth);
bool spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth);
@@ -6080,12 +6008,6 @@ bool spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u,
bool spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth);
bool spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth);
void free_devmode(DEVICEMODE *devmode);
@@ -6122,25 +6044,12 @@ bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u,
uint32 size);
bool spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth);
-bool make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u,
- POLICY_HND *hnd, char *keyname);
-bool spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth);
bool make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, const char *name, char *environment, int level, RPC_BUFFER *buffer, uint32 offered);
bool spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth);
bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth);
-bool make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
- int level, FORM *form);
-bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
- int level, const char *form_name, FORM *form);
-bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle,
- const char *form);
-bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
- const char *formname, uint32 level,
- RPC_BUFFER *buffer, uint32 offered);
bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle,
uint32 level, RPC_BUFFER *buffer,
uint32 offered);
@@ -6149,24 +6058,10 @@ bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle,
bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle,
uint32 jobid, uint32 level, RPC_BUFFER *buffer,
uint32 offered);
-bool make_spoolss_q_startpageprinter(SPOOL_Q_STARTPAGEPRINTER *q_u,
- POLICY_HND *handle);
-bool make_spoolss_q_endpageprinter(SPOOL_Q_ENDPAGEPRINTER *q_u,
- POLICY_HND *handle);
bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u,
POLICY_HND *handle, uint32 level,
char *docname, char *outputfile,
char *datatype);
-bool make_spoolss_q_enddocprinter(SPOOL_Q_ENDDOCPRINTER *q_u,
- POLICY_HND *handle);
-bool make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u,
- POLICY_HND *handle, uint32 data_size,
- char *data);
-bool make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u,
- POLICY_HND *handle, char *valuename);
-bool make_spoolss_q_deleteprinterdataex(SPOOL_Q_DELETEPRINTERDATAEX *q_u,
- POLICY_HND *handle, char *key,
- char *value);
bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
uint32 flags, uint32 options, const char *localmachine,
uint32 printerlocal, SPOOL_NOTIFY_OPTION *option);
@@ -6277,8 +6172,8 @@ void copy_id25_to_sam_passwd(struct samu *to,
/* The following definitions come from rpc_server/srv_spoolss.c */
-void spoolss_get_pipe_fns( struct api_struct **fns, int *n_fns );
-NTSTATUS rpc_spoolss_init(void);
+void spoolss2_get_pipe_fns( struct api_struct **fns, int *n_fns );
+NTSTATUS rpc_spoolss2_init(void);
/* The following definitions come from rpc_server/srv_spoolss_nt.c */
@@ -6298,10 +6193,6 @@ WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R
WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u);
bool convert_devicemode(const char *printername, const DEVICEMODE *devmode,
NT_DEVICEMODE **pp_nt_devmode);
-WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R_CLOSEPRINTER *r_u);
-WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL_R_DELETEPRINTER *r_u);
-WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER *q_u, SPOOL_R_DELETEPRINTERDRIVER *r_u);
-WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, SPOOL_R_DELETEPRINTERDRIVEREX *r_u);
WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value,
uint32 type, uint8 *data, int real_len );
WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u);
@@ -6377,23 +6268,16 @@ DEVICEMODE *construct_dev_mode(const char *servicename);
WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u);
WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u);
WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_u, SPOOL_R_GETPRINTERDRIVER2 *r_u);
-WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, SPOOL_R_STARTPAGEPRINTER *r_u);
-WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u);
WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u);
-WERROR _spoolss_enddocprinter(pipes_struct *p, SPOOL_Q_ENDDOCPRINTER *q_u, SPOOL_R_ENDDOCPRINTER *r_u);
-WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R_WRITEPRINTER *r_u);
-WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R_ABORTPRINTER *r_u);
WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname, const char *uri );
bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer);
WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SETPRINTER *r_u);
-WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u);
WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u);
WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJOBS *r_u);
WERROR _spoolss_schedulejob( pipes_struct *p, SPOOL_Q_SCHEDULEJOB *q_u, SPOOL_R_SCHEDULEJOB *r_u);
WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u);
WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u);
WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u);
-WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *r_u);
WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines );
WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUMPORTS *r_u);
WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_R_ADDPRINTEREX *r_u);
@@ -6403,19 +6287,13 @@ WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRI
WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u);
WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u);
WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u);
-WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u);
-WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u);
-WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u);
-WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u);
WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, SPOOL_R_ENUMPRINTPROCESSORS *r_u);
WERROR _spoolss_enumprintprocdatatypes(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u);
WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_u, SPOOL_R_ENUMPRINTMONITORS *r_u);
WERROR _spoolss_getjob( pipes_struct *p, SPOOL_Q_GETJOB *q_u, SPOOL_R_GETJOB *r_u);
WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, SPOOL_R_GETPRINTERDATAEX *r_u);
WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, SPOOL_R_SETPRINTERDATAEX *r_u);
-WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX *q_u, SPOOL_R_DELETEPRINTERDATAEX *r_u);
WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u);
-WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u, SPOOL_R_DELETEPRINTERKEY *r_u);
WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u);
WERROR _spoolss_xcvdataport(pipes_struct *p, SPOOL_Q_XCVDATAPORT *q_u, SPOOL_R_XCVDATAPORT *r_u);
@@ -7609,12 +7487,4 @@ NTSTATUS nss_info_template_init( void );
/* Misc protos */
-struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct wb_context *wb_ctx, bool need_priv,
- const struct winbindd_request *wb_req);
-NTSTATUS wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
- struct winbindd_response **presponse);
-struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx);
-
-
#endif /* _PROTO_H_ */
diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
index 61b861c3b4..afa18899ca 100644
--- a/source3/include/rpc_client.h
+++ b/source3/include/rpc_client.h
@@ -37,6 +37,7 @@
#include "librpc/gen_ndr/cli_ntsvcs.h"
#include "librpc/gen_ndr/cli_epmapper.h"
#include "librpc/gen_ndr/cli_drsuapi.h"
+#include "librpc/gen_ndr/cli_spoolss.h"
#define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_))
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index 32909335d6..feabd3fff7 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -217,57 +217,6 @@
#define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01
-#define PRINTER_CHANGE_ADD_PRINTER 0x00000001
-#define PRINTER_CHANGE_SET_PRINTER 0x00000002
-#define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
-#define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
-#define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \
- PRINTER_CHANGE_SET_PRINTER | \
- PRINTER_CHANGE_DELETE_PRINTER | \
- PRINTER_CHANGE_FAILED_CONNECTION_PRINTER )
-
-#define PRINTER_CHANGE_ADD_JOB 0x00000100
-#define PRINTER_CHANGE_SET_JOB 0x00000200
-#define PRINTER_CHANGE_DELETE_JOB 0x00000400
-#define PRINTER_CHANGE_WRITE_JOB 0x00000800
-#define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \
- PRINTER_CHANGE_SET_JOB | \
- PRINTER_CHANGE_DELETE_JOB | \
- PRINTER_CHANGE_WRITE_JOB )
-
-#define PRINTER_CHANGE_ADD_FORM 0x00010000
-#define PRINTER_CHANGE_SET_FORM 0x00020000
-#define PRINTER_CHANGE_DELETE_FORM 0x00040000
-#define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \
- PRINTER_CHANGE_SET_FORM | \
- PRINTER_CHANGE_DELETE_FORM )
-
-#define PRINTER_CHANGE_ADD_PORT 0x00100000
-#define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
-#define PRINTER_CHANGE_DELETE_PORT 0x00400000
-#define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \
- PRINTER_CHANGE_CONFIGURE_PORT | \
- PRINTER_CHANGE_DELETE_PORT )
-
-#define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
-#define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
-#define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \
- PRINTER_CHANGE_DELETE_PRINT_PROCESSOR )
-
-#define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
-#define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
-#define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
-#define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \
- PRINTER_CHANGE_SET_PRINTER_DRIVER | \
- PRINTER_CHANGE_DELETE_PRINTER_DRIVER )
-
-#define PRINTER_CHANGE_TIMEOUT 0x80000000
-#define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \
- PRINTER_CHANGE_FORM | \
- PRINTER_CHANGE_PORT | \
- PRINTER_CHANGE_PRINT_PROCESSOR | \
- PRINTER_CHANGE_PRINTER_DRIVER )
-
#define PRINTER_NOTIFY_INFO_DISCARDED 0x1
/*
@@ -317,14 +266,6 @@ PRINTER_MESSAGE_INFO;
#define DEF_PRIORITY 1
/* the flags of each printers */
-#define PRINTER_ENUM_UNKNOWN_8 0x00000008
-#define PRINTER_ENUM_ICONMASK 0x00ff0000
-
-/* FLAGS for SPOOLSS_DELETEPRINTERDRIVEREX */
-
-#define DPD_DELETE_UNUSED_FILES 0x00000001
-#define DPD_DELETE_SPECIFIC_VERSION 0x00000002
-#define DPD_DELETE_ALL_FILES 0x00000004
#define DRIVER_ANY_VERSION 0xffffffff
#define DRIVER_MAX_VERSION 4
@@ -532,90 +473,6 @@ typedef struct spool_r_getprinterdata
}
SPOOL_R_GETPRINTERDATA;
-typedef struct spool_q_deleteprinterdata
-{
- POLICY_HND handle;
- UNISTR2 valuename;
-}
-SPOOL_Q_DELETEPRINTERDATA;
-
-typedef struct spool_r_deleteprinterdata
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERDATA;
-
-typedef struct spool_q_closeprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_CLOSEPRINTER;
-
-typedef struct spool_r_closeprinter
-{
- POLICY_HND handle;
- WERROR status;
-}
-SPOOL_R_CLOSEPRINTER;
-
-typedef struct spool_q_startpageprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_STARTPAGEPRINTER;
-
-typedef struct spool_r_startpageprinter
-{
- WERROR status;
-}
-SPOOL_R_STARTPAGEPRINTER;
-
-typedef struct spool_q_endpageprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_ENDPAGEPRINTER;
-
-typedef struct spool_r_endpageprinter
-{
- WERROR status;
-}
-SPOOL_R_ENDPAGEPRINTER;
-
-
-typedef struct spool_q_deleteprinterdriver
-{
- uint32 server_ptr;
- UNISTR2 server;
- UNISTR2 arch;
- UNISTR2 driver;
-}
-SPOOL_Q_DELETEPRINTERDRIVER;
-
-typedef struct spool_r_deleteprinterdriver
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERDRIVER;
-
-typedef struct spool_q_deleteprinterdriverex
-{
- uint32 server_ptr;
- UNISTR2 server;
- UNISTR2 arch;
- UNISTR2 driver;
- uint32 delete_flags;
- uint32 version;
-}
-SPOOL_Q_DELETEPRINTERDRIVEREX;
-
-typedef struct spool_r_deleteprinterdriverex
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERDRIVEREX;
-
-
typedef struct spool_doc_info_1
{
uint32 p_docname;
@@ -655,34 +512,6 @@ typedef struct spool_r_startdocprinter
}
SPOOL_R_STARTDOCPRINTER;
-typedef struct spool_q_enddocprinter
-{
- POLICY_HND handle;
-}
-SPOOL_Q_ENDDOCPRINTER;
-
-typedef struct spool_r_enddocprinter
-{
- WERROR status;
-}
-SPOOL_R_ENDDOCPRINTER;
-
-typedef struct spool_q_writeprinter
-{
- POLICY_HND handle;
- uint32 buffer_size;
- uint8 *buffer;
- uint32 buffer_size2;
-}
-SPOOL_Q_WRITEPRINTER;
-
-typedef struct spool_r_writeprinter
-{
- uint32 buffer_written;
- WERROR status;
-}
-SPOOL_R_WRITEPRINTER;
-
typedef struct spool_notify_option
{
uint32 version;
@@ -763,20 +592,6 @@ typedef struct spool_r_rfnpcnex
}
SPOOL_R_RFNPCNEX;
-/* Find Close Printer Notify */
-typedef struct spool_q_fcpn
-{
- POLICY_HND handle;
-}
-SPOOL_Q_FCPN;
-
-typedef struct spool_r_fcpn
-{
- WERROR status;
-}
-SPOOL_R_FCPN;
-
-
typedef struct printer_info_0
{
UNISTR printername;
@@ -1329,24 +1144,6 @@ typedef struct spool_r_enumforms
}
SPOOL_R_ENUMFORMS;
-typedef struct spool_q_getform
-{
- POLICY_HND handle;
- UNISTR2 formname;
- uint32 level;
- RPC_BUFFER *buffer;
- uint32 offered;
-}
-SPOOL_Q_GETFORM;
-
-typedef struct spool_r_getform
-{
- RPC_BUFFER *buffer;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_GETFORM;
-
typedef struct spool_printer_info_level_1
{
uint32 flags;
@@ -1518,28 +1315,6 @@ SPOOL_R_SETPRINTER;
/********************************************/
typedef struct {
- POLICY_HND handle;
-} SPOOL_Q_DELETEPRINTER;
-
-typedef struct {
- POLICY_HND handle;
- WERROR status;
-} SPOOL_R_DELETEPRINTER;
-
-/********************************************/
-
-typedef struct {
- POLICY_HND handle;
-} SPOOL_Q_ABORTPRINTER;
-
-typedef struct {
- WERROR status;
-} SPOOL_R_ABORTPRINTER;
-
-
-/********************************************/
-
-typedef struct {
UNISTR2 *server_name;
uint32 level;
SPOOL_PRINTER_INFO_LEVEL info;
@@ -1796,50 +1571,6 @@ typedef struct _form
}
FORM;
-typedef struct spool_q_addform
-{
- POLICY_HND handle;
- uint32 level;
- uint32 level2; /* This should really be part of the FORM structure */
- FORM form;
-}
-SPOOL_Q_ADDFORM;
-
-typedef struct spool_r_addform
-{
- WERROR status;
-}
-SPOOL_R_ADDFORM;
-
-typedef struct spool_q_setform
-{
- POLICY_HND handle;
- UNISTR2 name;
- uint32 level;
- uint32 level2;
- FORM form;
-}
-SPOOL_Q_SETFORM;
-
-typedef struct spool_r_setform
-{
- WERROR status;
-}
-SPOOL_R_SETFORM;
-
-typedef struct spool_q_deleteform
-{
- POLICY_HND handle;
- UNISTR2 name;
-}
-SPOOL_Q_DELETEFORM;
-
-typedef struct spool_r_deleteform
-{
- WERROR status;
-}
-SPOOL_R_DELETEFORM;
-
typedef struct spool_q_getjob
{
POLICY_HND handle;
@@ -1975,21 +1706,6 @@ typedef struct spool_r_setprinterdataex
SPOOL_R_SETPRINTERDATAEX;
-typedef struct spool_q_deleteprinterdataex
-{
- POLICY_HND handle;
- UNISTR2 keyname;
- UNISTR2 valuename;
-}
-SPOOL_Q_DELETEPRINTERDATAEX;
-
-typedef struct spool_r_deleteprinterdataex
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERDATAEX;
-
-
typedef struct spool_q_enumprinterkey
{
POLICY_HND handle;
@@ -2006,19 +1722,6 @@ typedef struct spool_r_enumprinterkey
}
SPOOL_R_ENUMPRINTERKEY;
-typedef struct spool_q_deleteprinterkey
-{
- POLICY_HND handle;
- UNISTR2 keyname;
-}
-SPOOL_Q_DELETEPRINTERKEY;
-
-typedef struct spool_r_deleteprinterkey
-{
- WERROR status;
-}
-SPOOL_R_DELETEPRINTERKEY;
-
typedef struct printer_enum_values
{
UNISTR valuename;
diff --git a/source3/include/smb.h b/source3/include/smb.h
index b441b3476a..eaf09dd09c 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -257,6 +257,7 @@ struct id_map {
#include "librpc/gen_ndr/nbt.h"
#include "librpc/gen_ndr/drsuapi.h"
#include "librpc/gen_ndr/drsblobs.h"
+#include "librpc/gen_ndr/spoolss.h"
struct lsa_dom_info {
bool valid;
diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h
new file mode 100644
index 0000000000..7a8768029a
--- /dev/null
+++ b/source3/include/wbc_async.h
@@ -0,0 +1,68 @@
+/*
+ Unix SMB/CIFS implementation.
+ Headers for the async winbind client library
+ Copyright (C) Kai Blin 2009
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _WBC_ASYNC_H_
+#define _WBC_ASYNC_H_
+
+#include "nsswitch/libwbclient/wbclient.h"
+
+struct wb_context {
+ struct async_req_queue *queue;
+ int fd;
+ bool is_priv;
+};
+
+struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
+ struct wb_context *wb_ctx, bool need_priv,
+ const struct winbindd_request *wb_req);
+wbcErr wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presponse);
+struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx);
+
+/* Definitions from wb_reqtrans.c */
+bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err);
+wbcErr map_wbc_err_from_errno(int error);
+wbcErr async_req_simple_recv_wbcerr(struct async_req *req);
+
+struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ int fd, size_t max_extra_data);
+
+wbcErr wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_request **preq);
+
+struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd,
+ struct winbindd_request *wb_req);
+
+wbcErr wb_req_write_recv(struct async_req *req);
+
+struct async_req *wb_resp_read_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd);
+
+wbcErr wb_resp_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presp);
+
+struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd,
+ struct winbindd_response *wb_resp);
+
+wbcErr wb_resp_write_recv(struct async_req *req);
+
+#endif /*_WBC_ASYNC_H_*/
diff --git a/source3/lib/netapi/examples/server/server_getinfo.c b/source3/lib/netapi/examples/server/server_getinfo.c
index afd2edd05d..b6a665e4e0 100644
--- a/source3/lib/netapi/examples/server/server_getinfo.c
+++ b/source3/lib/netapi/examples/server/server_getinfo.c
@@ -38,6 +38,10 @@ int main(int argc, const char **argv)
struct SERVER_INFO_100 *i100;
struct SERVER_INFO_101 *i101;
struct SERVER_INFO_102 *i102;
+ struct SERVER_INFO_402 *i402;
+ struct SERVER_INFO_403 *i403;
+ struct SERVER_INFO_502 *i502;
+ struct SERVER_INFO_503 *i503;
struct SERVER_INFO_1005 *i1005;
poptContext pc;
@@ -112,6 +116,18 @@ int main(int argc, const char **argv)
printf("licenses: %d\n", i102->sv102_licenses);
printf("userpath: %s\n", i102->sv102_userpath);
break;
+ case 402:
+ i402 = (struct SERVER_INFO_402 *)buffer;
+ break;
+ case 403:
+ i403 = (struct SERVER_INFO_403 *)buffer;
+ break;
+ case 502:
+ i502 = (struct SERVER_INFO_502 *)buffer;
+ break;
+ case 503:
+ i503 = (struct SERVER_INFO_503 *)buffer;
+ break;
case 1005:
i1005 = (struct SERVER_INFO_1005 *)buffer;
printf("comment: %s\n", i1005->sv1005_comment);
diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h
index 9687461920..e8cd71eec6 100644
--- a/source3/lib/netapi/netapi.h
+++ b/source3/lib/netapi/netapi.h
@@ -134,11 +134,623 @@ struct SERVER_INFO_102 {
const char * sv102_userpath;
};
+struct SERVER_INFO_402 {
+ uint32_t sv402_ulist_mtime;
+ uint32_t sv402_glist_mtime;
+ uint32_t sv402_alist_mtime;
+ const char * sv402_alerts;
+ uint32_t sv402_security;
+ uint32_t sv402_numadmin;
+ uint32_t sv402_lanmask;
+ const char * sv402_guestacct;
+ uint32_t sv402_chdevs;
+ uint32_t sv402_chdevq;
+ uint32_t sv402_chdevjobs;
+ uint32_t sv402_connections;
+ uint32_t sv402_shares;
+ uint32_t sv402_openfiles;
+ uint32_t sv402_sessopens;
+ uint32_t sv402_sessvcs;
+ uint32_t sv402_sessreqs;
+ uint32_t sv402_opensearch;
+ uint32_t sv402_activelocks;
+ uint32_t sv402_numreqbuf;
+ uint32_t sv402_sizreqbuf;
+ uint32_t sv402_numbigbuf;
+ uint32_t sv402_numfiletasks;
+ uint32_t sv402_alertsched;
+ uint32_t sv402_erroralert;
+ uint32_t sv402_logonalert;
+ uint32_t sv402_accessalert;
+ uint32_t sv402_diskalert;
+ uint32_t sv402_netioalert;
+ uint32_t sv402_maxauditsz;
+ const char * sv402_srvheuristics;
+};
+
+struct SERVER_INFO_403 {
+ uint32_t sv403_ulist_mtime;
+ uint32_t sv403_glist_mtime;
+ uint32_t sv403_alist_mtime;
+ const char * sv403_alerts;
+ uint32_t sv403_security;
+ uint32_t sv403_numadmin;
+ uint32_t sv403_lanmask;
+ const char * sv403_guestacct;
+ uint32_t sv403_chdevs;
+ uint32_t sv403_chdevq;
+ uint32_t sv403_chdevjobs;
+ uint32_t sv403_connections;
+ uint32_t sv403_shares;
+ uint32_t sv403_openfiles;
+ uint32_t sv403_sessopens;
+ uint32_t sv403_sessvcs;
+ uint32_t sv403_sessreqs;
+ uint32_t sv403_opensearch;
+ uint32_t sv403_activelocks;
+ uint32_t sv403_numreqbuf;
+ uint32_t sv403_sizreqbuf;
+ uint32_t sv403_numbigbuf;
+ uint32_t sv403_numfiletasks;
+ uint32_t sv403_alertsched;
+ uint32_t sv403_erroralert;
+ uint32_t sv403_logonalert;
+ uint32_t sv403_accessalert;
+ uint32_t sv403_diskalert;
+ uint32_t sv403_netioalert;
+ uint32_t sv403_maxauditsz;
+ const char * sv403_srvheuristics;
+ uint32_t sv403_auditedevents;
+ uint32_t sv403_autoprofile;
+ const char * sv403_autopath;
+};
+
+struct SERVER_INFO_502 {
+ uint32_t sv502_sessopens;
+ uint32_t sv502_sessvcs;
+ uint32_t sv502_opensearch;
+ uint32_t sv502_sizreqbuf;
+ uint32_t sv502_initworkitems;
+ uint32_t sv502_maxworkitems;
+ uint32_t sv502_rawworkitems;
+ uint32_t sv502_irpstacksize;
+ uint32_t sv502_maxrawbuflen;
+ uint32_t sv502_sessusers;
+ uint32_t sv502_sessconns;
+ uint32_t sv502_maxpagedmemoryusage;
+ uint32_t sv502_maxnonpagedmemoryusage;
+ uint8_t sv502_enablesoftcompat;
+ uint8_t sv502_enableforcedlogoff;
+ uint8_t sv502_timesource;
+ uint8_t sv502_acceptdownlevelapis;
+ uint8_t sv502_lmannounce;
+};
+
+struct SERVER_INFO_503 {
+ uint32_t sv503_sessopens;
+ uint32_t sv503_sessvcs;
+ uint32_t sv503_opensearch;
+ uint32_t sv503_sizreqbuf;
+ uint32_t sv503_initworkitems;
+ uint32_t sv503_maxworkitems;
+ uint32_t sv503_rawworkitems;
+ uint32_t sv503_irpstacksize;
+ uint32_t sv503_maxrawbuflen;
+ uint32_t sv503_sessusers;
+ uint32_t sv503_sessconns;
+ uint32_t sv503_maxpagedmemoryusage;
+ uint32_t sv503_maxnonpagedmemoryusage;
+ uint8_t sv503_enablesoftcompat;
+ uint8_t sv503_enableforcedlogoff;
+ uint8_t sv503_timesource;
+ uint8_t sv503_acceptdownlevelapis;
+ uint8_t sv503_lmannounce;
+ const char * sv503_domain;
+ uint32_t sv503_maxcopyreadlen;
+ uint32_t sv503_maxcopywritelen;
+ uint32_t sv503_minkeepsearch;
+ uint32_t sv503_maxkeepsearch;
+ uint32_t sv503_minkeepcomplsearch;
+ uint32_t sv503_maxkeepcomplsearch;
+ uint32_t sv503_threadcountadd;
+ uint32_t sv503_numblockthreads;
+ uint32_t sv503_scavtimeout;
+ uint32_t sv503_minrcvqueue;
+ uint32_t sv503_minfreeworkitems;
+ uint32_t sv503_xactmemsize;
+ uint32_t sv503_threadpriority;
+ uint32_t sv503_maxmpxct;
+ uint32_t sv503_oplockbreakwait;
+ uint32_t sv503_oplockbreakresponsewait;
+ uint8_t sv503_enableoplocks;
+ uint8_t sv503_enableoplockforceclose;
+ uint8_t sv503_enablefcbopens;
+ uint8_t sv503_enableraw;
+ uint8_t sv503_enablesharednetdrives;
+ uint32_t sv503_minfreeconnections;
+ uint32_t sv503_maxfreeconnections;
+};
+
+struct SERVER_INFO_599 {
+ uint32_t sv599_sessopens;
+ uint32_t sv599_sessvcs;
+ uint32_t sv599_opensearch;
+ uint32_t sv599_sizreqbuf;
+ uint32_t sv599_initworkitems;
+ uint32_t sv599_maxworkitems;
+ uint32_t sv599_rawworkitems;
+ uint32_t sv599_irpstacksize;
+ uint32_t sv599_maxrawbuflen;
+ uint32_t sv599_sessusers;
+ uint32_t sv599_sessconns;
+ uint32_t sv599_maxpagedmemoryusage;
+ uint32_t sv599_maxnonpagedmemoryusage;
+ uint8_t sv599_enablesoftcompat;
+ uint8_t sv599_enableforcedlogoff;
+ uint8_t sv599_timesource;
+ uint8_t sv599_acceptdownlevelapis;
+ uint8_t sv599_lmannounce;
+ const char * sv599_domain;
+ uint32_t sv599_maxcopyreadlen;
+ uint32_t sv599_maxcopywritelen;
+ uint32_t sv599_minkeepsearch;
+ uint32_t sv599_maxkeepsearch;
+ uint32_t sv599_minkeepcomplsearch;
+ uint32_t sv599_maxkeepcomplsearch;
+ uint32_t sv599_threadcountadd;
+ uint32_t sv599_numblockthreads;
+ uint32_t sv599_scavtimeout;
+ uint32_t sv599_minrcvqueue;
+ uint32_t sv599_minfreeworkitems;
+ uint32_t sv599_xactmemsize;
+ uint32_t sv599_threadpriority;
+ uint32_t sv599_maxmpxct;
+ uint32_t sv599_oplockbreakwait;
+ uint32_t sv599_oplockbreakresponsewait;
+ uint8_t sv599_enableoplocks;
+ uint8_t sv599_enableoplockforceclose;
+ uint8_t sv599_enablefcbopens;
+ uint8_t sv599_enableraw;
+ uint8_t sv599_enablesharednetdrives;
+ uint32_t sv599_minfreeconnections;
+ uint32_t sv599_maxfreeconnections;
+ uint32_t sv599_initsesstable;
+ uint32_t sv599_initconntable;
+ uint32_t sv599_initfiletable;
+ uint32_t sv599_initsearchtable;
+ uint32_t sv599_alertschedule;
+ uint32_t sv599_errorthreshold;
+ uint32_t sv599_networkerrorthreshold;
+ uint32_t sv599_diskspacethreshold;
+ uint32_t sv599_reserved;
+ uint32_t sv599_maxlinkdelay;
+ uint32_t sv599_minlinkthroughput;
+ uint32_t sv599_linkinfovalidtime;
+ uint32_t sv599_scavqosinfoupdatetime;
+ uint32_t sv599_maxworkitemidletime;
+};
+
+struct SERVER_INFO_598 {
+ uint32_t sv598_maxrawworkitems;
+ uint32_t sv598_maxthreadsperqueue;
+ uint32_t sv598_producttype;
+ uint32_t sv598_serversize;
+ uint32_t sv598_connectionlessautodisc;
+ uint32_t sv598_sharingviolationretries;
+ uint32_t sv598_sharingviolationdelay;
+ uint32_t sv598_maxglobalopensearch;
+ uint32_t sv598_removeduplicatesearches;
+ uint32_t sv598_lockviolationoffset;
+ uint32_t sv598_lockviolationdelay;
+ uint32_t sv598_mdlreadswitchover;
+ uint32_t sv598_cachedopenlimit;
+ uint32_t sv598_otherqueueaffinity;
+ uint8_t sv598_restrictnullsessaccess;
+ uint8_t sv598_enablewfw311directipx;
+ uint32_t sv598_queuesamplesecs;
+ uint32_t sv598_balancecount;
+ uint32_t sv598_preferredaffinity;
+ uint32_t sv598_maxfreerfcbs;
+ uint32_t sv598_maxfreemfcbs;
+ uint32_t sv598_maxfreelfcbs;
+ uint32_t sv598_maxfreepagedpoolchunks;
+ uint32_t sv598_minpagedpoolchunksize;
+ uint32_t sv598_maxpagedpoolchunksize;
+ uint8_t sv598_sendsfrompreferredprocessor;
+ uint32_t sv598_cacheddirectorylimit;
+ uint32_t sv598_maxcopylength;
+ uint8_t sv598_enablecompression;
+ uint8_t sv598_autosharewks;
+ uint8_t sv598_autoshareserver;
+ uint8_t sv598_enablesecuritysignature;
+ uint8_t sv598_requiresecuritysignature;
+ uint32_t sv598_minclientbuffersize;
+ struct GUID sv598_serverguid;
+ uint32_t sv598_ConnectionNoSessionsTimeout;
+ uint32_t sv598_IdleThreadTimeOut;
+ uint8_t sv598_enableW9xsecuritysignature;
+ uint8_t sv598_enforcekerberosreauthentication;
+ uint8_t sv598_disabledos;
+ uint32_t sv598_lowdiskspaceminimum;
+ uint8_t sv598_disablestrictnamechecking;
+};
struct SERVER_INFO_1005 {
const char * sv1005_comment;
};
+struct SERVER_INFO_1107 {
+ uint32_t sv1107_users;
+};
+
+struct SERVER_INFO_1010 {
+ int32_t sv1010_disc;
+};
+
+struct SERVER_INFO_1016 {
+ uint8_t sv1016_hidden;
+};
+
+struct SERVER_INFO_1017 {
+ uint32_t sv1017_announce;
+};
+
+struct SERVER_INFO_1018 {
+ uint32_t sv1018_anndelta;
+};
+
+struct SERVER_INFO_1501 {
+ uint32_t sv1501_sessopens;
+};
+
+struct SERVER_INFO_1502 {
+ uint32_t sv1502_sessvcs;
+};
+
+struct SERVER_INFO_1503 {
+ uint32_t sv1503_opensearch;
+};
+
+struct SERVER_INFO_1506 {
+ uint32_t sv1506_maxworkitems;
+};
+
+struct SERVER_INFO_1509 {
+ uint32_t sv1509_maxrawbuflen;
+};
+
+struct SERVER_INFO_1510 {
+ uint32_t sv1510_sessusers;
+};
+
+struct SERVER_INFO_1511 {
+ uint32_t sv1511_sessconns;
+};
+
+struct SERVER_INFO_1512 {
+ uint32_t sv1512_maxnonpagedmemoryusage;
+};
+
+struct SERVER_INFO_1513 {
+ uint32_t sv1513_maxpagedmemoryusage;
+};
+
+struct SERVER_INFO_1514 {
+ uint8_t sv1514_enablesoftcompat;
+};
+
+struct SERVER_INFO_1515 {
+ uint8_t sv1515_enableforcedlogoff;
+};
+
+struct SERVER_INFO_1516 {
+ uint8_t sv1516_timesource;
+};
+
+struct SERVER_INFO_1518 {
+ uint8_t sv1518_lmannounce;
+};
+
+struct SERVER_INFO_1520 {
+ uint32_t sv1520_maxcopyreadlen;
+};
+
+struct SERVER_INFO_1521 {
+ uint32_t sv1521_maxcopywritelen;
+};
+
+struct SERVER_INFO_1522 {
+ uint32_t sv1522_minkeepsearch;
+};
+
+struct SERVER_INFO_1523 {
+ uint32_t sv1523_maxkeepsearch;
+};
+
+struct SERVER_INFO_1524 {
+ uint32_t sv1524_minkeepcomplsearch;
+};
+
+struct SERVER_INFO_1525 {
+ uint32_t sv1525_maxkeepcomplsearch;
+};
+
+struct SERVER_INFO_1528 {
+ uint32_t sv1528_scavtimeout;
+};
+
+struct SERVER_INFO_1529 {
+ uint32_t sv1529_minrcvqueue;
+};
+
+struct SERVER_INFO_1530 {
+ uint32_t sv1530_minfreeworkitems;
+};
+
+struct SERVER_INFO_1533 {
+ uint32_t sv1533_maxmpxct;
+};
+
+struct SERVER_INFO_1534 {
+ uint32_t sv1534_oplockbreakwait;
+};
+
+struct SERVER_INFO_1535 {
+ uint32_t sv1535_oplockbreakresponsewait;
+};
+
+struct SERVER_INFO_1536 {
+ uint8_t sv1536_enableoplocks;
+};
+
+struct SERVER_INFO_1537 {
+ uint8_t sv1537_enableoplockforceclose;
+};
+
+struct SERVER_INFO_1538 {
+ uint8_t sv1538_enablefcbopens;
+};
+
+struct SERVER_INFO_1539 {
+ uint8_t sv1539_enableraw;
+};
+
+struct SERVER_INFO_1540 {
+ uint8_t sv1540_enablesharednetdrives;
+};
+
+struct SERVER_INFO_1541 {
+ uint8_t sv1541_minfreeconnections;
+};
+
+struct SERVER_INFO_1542 {
+ uint8_t sv1542_maxfreeconnections;
+};
+
+struct SERVER_INFO_1543 {
+ uint32_t sv1543_initsesstable;
+};
+
+struct SERVER_INFO_1544 {
+ uint32_t sv1544_initconntable;
+};
+
+struct SERVER_INFO_1545 {
+ uint32_t sv1545_initfiletable;
+};
+
+struct SERVER_INFO_1546 {
+ uint32_t sv1546_initsearchtable;
+};
+
+struct SERVER_INFO_1547 {
+ uint32_t sv1547_alertschedule;
+};
+
+struct SERVER_INFO_1548 {
+ uint32_t sv1548_errorthreshold;
+};
+
+struct SERVER_INFO_1549 {
+ uint32_t sv1549_networkerrorthreshold;
+};
+
+struct SERVER_INFO_1550 {
+ uint32_t sv1550_diskspacethreshold;
+};
+
+struct SERVER_INFO_1552 {
+ uint32_t sv1552_maxlinkdelay;
+};
+
+struct SERVER_INFO_1553 {
+ uint32_t sv1553_minlinkthroughput;
+};
+
+struct SERVER_INFO_1554 {
+ uint32_t sv1554_linkinfovalidtime;
+};
+
+struct SERVER_INFO_1555 {
+ uint32_t sv1555_scavqosinfoupdatetime;
+};
+
+struct SERVER_INFO_1556 {
+ uint32_t sv1556_maxworkitemidletime;
+};
+
+struct SERVER_INFO_1557 {
+ uint32_t sv1557_maxrawworkitems;
+};
+
+struct SERVER_INFO_1560 {
+ uint32_t sv1560_producttype;
+};
+
+struct SERVER_INFO_1561 {
+ uint32_t sv1561_serversize;
+};
+
+struct SERVER_INFO_1562 {
+ uint32_t sv1562_connectionlessautodisc;
+};
+
+struct SERVER_INFO_1563 {
+ uint32_t sv1563_sharingviolationretries;
+};
+
+struct SERVER_INFO_1564 {
+ uint32_t sv1564_sharingviolationdelay;
+};
+
+struct SERVER_INFO_1565 {
+ uint32_t sv1565_maxglobalopensearch;
+};
+
+struct SERVER_INFO_1566 {
+ uint8_t sv1566_removeduplicatesearches;
+};
+
+struct SERVER_INFO_1567 {
+ uint32_t sv1567_lockviolationretries;
+};
+
+struct SERVER_INFO_1568 {
+ uint32_t sv1568_lockviolationoffset;
+};
+
+struct SERVER_INFO_1569 {
+ uint32_t sv1569_lockviolationdelay;
+};
+
+struct SERVER_INFO_1570 {
+ uint32_t sv1570_mdlreadswitchover;
+};
+
+struct SERVER_INFO_1571 {
+ uint32_t sv1571_cachedopenlimit;
+};
+
+struct SERVER_INFO_1572 {
+ uint32_t sv1572_criticalthreads;
+};
+
+struct SERVER_INFO_1573 {
+ uint32_t sv1573_restrictnullsessaccess;
+};
+
+struct SERVER_INFO_1574 {
+ uint32_t sv1574_enablewfw311directipx;
+};
+
+struct SERVER_INFO_1575 {
+ uint32_t sv1575_otherqueueaffinity;
+};
+
+struct SERVER_INFO_1576 {
+ uint32_t sv1576_queuesamplesecs;
+};
+
+struct SERVER_INFO_1577 {
+ uint32_t sv1577_balancecount;
+};
+
+struct SERVER_INFO_1578 {
+ uint32_t sv1578_preferredaffinity;
+};
+
+struct SERVER_INFO_1579 {
+ uint32_t sv1579_maxfreerfcbs;
+};
+
+struct SERVER_INFO_1580 {
+ uint32_t sv1580_maxfreemfcbs;
+};
+
+struct SERVER_INFO_1581 {
+ uint32_t sv1581_maxfreemlcbs;
+};
+
+struct SERVER_INFO_1582 {
+ uint32_t sv1582_maxfreepagedpoolchunks;
+};
+
+struct SERVER_INFO_1583 {
+ uint32_t sv1583_minpagedpoolchunksize;
+};
+
+struct SERVER_INFO_1584 {
+ uint32_t sv1584_maxpagedpoolchunksize;
+};
+
+struct SERVER_INFO_1585 {
+ uint8_t sv1585_sendsfrompreferredprocessor;
+};
+
+struct SERVER_INFO_1586 {
+ uint32_t sv1586_maxthreadsperqueue;
+};
+
+struct SERVER_INFO_1587 {
+ uint32_t sv1587_cacheddirectorylimit;
+};
+
+struct SERVER_INFO_1588 {
+ uint32_t sv1588_maxcopylength;
+};
+
+struct SERVER_INFO_1590 {
+ uint32_t sv1590_enablecompression;
+};
+
+struct SERVER_INFO_1591 {
+ uint32_t sv1591_autosharewks;
+};
+
+struct SERVER_INFO_1592 {
+ uint32_t sv1592_autosharewks;
+};
+
+struct SERVER_INFO_1593 {
+ uint32_t sv1593_enablesecuritysignature;
+};
+
+struct SERVER_INFO_1594 {
+ uint32_t sv1594_requiresecuritysignature;
+};
+
+struct SERVER_INFO_1595 {
+ uint32_t sv1595_minclientbuffersize;
+};
+
+struct SERVER_INFO_1596 {
+ uint32_t sv1596_ConnectionNoSessionsTimeout;
+};
+
+struct SERVER_INFO_1597 {
+ uint32_t sv1597_IdleThreadTimeOut;
+};
+
+struct SERVER_INFO_1598 {
+ uint32_t sv1598_enableW9xsecuritysignature;
+};
+
+struct SERVER_INFO_1599 {
+ uint8_t sv1598_enforcekerberosreauthentication;
+};
+
+struct SERVER_INFO_1600 {
+ uint8_t sv1598_disabledos;
+};
+
+struct SERVER_INFO_1601 {
+ uint32_t sv1598_lowdiskspaceminimum;
+};
+
+struct SERVER_INFO_1602 {
+ uint8_t sv_1598_disablestrictnamechecking;
+};
+
struct USER_INFO_0 {
const char * usri0_name;
};
diff --git a/source3/lib/netapi/serverinfo.c b/source3/lib/netapi/serverinfo.c
index d77145eef3..02396a7bba 100644
--- a/source3/lib/netapi/serverinfo.c
+++ b/source3/lib/netapi/serverinfo.c
@@ -94,8 +94,108 @@ static NTSTATUS map_server_info_to_SERVER_INFO_buffer(TALLOC_CTX *mem_ctx,
struct SERVER_INFO_100 i100;
struct SERVER_INFO_101 i101;
struct SERVER_INFO_102 i102;
+ struct SERVER_INFO_402 i402;
+ struct SERVER_INFO_403 i403;
+ struct SERVER_INFO_502 i502;
+ struct SERVER_INFO_503 i503;
+ struct SERVER_INFO_598 i598;
+ struct SERVER_INFO_599 i599;
struct SERVER_INFO_1005 i1005;
-
+#if 0
+ struct SERVER_INFO_1010 i1010;
+ struct SERVER_INFO_1016 i1016;
+ struct SERVER_INFO_1017 i1017;
+ struct SERVER_INFO_1018 i1018;
+ struct SERVER_INFO_1107 i1107;
+ struct SERVER_INFO_1501 i1501;
+ struct SERVER_INFO_1502 i1502;
+ struct SERVER_INFO_1503 i1503;
+ struct SERVER_INFO_1506 i1506;
+ struct SERVER_INFO_1509 i1509;
+ struct SERVER_INFO_1510 i1510;
+ struct SERVER_INFO_1511 i1511;
+ struct SERVER_INFO_1512 i1512;
+ struct SERVER_INFO_1513 i1513;
+ struct SERVER_INFO_1514 i1514;
+ struct SERVER_INFO_1515 i1515;
+ struct SERVER_INFO_1516 i1516;
+ struct SERVER_INFO_1518 i1518;
+ struct SERVER_INFO_1520 i1520;
+ struct SERVER_INFO_1521 i1521;
+ struct SERVER_INFO_1522 i1522;
+ struct SERVER_INFO_1523 i1523;
+ struct SERVER_INFO_1524 i1524;
+ struct SERVER_INFO_1525 i1525;
+ struct SERVER_INFO_1528 i1528;
+ struct SERVER_INFO_1529 i1529;
+ struct SERVER_INFO_1530 i1530;
+ struct SERVER_INFO_1533 i1533;
+ struct SERVER_INFO_1534 i1534;
+ struct SERVER_INFO_1535 i1535;
+ struct SERVER_INFO_1536 i1536;
+ struct SERVER_INFO_1537 i1537;
+ struct SERVER_INFO_1538 i1538;
+ struct SERVER_INFO_1539 i1539;
+ struct SERVER_INFO_1540 i1540;
+ struct SERVER_INFO_1541 i1541;
+ struct SERVER_INFO_1542 i1542;
+ struct SERVER_INFO_1543 i1543;
+ struct SERVER_INFO_1544 i1544;
+ struct SERVER_INFO_1545 i1545;
+ struct SERVER_INFO_1546 i1546;
+ struct SERVER_INFO_1547 i1547;
+ struct SERVER_INFO_1548 i1548;
+ struct SERVER_INFO_1549 i1549;
+ struct SERVER_INFO_1550 i1550;
+ struct SERVER_INFO_1552 i1552;
+ struct SERVER_INFO_1553 i1553;
+ struct SERVER_INFO_1554 i1554;
+ struct SERVER_INFO_1555 i1555;
+ struct SERVER_INFO_1556 i1556;
+ struct SERVER_INFO_1557 i1557;
+ struct SERVER_INFO_1560 i1560;
+ struct SERVER_INFO_1561 i1561;
+ struct SERVER_INFO_1562 i1562;
+ struct SERVER_INFO_1563 i1563;
+ struct SERVER_INFO_1564 i1564;
+ struct SERVER_INFO_1565 i1565;
+ struct SERVER_INFO_1566 i1566;
+ struct SERVER_INFO_1567 i1567;
+ struct SERVER_INFO_1568 i1568;
+ struct SERVER_INFO_1569 i1569;
+ struct SERVER_INFO_1570 i1570;
+ struct SERVER_INFO_1571 i1571;
+ struct SERVER_INFO_1572 i1572;
+ struct SERVER_INFO_1573 i1573;
+ struct SERVER_INFO_1574 i1574;
+ struct SERVER_INFO_1575 i1575;
+ struct SERVER_INFO_1576 i1576;
+ struct SERVER_INFO_1577 i1577;
+ struct SERVER_INFO_1578 i1578;
+ struct SERVER_INFO_1579 i1579;
+ struct SERVER_INFO_1580 i1580;
+ struct SERVER_INFO_1581 i1581;
+ struct SERVER_INFO_1582 i1582;
+ struct SERVER_INFO_1583 i1583;
+ struct SERVER_INFO_1584 i1584;
+ struct SERVER_INFO_1585 i1585;
+ struct SERVER_INFO_1586 i1586;
+ struct SERVER_INFO_1587 i1587;
+ struct SERVER_INFO_1588 i1588;
+ struct SERVER_INFO_1590 i1590;
+ struct SERVER_INFO_1591 i1591;
+ struct SERVER_INFO_1592 i1592;
+ struct SERVER_INFO_1593 i1593;
+ struct SERVER_INFO_1594 i1594;
+ struct SERVER_INFO_1595 i1595;
+ struct SERVER_INFO_1596 i1596;
+ struct SERVER_INFO_1597 i1597;
+ struct SERVER_INFO_1598 i1598;
+ struct SERVER_INFO_1599 i1599;
+ struct SERVER_INFO_1600 i1600;
+ struct SERVER_INFO_1601 i1601;
+ struct SERVER_INFO_1602 i1602;
+#endif
uint32_t num_info = 0;
switch (level) {
@@ -141,6 +241,173 @@ static NTSTATUS map_server_info_to_SERVER_INFO_buffer(TALLOC_CTX *mem_ctx,
&num_info);
break;
+ case 402:
+
+ i402.sv402_ulist_mtime = i->info402->ulist_mtime;
+ i402.sv402_glist_mtime = i->info402->glist_mtime;
+ i402.sv402_alist_mtime = i->info402->alist_mtime;
+ i402.sv402_alerts = talloc_strdup(mem_ctx, i->info402->alerts);
+ i402.sv402_security = i->info402->security;
+ i402.sv402_numadmin = i->info402->numadmin;
+ i402.sv402_lanmask = i->info402->lanmask;
+ i402.sv402_guestacct = talloc_strdup(mem_ctx, i->info402->guestaccount);
+ i402.sv402_chdevs = i->info402->chdevs;
+ i402.sv402_chdevq = i->info402->chdevqs;
+ i402.sv402_chdevjobs = i->info402->chdevjobs;
+ i402.sv402_connections = i->info402->connections;
+ i402.sv402_shares = i->info402->shares;
+ i402.sv402_openfiles = i->info402->openfiles;
+ i402.sv402_sessopens = i->info402->sessopen;
+ i402.sv402_sessvcs = i->info402->sesssvc;
+ i402.sv402_sessreqs = i->info402->sessreqs;
+ i402.sv402_opensearch = i->info402->opensearch;
+ i402.sv402_activelocks = i->info402->activelocks;
+ i402.sv402_numreqbuf = i->info402->numreqbufs;
+ i402.sv402_sizreqbuf = i->info402->sizereqbufs;
+ i402.sv402_numbigbuf = i->info402->numbigbufs;
+ i402.sv402_numfiletasks = i->info402->numfiletasks;
+ i402.sv402_alertsched = i->info402->alertsched;
+ i402.sv402_erroralert = i->info402->erroralert;
+ i402.sv402_logonalert = i->info402->logonalert;
+ i402.sv402_accessalert = i->info402->accessalert;
+ i402.sv402_diskalert = i->info402->diskalert;
+ i402.sv402_netioalert = i->info402->netioalert;
+ i402.sv402_maxauditsz = i->info402->maxaudits;
+ i402.sv402_srvheuristics = i->info402->srvheuristics;
+
+ ADD_TO_ARRAY(mem_ctx, struct SERVER_INFO_402, i402,
+ (struct SERVER_INFO_402 **)buffer,
+ &num_info);
+ break;
+
+ case 403:
+
+ i403.sv403_ulist_mtime = i->info403->ulist_mtime;
+ i403.sv403_glist_mtime = i->info403->glist_mtime;
+ i403.sv403_alist_mtime = i->info403->alist_mtime;
+ i403.sv403_alerts = talloc_strdup(mem_ctx, i->info403->alerts);
+ i403.sv403_security = i->info403->security;
+ i403.sv403_numadmin = i->info403->numadmin;
+ i403.sv403_lanmask = i->info403->lanmask;
+ i403.sv403_guestacct = talloc_strdup(mem_ctx, i->info403->guestaccount);
+ i403.sv403_chdevs = i->info403->chdevs;
+ i403.sv403_chdevq = i->info403->chdevqs;
+ i403.sv403_chdevjobs = i->info403->chdevjobs;
+ i403.sv403_connections = i->info403->connections;
+ i403.sv403_shares = i->info403->shares;
+ i403.sv403_openfiles = i->info403->openfiles;
+ i403.sv403_sessopens = i->info403->sessopen;
+ i403.sv403_sessvcs = i->info403->sesssvc;
+ i403.sv403_sessreqs = i->info403->sessreqs;
+ i403.sv403_opensearch = i->info403->opensearch;
+ i403.sv403_activelocks = i->info403->activelocks;
+ i403.sv403_numreqbuf = i->info403->numreqbufs;
+ i403.sv403_sizreqbuf = i->info403->sizereqbufs;
+ i403.sv403_numbigbuf = i->info403->numbigbufs;
+ i403.sv403_numfiletasks = i->info403->numfiletasks;
+ i403.sv403_alertsched = i->info403->alertsched;
+ i403.sv403_erroralert = i->info403->erroralert;
+ i403.sv403_logonalert = i->info403->logonalert;
+ i403.sv403_accessalert = i->info403->accessalert;
+ i403.sv403_diskalert = i->info403->diskalert;
+ i403.sv403_netioalert = i->info403->netioalert;
+ i403.sv403_maxauditsz = i->info403->maxaudits;
+ i403.sv403_srvheuristics = i->info403->srvheuristics;
+ i403.sv403_auditedevents = i->info403->auditedevents;
+ i403.sv403_autoprofile = i->info403->auditprofile;
+ i403.sv403_autopath = talloc_strdup(mem_ctx, i->info403->autopath);
+
+ ADD_TO_ARRAY(mem_ctx, struct SERVER_INFO_403, i403,
+ (struct SERVER_INFO_403 **)buffer,
+ &num_info);
+ break;
+
+ case 502:
+ i502.sv502_sessopens = i->info502->sessopen;
+ i502.sv502_sessvcs = i->info502->sesssvc;
+ i502.sv502_opensearch = i->info502->opensearch;
+ i502.sv502_sizreqbuf = i->info502->sizereqbufs;
+ i502.sv502_initworkitems = i->info502->initworkitems;
+ i502.sv502_maxworkitems = i->info502->maxworkitems;
+ i502.sv502_rawworkitems = i->info502->rawworkitems;
+ i502.sv502_irpstacksize = i->info502->irpstacksize;
+ i502.sv502_maxrawbuflen = i->info502->maxrawbuflen;
+ i502.sv502_sessusers = i->info502->sessusers;
+ i502.sv502_sessconns = i->info502->sessconns;
+ i502.sv502_maxpagedmemoryusage = i->info502->maxpagedmemoryusage;
+ i502.sv502_maxnonpagedmemoryusage = i->info502->maxnonpagedmemoryusage;
+ i502.sv502_enablesoftcompat = i->info502->enablesoftcompat;
+ i502.sv502_enableforcedlogoff = i->info502->enableforcedlogoff;
+ i502.sv502_timesource = i->info502->timesource;
+ i502.sv502_acceptdownlevelapis = i->info502->acceptdownlevelapis;
+ i502.sv502_lmannounce = i->info502->lmannounce;
+
+ ADD_TO_ARRAY(mem_ctx, struct SERVER_INFO_502, i502,
+ (struct SERVER_INFO_502 **)buffer,
+ &num_info);
+ break;
+
+ case 503:
+ i503.sv503_sessopens = i->info503->sessopen;
+ i503.sv503_sessvcs = i->info503->sesssvc;
+ i503.sv503_opensearch = i->info503->opensearch;
+ i503.sv503_sizreqbuf = i->info503->sizereqbufs;
+ i503.sv503_initworkitems = i->info503->initworkitems;
+ i503.sv503_maxworkitems = i->info503->maxworkitems;
+ i503.sv503_rawworkitems = i->info503->rawworkitems;
+ i503.sv503_irpstacksize = i->info503->irpstacksize;
+ i503.sv503_maxrawbuflen = i->info503->maxrawbuflen;
+ i503.sv503_sessusers = i->info503->sessusers;
+ i503.sv503_sessconns = i->info503->sessconns;
+ i503.sv503_maxpagedmemoryusage = i->info503->maxpagedmemoryusage;
+ i503.sv503_maxnonpagedmemoryusage = i->info503->maxnonpagedmemoryusage;
+ i503.sv503_enablesoftcompat = i->info503->enablesoftcompat;
+ i503.sv503_enableforcedlogoff = i->info503->enableforcedlogoff;
+ i503.sv503_timesource = i->info503->timesource;
+ i503.sv503_acceptdownlevelapis = i->info503->acceptdownlevelapis;
+ i503.sv503_lmannounce = i->info503->lmannounce;
+ i503.sv503_domain = talloc_strdup(mem_ctx, i->info503->domain);
+ i503.sv503_maxcopyreadlen = i->info503->maxcopyreadlen;
+ i503.sv503_maxcopywritelen = i->info503->maxcopywritelen;
+ i503.sv503_minkeepsearch = i->info503->minkeepsearch;
+ i503.sv503_maxkeepsearch = i->info503->maxkeepsearch;
+ i503.sv503_minkeepcomplsearch = i->info503->minkeepcomplsearch;
+ i503.sv503_maxkeepcomplsearch = i->info503->maxkeepcomplsearch;
+ i503.sv503_threadcountadd = i->info503->threadcountadd;
+ i503.sv503_numblockthreads = i->info503->numlockthreads;
+ i503.sv503_scavtimeout = i->info503->scavtimeout;
+ i503.sv503_minrcvqueue = i->info503->minrcvqueue;
+ i503.sv503_minfreeworkitems = i->info503->minfreeworkitems;
+ i503.sv503_xactmemsize = i->info503->xactmemsize;
+ i503.sv503_threadpriority = i->info503->threadpriority;
+ i503.sv503_maxmpxct = i->info503->maxmpxct;
+ i503.sv503_oplockbreakwait = i->info503->oplockbreakwait;
+ i503.sv503_oplockbreakresponsewait = i->info503->oplockbreakresponsewait;
+ i503.sv503_enableoplocks = i->info503->enableoplocks;
+ i503.sv503_enableoplockforceclose = i->info503->enableoplockforceclose;
+ i503.sv503_enablefcbopens = i->info503->enablefcbopens;
+ i503.sv503_enableraw = i->info503->enableraw;
+ i503.sv503_enablesharednetdrives = i->info503->enablesharednetdrives;
+ i503.sv503_minfreeconnections = i->info503->minfreeconnections;
+ i503.sv503_maxfreeconnections = i->info503->maxfreeconnections;
+
+ ADD_TO_ARRAY(mem_ctx, struct SERVER_INFO_503, i503,
+ (struct SERVER_INFO_503 **)buffer,
+ &num_info);
+ break;
+
+ case 598:
+ ADD_TO_ARRAY(mem_ctx, struct SERVER_INFO_598, i598,
+ (struct SERVER_INFO_598 **)buffer,
+ &num_info);
+ break;
+
+ case 599:
+ ADD_TO_ARRAY(mem_ctx, struct SERVER_INFO_599, i599,
+ (struct SERVER_INFO_599 **)buffer,
+ &num_info);
+ break;
+
case 1005:
i1005.sv1005_comment = talloc_strdup(mem_ctx, i->info1005->comment);
@@ -174,6 +441,9 @@ WERROR NetServerGetInfo_r(struct libnetapi_ctx *ctx,
case 100:
case 101:
case 102:
+ case 402:
+ case 502:
+ case 503:
case 1005:
break;
default:
diff --git a/source3/lib/netapi/tests/Makefile.in b/source3/lib/netapi/tests/Makefile.in
index 659f82c9d8..ddf4af5d0c 100644
--- a/source3/lib/netapi/tests/Makefile.in
+++ b/source3/lib/netapi/tests/Makefile.in
@@ -44,7 +44,7 @@ bin/.dummy:
CMDLINE_OBJ = common.o
NETAPIBUFFER_OBJ = netapibuffer.o
-NETAPITEST_OBJ = netapitest.o netlocalgroup.o netuser.o netgroup.o netdisplay.o netshare.o netfile.o $(CMDLINE_OBJ)
+NETAPITEST_OBJ = netapitest.o netlocalgroup.o netuser.o netgroup.o netdisplay.o netshare.o netfile.o netserver.o $(CMDLINE_OBJ)
bin/netapitest@EXEEXT@: $(BINARY_PREREQS) $(NETAPITEST_OBJ)
@echo Linking $@
diff --git a/source3/lib/netapi/tests/common.h b/source3/lib/netapi/tests/common.h
index 9320840909..7e05aaf657 100644
--- a/source3/lib/netapi/tests/common.h
+++ b/source3/lib/netapi/tests/common.h
@@ -43,6 +43,8 @@ NET_API_STATUS netapitest_share(struct libnetapi_ctx *ctx,
const char *hostname);
NET_API_STATUS netapitest_file(struct libnetapi_ctx *ctx,
const char *hostname);
+NET_API_STATUS netapitest_server(struct libnetapi_ctx *ctx,
+ const char *hostname);
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
diff --git a/source3/lib/netapi/tests/netapitest.c b/source3/lib/netapi/tests/netapitest.c
index 4a38f721d8..00e5b2ae40 100644
--- a/source3/lib/netapi/tests/netapitest.c
+++ b/source3/lib/netapi/tests/netapitest.c
@@ -89,6 +89,11 @@ int main(int argc, const char **argv)
goto out;
}
+ status = netapitest_server(ctx, hostname);
+ if (status) {
+ goto out;
+ }
+
out:
if (status != 0) {
printf("testsuite failed with: %s\n",
diff --git a/source3/lib/netapi/tests/netserver.c b/source3/lib/netapi/tests/netserver.c
new file mode 100644
index 0000000000..f7b9286be6
--- /dev/null
+++ b/source3/lib/netapi/tests/netserver.c
@@ -0,0 +1,61 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * NetServer testsuite
+ * Copyright (C) Guenther Deschner 2008
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <sys/types.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <netapi.h>
+
+#include "common.h"
+
+NET_API_STATUS netapitest_server(struct libnetapi_ctx *ctx,
+ const char *hostname)
+{
+ NET_API_STATUS status = 0;
+ uint32_t levels[] = { 100, 101, 102, 402, 403, 502, 503, 1005 };
+ int i;
+
+ printf("NetServer tests\n");
+
+ /* basic queries */
+ for (i=0; i<ARRAY_SIZE(levels); i++) {
+ uint8_t *buffer = NULL;
+ printf("testing NetServerGetInfo level %d\n", levels[i]);
+
+ status = NetServerGetInfo(hostname, levels[i], &buffer);
+ if (status && status != 124) {
+ NETAPI_STATUS(ctx, status, "NetServerGetInfo");
+ goto out;
+ }
+ }
+
+ status = 0;
+
+ printf("NetServer tests succeeded\n");
+ out:
+ if (status != 0) {
+ printf("NetServer testsuite failed with: %s\n",
+ libnetapi_get_error_string(ctx, status));
+ }
+
+ return status;
+}
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 78431d93c8..b9a7f8788d 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1051,17 +1051,17 @@ static void open_socket_out_connected(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct open_socket_out_state *state = talloc_get_type_abort(
req->private_data, struct open_socket_out_state);
- NTSTATUS status;
+ int err;
int sys_errno;
- status = async_connect_recv(subreq, &sys_errno);
+ err = async_connect_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
- if (NT_STATUS_IS_OK(status)) {
+ if (err == 0) {
async_req_done(req);
return;
}
- if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)
+ if ((sys_errno == ETIME)
|| (sys_errno == EINPROGRESS)
|| (sys_errno == EALREADY)
|| (sys_errno == EAGAIN)) {
@@ -1082,7 +1082,7 @@ static void open_socket_out_connected(struct async_req *subreq)
}
if (!async_req_set_timeout(subreq, state->ev,
timeval_set(0, state->wait_nsec))) {
- async_req_nterror(req, NT_STATUS_NO_MEMORY);
+ async_req_error(req, ENOMEM);
return;
}
subreq->async.fn = open_socket_out_connected;
@@ -1098,17 +1098,17 @@ static void open_socket_out_connected(struct async_req *subreq)
#endif
/* real error */
- async_req_nterror(req, map_nt_error_from_unix(sys_errno));
+ async_req_error(req, sys_errno);
}
NTSTATUS open_socket_out_recv(struct async_req *req, int *pfd)
{
struct open_socket_out_state *state = talloc_get_type_abort(
req->private_data, struct open_socket_out_state);
- NTSTATUS status;
+ int err;
- if (async_req_is_nterror(req, &status)) {
- return status;
+ if (async_req_is_errno(req, &err)) {
+ return map_nt_error_from_unix(err);
}
*pfd = state->fd;
state->fd = -1;
diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c
index b56c0fd4d3..9bf6f29105 100644
--- a/source3/lib/wb_reqtrans.c
+++ b/source3/lib/wb_reqtrans.c
@@ -20,7 +20,7 @@
*/
#include "includes.h"
-#include "winbindd/winbindd.h"
+#include "wbc_async.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
@@ -32,6 +32,57 @@ struct req_read_state {
int fd;
};
+bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err)
+{
+ enum async_req_state state;
+ uint64_t error;
+ if (!async_req_is_error(req, &state, &error)) {
+ *pwbc_err = WBC_ERR_SUCCESS;
+ return false;
+ }
+
+ switch (state) {
+ case ASYNC_REQ_USER_ERROR:
+ *pwbc_err = error;
+ break;
+ case ASYNC_REQ_TIMED_OUT:
+ *pwbc_err = WBC_ERR_UNKNOWN_FAILURE;
+ break;
+ case ASYNC_REQ_NO_MEMORY:
+ *pwbc_err = WBC_ERR_NO_MEMORY;
+ break;
+ default:
+ *pwbc_err = WBC_ERR_UNKNOWN_FAILURE;
+ break;
+ }
+ return true;
+}
+
+wbcErr map_wbc_err_from_errno(int error)
+{
+ switch(error) {
+ case EPERM:
+ case EACCES:
+ return WBC_ERR_AUTH_ERROR;
+ case ENOMEM:
+ return WBC_ERR_NO_MEMORY;
+ case EIO:
+ default:
+ return WBC_ERR_UNKNOWN_FAILURE;
+ }
+}
+
+wbcErr async_req_simple_recv_wbcerr(struct async_req *req)
+{
+ wbcErr wbc_err;
+
+ if (async_req_is_wbcerr(req, &wbc_err)) {
+ return wbc_err;
+ }
+
+ return WBC_ERR_SUCCESS;
+}
+
static void wb_req_read_len(struct async_req *subreq);
static void wb_req_read_main(struct async_req *subreq);
static void wb_req_read_extra(struct async_req *subreq);
@@ -76,12 +127,13 @@ static void wb_req_read_len(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct req_read_state *state = talloc_get_type_abort(
req->private_data, struct req_read_state);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = recvall_recv(subreq);
+ ret = recvall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
@@ -89,7 +141,7 @@ static void wb_req_read_len(struct async_req *subreq)
DEBUG(0, ("wb_req_read_len: Invalid request size received: "
"%d (expected %d)\n", (int)state->wb_req->length,
(int)sizeof(struct winbindd_request)));
- async_req_nterror(req, NT_STATUS_INVALID_BUFFER_SIZE);
+ async_req_error(req, WBC_ERR_INVALID_RESPONSE);
return;
}
@@ -110,12 +162,13 @@ static void wb_req_read_main(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct req_read_state *state = talloc_get_type_abort(
req->private_data, struct req_read_state);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = recvall_recv(subreq);
+ ret = recvall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
@@ -124,7 +177,7 @@ static void wb_req_read_main(struct async_req *subreq)
DEBUG(3, ("Got request with %d bytes extra data on "
"unprivileged socket\n",
(int)state->wb_req->extra_len));
- async_req_nterror(req, NT_STATUS_INVALID_BUFFER_SIZE);
+ async_req_error(req, WBC_ERR_INVALID_RESPONSE);
return;
}
@@ -156,30 +209,31 @@ static void wb_req_read_extra(struct async_req *subreq)
{
struct async_req *req = talloc_get_type_abort(
subreq->async.priv, struct async_req);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = recvall_recv(subreq);
+ ret = recvall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
async_req_done(req);
}
-NTSTATUS wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
- struct winbindd_request **preq)
+wbcErr wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_request **preq)
{
struct req_read_state *state = talloc_get_type_abort(
req->private_data, struct req_read_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- if (async_req_is_nterror(req, &status)) {
- return status;
+ if (async_req_is_wbcerr(req, &wbc_err)) {
+ return wbc_err;
}
*preq = talloc_move(mem_ctx, &state->wb_req);
- return NT_STATUS_OK;
+ return WBC_ERR_SUCCESS;
}
struct req_write_state {
@@ -227,12 +281,13 @@ static void wb_req_write_main(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct req_write_state *state = talloc_get_type_abort(
req->private_data, struct req_write_state);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = sendall_recv(subreq);
+ ret = sendall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
@@ -256,21 +311,22 @@ static void wb_req_write_extra(struct async_req *subreq)
{
struct async_req *req = talloc_get_type_abort(
subreq->async.priv, struct async_req);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = sendall_recv(subreq);
+ ret = sendall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
async_req_done(req);
}
-NTSTATUS wb_req_write_recv(struct async_req *req)
+wbcErr wb_req_write_recv(struct async_req *req)
{
- return async_req_simple_recv_ntstatus(req);
+ return async_req_simple_recv_wbcerr(req);
}
struct resp_read_state {
@@ -322,12 +378,13 @@ static void wb_resp_read_len(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct resp_read_state *state = talloc_get_type_abort(
req->private_data, struct resp_read_state);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = recvall_recv(subreq);
+ ret = recvall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
@@ -336,7 +393,7 @@ static void wb_resp_read_len(struct async_req *subreq)
"%d (expected at least%d)\n",
(int)state->wb_resp->length,
(int)sizeof(struct winbindd_response)));
- async_req_nterror(req, NT_STATUS_INVALID_BUFFER_SIZE);
+ async_req_error(req, WBC_ERR_INVALID_RESPONSE);
return;
}
@@ -357,13 +414,14 @@ static void wb_resp_read_main(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct resp_read_state *state = talloc_get_type_abort(
req->private_data, struct resp_read_state);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
size_t extra_len;
- status = recvall_recv(subreq);
+ ret = recvall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
@@ -395,30 +453,31 @@ static void wb_resp_read_extra(struct async_req *subreq)
{
struct async_req *req = talloc_get_type_abort(
subreq->async.priv, struct async_req);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = recvall_recv(subreq);
+ ret = recvall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
async_req_done(req);
}
-NTSTATUS wb_resp_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
- struct winbindd_response **presp)
+wbcErr wb_resp_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presp)
{
struct resp_read_state *state = talloc_get_type_abort(
req->private_data, struct resp_read_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- if (async_req_is_nterror(req, &status)) {
- return status;
+ if (async_req_is_wbcerr(req, &wbc_err)) {
+ return wbc_err;
}
*presp = talloc_move(mem_ctx, &state->wb_resp);
- return NT_STATUS_OK;
+ return WBC_ERR_SUCCESS;
}
struct resp_write_state {
@@ -466,12 +525,13 @@ static void wb_resp_write_main(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct resp_write_state *state = talloc_get_type_abort(
req->private_data, struct resp_write_state);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = sendall_recv(subreq);
+ ret = sendall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (ret < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
@@ -496,19 +556,20 @@ static void wb_resp_write_extra(struct async_req *subreq)
{
struct async_req *req = talloc_get_type_abort(
subreq->async.priv, struct async_req);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = sendall_recv(subreq);
+ ret = sendall_recv(subreq, &err);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (err < 0) {
+ async_req_error(req, map_wbc_err_from_errno(err));
return;
}
async_req_done(req);
}
-NTSTATUS wb_resp_write_recv(struct async_req *req)
+wbcErr wb_resp_write_recv(struct async_req *req)
{
- return async_req_simple_recv_ntstatus(req);
+ return async_req_simple_recv_wbcerr(req);
}
diff --git a/source3/lib/wbclient.c b/source3/lib/wbclient.c
index ae9a034cc8..4d3a609530 100644
--- a/source3/lib/wbclient.c
+++ b/source3/lib/wbclient.c
@@ -18,8 +18,7 @@
*/
#include "includes.h"
-#include "winbindd/winbindd.h"
-#include "winbindd/winbindd_proto.h"
+#include "wbc_async.h"
static int make_nonstd_fd(int fd)
{
@@ -131,12 +130,6 @@ static bool winbind_closed_fd(int fd)
return false;
}
-struct wb_context {
- struct async_req_queue *queue;
- int fd;
- bool is_priv;
-};
-
struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx)
{
struct wb_context *result;
@@ -163,7 +156,7 @@ static struct async_req *wb_connect_send(TALLOC_CTX *mem_ctx,
struct sockaddr_un sunaddr;
struct stat st;
char *path = NULL;
- NTSTATUS status;
+ wbcErr wbc_err;
if (wb_ctx->fd != -1) {
close(wb_ctx->fd);
@@ -173,13 +166,13 @@ static struct async_req *wb_connect_send(TALLOC_CTX *mem_ctx,
/* Check permissions on unix socket directory */
if (lstat(dir, &st) == -1) {
- status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ wbc_err = WBC_ERR_WINBIND_NOT_AVAILABLE;
goto post_status;
}
if (!S_ISDIR(st.st_mode) ||
(st.st_uid != 0 && st.st_uid != geteuid())) {
- status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ wbc_err = WBC_ERR_WINBIND_NOT_AVAILABLE;
goto post_status;
}
@@ -202,13 +195,13 @@ static struct async_req *wb_connect_send(TALLOC_CTX *mem_ctx,
if ((lstat(sunaddr.sun_path, &st) == -1)
|| !S_ISSOCK(st.st_mode)
|| (st.st_uid != 0 && st.st_uid != geteuid())) {
- status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ wbc_err = WBC_ERR_WINBIND_NOT_AVAILABLE;
goto post_status;
}
wb_ctx->fd = make_safe_fd(socket(AF_UNIX, SOCK_STREAM, 0));
if (wb_ctx->fd == -1) {
- status = map_nt_error_from_unix(errno);
+ wbc_err = map_wbc_err_from_errno(errno);
goto post_status;
}
@@ -226,24 +219,22 @@ static struct async_req *wb_connect_send(TALLOC_CTX *mem_ctx,
return req;
nomem:
- status = NT_STATUS_NO_MEMORY;
+ wbc_err = WBC_ERR_NO_MEMORY;
post_status:
req = async_req_new(mem_ctx);
if (req == NULL) {
return NULL;
}
- if (async_post_ntstatus(req, ev, status)) {
+ if (async_post_error(req, ev, wbc_err)) {
return req;
}
TALLOC_FREE(req);
return NULL;
}
-static NTSTATUS wb_connect_recv(struct async_req *req)
+static wbcErr wb_connect_recv(struct async_req *req)
{
- int dummy;
-
- return async_connect_recv(req, &dummy);
+ return async_req_simple_recv_wbcerr(req);
}
static struct winbindd_request *winbindd_request_copy(
@@ -295,8 +286,8 @@ static struct async_req *wb_int_trans_send(TALLOC_CTX *mem_ctx,
}
if (winbind_closed_fd(fd)) {
- if (!async_post_ntstatus(result, ev,
- NT_STATUS_PIPE_DISCONNECTED)) {
+ if (!async_post_error(result, ev,
+ WBC_ERR_WINBIND_NOT_AVAILABLE)) {
goto fail;
}
return result;
@@ -329,18 +320,18 @@ static void wb_int_trans_write_done(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct wb_int_trans_state *state = talloc_get_type_abort(
req->private_data, struct wb_int_trans_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- status = wb_req_write_recv(subreq);
+ wbc_err = wb_req_write_recv(subreq);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (!WBC_ERROR_IS_OK(wbc_err)) {
+ async_req_error(req, wbc_err);
return;
}
subreq = wb_resp_read_send(state, state->ev, state->fd);
if (subreq == NULL) {
- async_req_nterror(req, NT_STATUS_NO_MEMORY);
+ async_req_error(req, WBC_ERR_NO_MEMORY);
}
subreq->async.fn = wb_int_trans_read_done;
subreq->async.priv = req;
@@ -352,32 +343,32 @@ static void wb_int_trans_read_done(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct wb_int_trans_state *state = talloc_get_type_abort(
req->private_data, struct wb_int_trans_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- status = wb_resp_read_recv(subreq, state, &state->wb_resp);
+ wbc_err = wb_resp_read_recv(subreq, state, &state->wb_resp);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (!WBC_ERROR_IS_OK(wbc_err)) {
+ async_req_error(req, wbc_err);
return;
}
async_req_done(req);
}
-static NTSTATUS wb_int_trans_recv(struct async_req *req,
- TALLOC_CTX *mem_ctx,
- struct winbindd_response **presponse)
+static wbcErr wb_int_trans_recv(struct async_req *req,
+ TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presponse)
{
struct wb_int_trans_state *state = talloc_get_type_abort(
req->private_data, struct wb_int_trans_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- if (async_req_is_nterror(req, &status)) {
- return status;
+ if (async_req_is_wbcerr(req, &wbc_err)) {
+ return wbc_err;
}
*presponse = talloc_move(mem_ctx, &state->wb_resp);
- return NT_STATUS_OK;
+ return WBC_ERR_SUCCESS;
}
static const char *winbindd_socket_dir(void)
@@ -448,13 +439,13 @@ static void wb_open_pipe_connect_nonpriv_done(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct wb_open_pipe_state *state = talloc_get_type_abort(
req->private_data, struct wb_open_pipe_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- status = wb_connect_recv(subreq);
+ wbc_err = wb_connect_recv(subreq);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
+ if (!WBC_ERROR_IS_OK(wbc_err)) {
state->wb_ctx->is_priv = true;
- async_req_nterror(req, status);
+ async_req_error(req, wbc_err);
return;
}
@@ -478,12 +469,12 @@ static void wb_open_pipe_ping_done(struct async_req *subreq)
struct wb_open_pipe_state *state = talloc_get_type_abort(
req->private_data, struct wb_open_pipe_state);
struct winbindd_response *wb_resp;
- NTSTATUS status;
+ wbcErr wbc_err;
- status = wb_int_trans_recv(subreq, state, &wb_resp);
+ wbc_err = wb_int_trans_recv(subreq, state, &wb_resp);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (!WBC_ERROR_IS_OK(wbc_err)) {
+ async_req_error(req, wbc_err);
return;
}
@@ -511,12 +502,12 @@ static void wb_open_pipe_getpriv_done(struct async_req *subreq)
struct wb_open_pipe_state *state = talloc_get_type_abort(
req->private_data, struct wb_open_pipe_state);
struct winbindd_response *wb_resp = NULL;
- NTSTATUS status;
+ wbcErr wbc_err;
- status = wb_int_trans_recv(subreq, state, &wb_resp);
+ wbc_err = wb_int_trans_recv(subreq, state, &wb_resp);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (!WBC_ERROR_IS_OK(wbc_err)) {
+ async_req_error(req, wbc_err);
return;
}
@@ -540,21 +531,21 @@ static void wb_open_pipe_connect_priv_done(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct wb_open_pipe_state *state = talloc_get_type_abort(
req->private_data, struct wb_open_pipe_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- status = wb_connect_recv(subreq);
+ wbc_err = wb_connect_recv(subreq);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ if (!WBC_ERROR_IS_OK(wbc_err)) {
+ async_req_error(req, wbc_err);
return;
}
state->wb_ctx->is_priv = true;
async_req_done(req);
}
-static NTSTATUS wb_open_pipe_recv(struct async_req *req)
+static wbcErr wb_open_pipe_recv(struct async_req *req)
{
- return async_req_simple_recv_ntstatus(req);
+ return async_req_simple_recv_wbcerr(req);
}
struct wb_trans_state {
@@ -631,27 +622,26 @@ struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
static bool wb_trans_retry(struct async_req *req,
struct wb_trans_state *state,
- NTSTATUS status)
+ wbcErr wbc_err)
{
struct async_req *subreq;
- if (NT_STATUS_IS_OK(status)) {
+ if (WBC_ERROR_IS_OK(wbc_err)) {
return false;
}
- if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)
- || NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
+ if (wbc_err == WBC_ERR_WINBIND_NOT_AVAILABLE) {
/*
* Winbind not around or we can't connect to the pipe. Fail
* immediately.
*/
- async_req_nterror(req, status);
+ async_req_error(req, wbc_err);
return true;
}
state->num_retries -= 1;
if (state->num_retries == 0) {
- async_req_nterror(req, status);
+ async_req_error(req, wbc_err);
return true;
}
@@ -685,7 +675,7 @@ static void wb_trans_retry_wait_done(struct async_req *subreq)
ret = async_wait_recv(subreq);
TALLOC_FREE(subreq);
if (ret) {
- async_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
+ async_req_error(req, WBC_ERR_UNKNOWN_FAILURE);
return;
}
@@ -704,12 +694,12 @@ static void wb_trans_connect_done(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct wb_trans_state *state = talloc_get_type_abort(
req->private_data, struct wb_trans_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- status = wb_open_pipe_recv(subreq);
+ wbc_err = wb_open_pipe_recv(subreq);
TALLOC_FREE(subreq);
- if (wb_trans_retry(req, state, status)) {
+ if (wb_trans_retry(req, state, wbc_err)) {
return;
}
@@ -729,29 +719,29 @@ static void wb_trans_done(struct async_req *subreq)
subreq->async.priv, struct async_req);
struct wb_trans_state *state = talloc_get_type_abort(
req->private_data, struct wb_trans_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- status = wb_int_trans_recv(subreq, state, &state->wb_resp);
+ wbc_err = wb_int_trans_recv(subreq, state, &state->wb_resp);
TALLOC_FREE(subreq);
- if (wb_trans_retry(req, state, status)) {
+ if (wb_trans_retry(req, state, wbc_err)) {
return;
}
async_req_done(req);
}
-NTSTATUS wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
- struct winbindd_response **presponse)
+wbcErr wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presponse)
{
struct wb_trans_state *state = talloc_get_type_abort(
req->private_data, struct wb_trans_state);
- NTSTATUS status;
+ wbcErr wbc_err;
- if (async_req_is_nterror(req, &status)) {
- return status;
+ if (async_req_is_wbcerr(req, &wbc_err)) {
+ return wbc_err;
}
*presponse = talloc_move(mem_ctx, &state->wb_resp);
- return NT_STATUS_OK;
+ return WBC_ERR_SUCCESS;
}
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index b752fc2124..56d7b061a1 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -56,47 +56,14 @@ kerb_prompter(krb5_context ctx, void *data,
return 0;
}
-static bool smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx,
- DATA_BLOB *edata_blob,
- KRB5_EDATA_NTSTATUS *edata)
-{
- bool ret = False;
- prs_struct ps;
-
- if (!mem_ctx || !edata_blob || !edata)
- return False;
-
- if (!prs_init(&ps, edata_blob->length, mem_ctx, UNMARSHALL))
- return False;
-
- if (!prs_copy_data_in(&ps, (char *)edata_blob->data, edata_blob->length))
- goto out;
-
- prs_set_offset(&ps, 0);
-
- if (!prs_ntstatus("ntstatus", &ps, 1, &edata->ntstatus))
- goto out;
-
- if (!prs_uint32("unknown1", &ps, 1, &edata->unknown1))
- goto out;
-
- if (!prs_uint32("unknown2", &ps, 1, &edata->unknown2)) /* only seen 00000001 here */
- goto out;
-
- ret = True;
- out:
- prs_mem_free(&ps);
-
- return ret;
-}
-
static bool smb_krb5_get_ntstatus_from_krb5_error(krb5_error *error,
NTSTATUS *nt_status)
{
DATA_BLOB edata;
DATA_BLOB unwrapped_edata;
TALLOC_CTX *mem_ctx;
- KRB5_EDATA_NTSTATUS parsed_edata;
+ struct KRB5_EDATA_NTSTATUS parsed_edata;
+ enum ndr_err_code ndr_err;
#ifdef HAVE_E_DATA_POINTER_IN_KRB5_ERROR
edata = data_blob(error->e_data->data, error->e_data->length);
@@ -122,7 +89,10 @@ static bool smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx,
data_blob_free(&edata);
- if (!smb_krb5_err_io_nstatus(mem_ctx, &unwrapped_edata, &parsed_edata)) {
+ ndr_err = ndr_pull_struct_blob_all(&unwrapped_edata, mem_ctx, NULL,
+ &parsed_edata,
+ (ndr_pull_flags_fn_t)ndr_pull_KRB5_EDATA_NTSTATUS);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
data_blob_free(&unwrapped_edata);
TALLOC_FREE(mem_ctx);
return False;
diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c
index 169c3bba1d..023acaa638 100644
--- a/source3/libads/ldap_printer.c
+++ b/source3/libads/ldap_printer.c
@@ -369,7 +369,7 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
TALLOC_FREE( dsdriver_ctr );
TALLOC_FREE( dsspooler_ctr );
- rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
return result;
}
diff --git a/source3/librpc/gen_ndr/libnetapi.h b/source3/librpc/gen_ndr/libnetapi.h
index ae7acbf572..23a18331fe 100644
--- a/source3/librpc/gen_ndr/libnetapi.h
+++ b/source3/librpc/gen_ndr/libnetapi.h
@@ -107,10 +107,623 @@ struct SERVER_INFO_102 {
const char * sv102_userpath;
};
+struct SERVER_INFO_402 {
+ uint32_t sv402_ulist_mtime;
+ uint32_t sv402_glist_mtime;
+ uint32_t sv402_alist_mtime;
+ const char * sv402_alerts;
+ uint32_t sv402_security;
+ uint32_t sv402_numadmin;
+ uint32_t sv402_lanmask;
+ const char * sv402_guestacct;
+ uint32_t sv402_chdevs;
+ uint32_t sv402_chdevq;
+ uint32_t sv402_chdevjobs;
+ uint32_t sv402_connections;
+ uint32_t sv402_shares;
+ uint32_t sv402_openfiles;
+ uint32_t sv402_sessopens;
+ uint32_t sv402_sessvcs;
+ uint32_t sv402_sessreqs;
+ uint32_t sv402_opensearch;
+ uint32_t sv402_activelocks;
+ uint32_t sv402_numreqbuf;
+ uint32_t sv402_sizreqbuf;
+ uint32_t sv402_numbigbuf;
+ uint32_t sv402_numfiletasks;
+ uint32_t sv402_alertsched;
+ uint32_t sv402_erroralert;
+ uint32_t sv402_logonalert;
+ uint32_t sv402_accessalert;
+ uint32_t sv402_diskalert;
+ uint32_t sv402_netioalert;
+ uint32_t sv402_maxauditsz;
+ const char * sv402_srvheuristics;
+};
+
+struct SERVER_INFO_403 {
+ uint32_t sv403_ulist_mtime;
+ uint32_t sv403_glist_mtime;
+ uint32_t sv403_alist_mtime;
+ const char * sv403_alerts;
+ uint32_t sv403_security;
+ uint32_t sv403_numadmin;
+ uint32_t sv403_lanmask;
+ const char * sv403_guestacct;
+ uint32_t sv403_chdevs;
+ uint32_t sv403_chdevq;
+ uint32_t sv403_chdevjobs;
+ uint32_t sv403_connections;
+ uint32_t sv403_shares;
+ uint32_t sv403_openfiles;
+ uint32_t sv403_sessopens;
+ uint32_t sv403_sessvcs;
+ uint32_t sv403_sessreqs;
+ uint32_t sv403_opensearch;
+ uint32_t sv403_activelocks;
+ uint32_t sv403_numreqbuf;
+ uint32_t sv403_sizreqbuf;
+ uint32_t sv403_numbigbuf;
+ uint32_t sv403_numfiletasks;
+ uint32_t sv403_alertsched;
+ uint32_t sv403_erroralert;
+ uint32_t sv403_logonalert;
+ uint32_t sv403_accessalert;
+ uint32_t sv403_diskalert;
+ uint32_t sv403_netioalert;
+ uint32_t sv403_maxauditsz;
+ const char * sv403_srvheuristics;
+ uint32_t sv403_auditedevents;
+ uint32_t sv403_autoprofile;
+ const char * sv403_autopath;
+};
+
+struct SERVER_INFO_502 {
+ uint32_t sv502_sessopens;
+ uint32_t sv502_sessvcs;
+ uint32_t sv502_opensearch;
+ uint32_t sv502_sizreqbuf;
+ uint32_t sv502_initworkitems;
+ uint32_t sv502_maxworkitems;
+ uint32_t sv502_rawworkitems;
+ uint32_t sv502_irpstacksize;
+ uint32_t sv502_maxrawbuflen;
+ uint32_t sv502_sessusers;
+ uint32_t sv502_sessconns;
+ uint32_t sv502_maxpagedmemoryusage;
+ uint32_t sv502_maxnonpagedmemoryusage;
+ uint8_t sv502_enablesoftcompat;
+ uint8_t sv502_enableforcedlogoff;
+ uint8_t sv502_timesource;
+ uint8_t sv502_acceptdownlevelapis;
+ uint8_t sv502_lmannounce;
+};
+
+struct SERVER_INFO_503 {
+ uint32_t sv503_sessopens;
+ uint32_t sv503_sessvcs;
+ uint32_t sv503_opensearch;
+ uint32_t sv503_sizreqbuf;
+ uint32_t sv503_initworkitems;
+ uint32_t sv503_maxworkitems;
+ uint32_t sv503_rawworkitems;
+ uint32_t sv503_irpstacksize;
+ uint32_t sv503_maxrawbuflen;
+ uint32_t sv503_sessusers;
+ uint32_t sv503_sessconns;
+ uint32_t sv503_maxpagedmemoryusage;
+ uint32_t sv503_maxnonpagedmemoryusage;
+ uint8_t sv503_enablesoftcompat;
+ uint8_t sv503_enableforcedlogoff;
+ uint8_t sv503_timesource;
+ uint8_t sv503_acceptdownlevelapis;
+ uint8_t sv503_lmannounce;
+ const char * sv503_domain;
+ uint32_t sv503_maxcopyreadlen;
+ uint32_t sv503_maxcopywritelen;
+ uint32_t sv503_minkeepsearch;
+ uint32_t sv503_maxkeepsearch;
+ uint32_t sv503_minkeepcomplsearch;
+ uint32_t sv503_maxkeepcomplsearch;
+ uint32_t sv503_threadcountadd;
+ uint32_t sv503_numblockthreads;
+ uint32_t sv503_scavtimeout;
+ uint32_t sv503_minrcvqueue;
+ uint32_t sv503_minfreeworkitems;
+ uint32_t sv503_xactmemsize;
+ uint32_t sv503_threadpriority;
+ uint32_t sv503_maxmpxct;
+ uint32_t sv503_oplockbreakwait;
+ uint32_t sv503_oplockbreakresponsewait;
+ uint8_t sv503_enableoplocks;
+ uint8_t sv503_enableoplockforceclose;
+ uint8_t sv503_enablefcbopens;
+ uint8_t sv503_enableraw;
+ uint8_t sv503_enablesharednetdrives;
+ uint32_t sv503_minfreeconnections;
+ uint32_t sv503_maxfreeconnections;
+};
+
+struct SERVER_INFO_599 {
+ uint32_t sv599_sessopens;
+ uint32_t sv599_sessvcs;
+ uint32_t sv599_opensearch;
+ uint32_t sv599_sizreqbuf;
+ uint32_t sv599_initworkitems;
+ uint32_t sv599_maxworkitems;
+ uint32_t sv599_rawworkitems;
+ uint32_t sv599_irpstacksize;
+ uint32_t sv599_maxrawbuflen;
+ uint32_t sv599_sessusers;
+ uint32_t sv599_sessconns;
+ uint32_t sv599_maxpagedmemoryusage;
+ uint32_t sv599_maxnonpagedmemoryusage;
+ uint8_t sv599_enablesoftcompat;
+ uint8_t sv599_enableforcedlogoff;
+ uint8_t sv599_timesource;
+ uint8_t sv599_acceptdownlevelapis;
+ uint8_t sv599_lmannounce;
+ const char * sv599_domain;
+ uint32_t sv599_maxcopyreadlen;
+ uint32_t sv599_maxcopywritelen;
+ uint32_t sv599_minkeepsearch;
+ uint32_t sv599_maxkeepsearch;
+ uint32_t sv599_minkeepcomplsearch;
+ uint32_t sv599_maxkeepcomplsearch;
+ uint32_t sv599_threadcountadd;
+ uint32_t sv599_numblockthreads;
+ uint32_t sv599_scavtimeout;
+ uint32_t sv599_minrcvqueue;
+ uint32_t sv599_minfreeworkitems;
+ uint32_t sv599_xactmemsize;
+ uint32_t sv599_threadpriority;
+ uint32_t sv599_maxmpxct;
+ uint32_t sv599_oplockbreakwait;
+ uint32_t sv599_oplockbreakresponsewait;
+ uint8_t sv599_enableoplocks;
+ uint8_t sv599_enableoplockforceclose;
+ uint8_t sv599_enablefcbopens;
+ uint8_t sv599_enableraw;
+ uint8_t sv599_enablesharednetdrives;
+ uint32_t sv599_minfreeconnections;
+ uint32_t sv599_maxfreeconnections;
+ uint32_t sv599_initsesstable;
+ uint32_t sv599_initconntable;
+ uint32_t sv599_initfiletable;
+ uint32_t sv599_initsearchtable;
+ uint32_t sv599_alertschedule;
+ uint32_t sv599_errorthreshold;
+ uint32_t sv599_networkerrorthreshold;
+ uint32_t sv599_diskspacethreshold;
+ uint32_t sv599_reserved;
+ uint32_t sv599_maxlinkdelay;
+ uint32_t sv599_minlinkthroughput;
+ uint32_t sv599_linkinfovalidtime;
+ uint32_t sv599_scavqosinfoupdatetime;
+ uint32_t sv599_maxworkitemidletime;
+};
+
+struct SERVER_INFO_598 {
+ uint32_t sv598_maxrawworkitems;
+ uint32_t sv598_maxthreadsperqueue;
+ uint32_t sv598_producttype;
+ uint32_t sv598_serversize;
+ uint32_t sv598_connectionlessautodisc;
+ uint32_t sv598_sharingviolationretries;
+ uint32_t sv598_sharingviolationdelay;
+ uint32_t sv598_maxglobalopensearch;
+ uint32_t sv598_removeduplicatesearches;
+ uint32_t sv598_lockviolationoffset;
+ uint32_t sv598_lockviolationdelay;
+ uint32_t sv598_mdlreadswitchover;
+ uint32_t sv598_cachedopenlimit;
+ uint32_t sv598_otherqueueaffinity;
+ uint8_t sv598_restrictnullsessaccess;
+ uint8_t sv598_enablewfw311directipx;
+ uint32_t sv598_queuesamplesecs;
+ uint32_t sv598_balancecount;
+ uint32_t sv598_preferredaffinity;
+ uint32_t sv598_maxfreerfcbs;
+ uint32_t sv598_maxfreemfcbs;
+ uint32_t sv598_maxfreelfcbs;
+ uint32_t sv598_maxfreepagedpoolchunks;
+ uint32_t sv598_minpagedpoolchunksize;
+ uint32_t sv598_maxpagedpoolchunksize;
+ uint8_t sv598_sendsfrompreferredprocessor;
+ uint32_t sv598_cacheddirectorylimit;
+ uint32_t sv598_maxcopylength;
+ uint8_t sv598_enablecompression;
+ uint8_t sv598_autosharewks;
+ uint8_t sv598_autoshareserver;
+ uint8_t sv598_enablesecuritysignature;
+ uint8_t sv598_requiresecuritysignature;
+ uint32_t sv598_minclientbuffersize;
+ struct GUID sv598_serverguid;
+ uint32_t sv598_ConnectionNoSessionsTimeout;
+ uint32_t sv598_IdleThreadTimeOut;
+ uint8_t sv598_enableW9xsecuritysignature;
+ uint8_t sv598_enforcekerberosreauthentication;
+ uint8_t sv598_disabledos;
+ uint32_t sv598_lowdiskspaceminimum;
+ uint8_t sv598_disablestrictnamechecking;
+};
+
struct SERVER_INFO_1005 {
const char * sv1005_comment;
};
+struct SERVER_INFO_1107 {
+ uint32_t sv1107_users;
+};
+
+struct SERVER_INFO_1010 {
+ int32_t sv1010_disc;
+};
+
+struct SERVER_INFO_1016 {
+ uint8_t sv1016_hidden;
+};
+
+struct SERVER_INFO_1017 {
+ uint32_t sv1017_announce;
+};
+
+struct SERVER_INFO_1018 {
+ uint32_t sv1018_anndelta;
+};
+
+struct SERVER_INFO_1501 {
+ uint32_t sv1501_sessopens;
+};
+
+struct SERVER_INFO_1502 {
+ uint32_t sv1502_sessvcs;
+};
+
+struct SERVER_INFO_1503 {
+ uint32_t sv1503_opensearch;
+};
+
+struct SERVER_INFO_1506 {
+ uint32_t sv1506_maxworkitems;
+};
+
+struct SERVER_INFO_1509 {
+ uint32_t sv1509_maxrawbuflen;
+};
+
+struct SERVER_INFO_1510 {
+ uint32_t sv1510_sessusers;
+};
+
+struct SERVER_INFO_1511 {
+ uint32_t sv1511_sessconns;
+};
+
+struct SERVER_INFO_1512 {
+ uint32_t sv1512_maxnonpagedmemoryusage;
+};
+
+struct SERVER_INFO_1513 {
+ uint32_t sv1513_maxpagedmemoryusage;
+};
+
+struct SERVER_INFO_1514 {
+ uint8_t sv1514_enablesoftcompat;
+};
+
+struct SERVER_INFO_1515 {
+ uint8_t sv1515_enableforcedlogoff;
+};
+
+struct SERVER_INFO_1516 {
+ uint8_t sv1516_timesource;
+};
+
+struct SERVER_INFO_1518 {
+ uint8_t sv1518_lmannounce;
+};
+
+struct SERVER_INFO_1520 {
+ uint32_t sv1520_maxcopyreadlen;
+};
+
+struct SERVER_INFO_1521 {
+ uint32_t sv1521_maxcopywritelen;
+};
+
+struct SERVER_INFO_1522 {
+ uint32_t sv1522_minkeepsearch;
+};
+
+struct SERVER_INFO_1523 {
+ uint32_t sv1523_maxkeepsearch;
+};
+
+struct SERVER_INFO_1524 {
+ uint32_t sv1524_minkeepcomplsearch;
+};
+
+struct SERVER_INFO_1525 {
+ uint32_t sv1525_maxkeepcomplsearch;
+};
+
+struct SERVER_INFO_1528 {
+ uint32_t sv1528_scavtimeout;
+};
+
+struct SERVER_INFO_1529 {
+ uint32_t sv1529_minrcvqueue;
+};
+
+struct SERVER_INFO_1530 {
+ uint32_t sv1530_minfreeworkitems;
+};
+
+struct SERVER_INFO_1533 {
+ uint32_t sv1533_maxmpxct;
+};
+
+struct SERVER_INFO_1534 {
+ uint32_t sv1534_oplockbreakwait;
+};
+
+struct SERVER_INFO_1535 {
+ uint32_t sv1535_oplockbreakresponsewait;
+};
+
+struct SERVER_INFO_1536 {
+ uint8_t sv1536_enableoplocks;
+};
+
+struct SERVER_INFO_1537 {
+ uint8_t sv1537_enableoplockforceclose;
+};
+
+struct SERVER_INFO_1538 {
+ uint8_t sv1538_enablefcbopens;
+};
+
+struct SERVER_INFO_1539 {
+ uint8_t sv1539_enableraw;
+};
+
+struct SERVER_INFO_1540 {
+ uint8_t sv1540_enablesharednetdrives;
+};
+
+struct SERVER_INFO_1541 {
+ uint8_t sv1541_minfreeconnections;
+};
+
+struct SERVER_INFO_1542 {
+ uint8_t sv1542_maxfreeconnections;
+};
+
+struct SERVER_INFO_1543 {
+ uint32_t sv1543_initsesstable;
+};
+
+struct SERVER_INFO_1544 {
+ uint32_t sv1544_initconntable;
+};
+
+struct SERVER_INFO_1545 {
+ uint32_t sv1545_initfiletable;
+};
+
+struct SERVER_INFO_1546 {
+ uint32_t sv1546_initsearchtable;
+};
+
+struct SERVER_INFO_1547 {
+ uint32_t sv1547_alertschedule;
+};
+
+struct SERVER_INFO_1548 {
+ uint32_t sv1548_errorthreshold;
+};
+
+struct SERVER_INFO_1549 {
+ uint32_t sv1549_networkerrorthreshold;
+};
+
+struct SERVER_INFO_1550 {
+ uint32_t sv1550_diskspacethreshold;
+};
+
+struct SERVER_INFO_1552 {
+ uint32_t sv1552_maxlinkdelay;
+};
+
+struct SERVER_INFO_1553 {
+ uint32_t sv1553_minlinkthroughput;
+};
+
+struct SERVER_INFO_1554 {
+ uint32_t sv1554_linkinfovalidtime;
+};
+
+struct SERVER_INFO_1555 {
+ uint32_t sv1555_scavqosinfoupdatetime;
+};
+
+struct SERVER_INFO_1556 {
+ uint32_t sv1556_maxworkitemidletime;
+};
+
+struct SERVER_INFO_1557 {
+ uint32_t sv1557_maxrawworkitems;
+};
+
+struct SERVER_INFO_1560 {
+ uint32_t sv1560_producttype;
+};
+
+struct SERVER_INFO_1561 {
+ uint32_t sv1561_serversize;
+};
+
+struct SERVER_INFO_1562 {
+ uint32_t sv1562_connectionlessautodisc;
+};
+
+struct SERVER_INFO_1563 {
+ uint32_t sv1563_sharingviolationretries;
+};
+
+struct SERVER_INFO_1564 {
+ uint32_t sv1564_sharingviolationdelay;
+};
+
+struct SERVER_INFO_1565 {
+ uint32_t sv1565_maxglobalopensearch;
+};
+
+struct SERVER_INFO_1566 {
+ uint8_t sv1566_removeduplicatesearches;
+};
+
+struct SERVER_INFO_1567 {
+ uint32_t sv1567_lockviolationretries;
+};
+
+struct SERVER_INFO_1568 {
+ uint32_t sv1568_lockviolationoffset;
+};
+
+struct SERVER_INFO_1569 {
+ uint32_t sv1569_lockviolationdelay;
+};
+
+struct SERVER_INFO_1570 {
+ uint32_t sv1570_mdlreadswitchover;
+};
+
+struct SERVER_INFO_1571 {
+ uint32_t sv1571_cachedopenlimit;
+};
+
+struct SERVER_INFO_1572 {
+ uint32_t sv1572_criticalthreads;
+};
+
+struct SERVER_INFO_1573 {
+ uint32_t sv1573_restrictnullsessaccess;
+};
+
+struct SERVER_INFO_1574 {
+ uint32_t sv1574_enablewfw311directipx;
+};
+
+struct SERVER_INFO_1575 {
+ uint32_t sv1575_otherqueueaffinity;
+};
+
+struct SERVER_INFO_1576 {
+ uint32_t sv1576_queuesamplesecs;
+};
+
+struct SERVER_INFO_1577 {
+ uint32_t sv1577_balancecount;
+};
+
+struct SERVER_INFO_1578 {
+ uint32_t sv1578_preferredaffinity;
+};
+
+struct SERVER_INFO_1579 {
+ uint32_t sv1579_maxfreerfcbs;
+};
+
+struct SERVER_INFO_1580 {
+ uint32_t sv1580_maxfreemfcbs;
+};
+
+struct SERVER_INFO_1581 {
+ uint32_t sv1581_maxfreemlcbs;
+};
+
+struct SERVER_INFO_1582 {
+ uint32_t sv1582_maxfreepagedpoolchunks;
+};
+
+struct SERVER_INFO_1583 {
+ uint32_t sv1583_minpagedpoolchunksize;
+};
+
+struct SERVER_INFO_1584 {
+ uint32_t sv1584_maxpagedpoolchunksize;
+};
+
+struct SERVER_INFO_1585 {
+ uint8_t sv1585_sendsfrompreferredprocessor;
+};
+
+struct SERVER_INFO_1586 {
+ uint32_t sv1586_maxthreadsperqueue;
+};
+
+struct SERVER_INFO_1587 {
+ uint32_t sv1587_cacheddirectorylimit;
+};
+
+struct SERVER_INFO_1588 {
+ uint32_t sv1588_maxcopylength;
+};
+
+struct SERVER_INFO_1590 {
+ uint32_t sv1590_enablecompression;
+};
+
+struct SERVER_INFO_1591 {
+ uint32_t sv1591_autosharewks;
+};
+
+struct SERVER_INFO_1592 {
+ uint32_t sv1592_autosharewks;
+};
+
+struct SERVER_INFO_1593 {
+ uint32_t sv1593_enablesecuritysignature;
+};
+
+struct SERVER_INFO_1594 {
+ uint32_t sv1594_requiresecuritysignature;
+};
+
+struct SERVER_INFO_1595 {
+ uint32_t sv1595_minclientbuffersize;
+};
+
+struct SERVER_INFO_1596 {
+ uint32_t sv1596_ConnectionNoSessionsTimeout;
+};
+
+struct SERVER_INFO_1597 {
+ uint32_t sv1597_IdleThreadTimeOut;
+};
+
+struct SERVER_INFO_1598 {
+ uint32_t sv1598_enableW9xsecuritysignature;
+};
+
+struct SERVER_INFO_1599 {
+ uint8_t sv1598_enforcekerberosreauthentication;
+};
+
+struct SERVER_INFO_1600 {
+ uint8_t sv1598_disabledos;
+};
+
+struct SERVER_INFO_1601 {
+ uint32_t sv1598_lowdiskspaceminimum;
+};
+
+struct SERVER_INFO_1602 {
+ uint8_t sv_1598_disablestrictnamechecking;
+};
+
struct DOMAIN_CONTROLLER_INFO {
const char * domain_controller_name;
const char * domain_controller_address;
diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.c b/source3/librpc/gen_ndr/ndr_libnetapi.c
index a11362b1c7..856e8a0c4e 100644
--- a/source3/librpc/gen_ndr/ndr_libnetapi.c
+++ b/source3/librpc/gen_ndr/ndr_libnetapi.c
@@ -264,6 +264,837 @@ _PUBLIC_ void ndr_print_SERVER_INFO_102(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_402(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_402 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_ulist_mtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_glist_mtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_alist_mtime));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv402_alerts));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_security));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_numadmin));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_lanmask));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv402_guestacct));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_chdevs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_chdevq));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_chdevjobs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_connections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_shares));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_openfiles));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_sessopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_sessvcs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_sessreqs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_activelocks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_numreqbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_sizreqbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_numbigbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_numfiletasks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_alertsched));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_erroralert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_logonalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_accessalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_diskalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_netioalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv402_maxauditsz));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv402_srvheuristics));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_402(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_402 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_ulist_mtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_glist_mtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_alist_mtime));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv402_alerts));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_security));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_numadmin));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_lanmask));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv402_guestacct));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_chdevs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_chdevq));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_chdevjobs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_connections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_shares));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_openfiles));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_sessopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_sessvcs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_sessreqs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_activelocks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_numreqbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_sizreqbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_numbigbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_numfiletasks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_alertsched));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_erroralert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_logonalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_accessalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_diskalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_netioalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv402_maxauditsz));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv402_srvheuristics));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_402(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_402 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_402");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv402_ulist_mtime", r->sv402_ulist_mtime);
+ ndr_print_uint32(ndr, "sv402_glist_mtime", r->sv402_glist_mtime);
+ ndr_print_uint32(ndr, "sv402_alist_mtime", r->sv402_alist_mtime);
+ ndr_print_string(ndr, "sv402_alerts", r->sv402_alerts);
+ ndr_print_uint32(ndr, "sv402_security", r->sv402_security);
+ ndr_print_uint32(ndr, "sv402_numadmin", r->sv402_numadmin);
+ ndr_print_uint32(ndr, "sv402_lanmask", r->sv402_lanmask);
+ ndr_print_string(ndr, "sv402_guestacct", r->sv402_guestacct);
+ ndr_print_uint32(ndr, "sv402_chdevs", r->sv402_chdevs);
+ ndr_print_uint32(ndr, "sv402_chdevq", r->sv402_chdevq);
+ ndr_print_uint32(ndr, "sv402_chdevjobs", r->sv402_chdevjobs);
+ ndr_print_uint32(ndr, "sv402_connections", r->sv402_connections);
+ ndr_print_uint32(ndr, "sv402_shares", r->sv402_shares);
+ ndr_print_uint32(ndr, "sv402_openfiles", r->sv402_openfiles);
+ ndr_print_uint32(ndr, "sv402_sessopens", r->sv402_sessopens);
+ ndr_print_uint32(ndr, "sv402_sessvcs", r->sv402_sessvcs);
+ ndr_print_uint32(ndr, "sv402_sessreqs", r->sv402_sessreqs);
+ ndr_print_uint32(ndr, "sv402_opensearch", r->sv402_opensearch);
+ ndr_print_uint32(ndr, "sv402_activelocks", r->sv402_activelocks);
+ ndr_print_uint32(ndr, "sv402_numreqbuf", r->sv402_numreqbuf);
+ ndr_print_uint32(ndr, "sv402_sizreqbuf", r->sv402_sizreqbuf);
+ ndr_print_uint32(ndr, "sv402_numbigbuf", r->sv402_numbigbuf);
+ ndr_print_uint32(ndr, "sv402_numfiletasks", r->sv402_numfiletasks);
+ ndr_print_uint32(ndr, "sv402_alertsched", r->sv402_alertsched);
+ ndr_print_uint32(ndr, "sv402_erroralert", r->sv402_erroralert);
+ ndr_print_uint32(ndr, "sv402_logonalert", r->sv402_logonalert);
+ ndr_print_uint32(ndr, "sv402_accessalert", r->sv402_accessalert);
+ ndr_print_uint32(ndr, "sv402_diskalert", r->sv402_diskalert);
+ ndr_print_uint32(ndr, "sv402_netioalert", r->sv402_netioalert);
+ ndr_print_uint32(ndr, "sv402_maxauditsz", r->sv402_maxauditsz);
+ ndr_print_string(ndr, "sv402_srvheuristics", r->sv402_srvheuristics);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_403(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_403 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_ulist_mtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_glist_mtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_alist_mtime));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv403_alerts));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_security));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_numadmin));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_lanmask));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv403_guestacct));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_chdevs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_chdevq));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_chdevjobs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_connections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_shares));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_openfiles));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_sessopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_sessvcs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_sessreqs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_activelocks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_numreqbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_sizreqbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_numbigbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_numfiletasks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_alertsched));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_erroralert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_logonalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_accessalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_diskalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_netioalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_maxauditsz));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv403_srvheuristics));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_auditedevents));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv403_autoprofile));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv403_autopath));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_403(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_403 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_ulist_mtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_glist_mtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_alist_mtime));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv403_alerts));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_security));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_numadmin));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_lanmask));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv403_guestacct));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_chdevs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_chdevq));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_chdevjobs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_connections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_shares));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_openfiles));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_sessopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_sessvcs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_sessreqs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_activelocks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_numreqbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_sizreqbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_numbigbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_numfiletasks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_alertsched));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_erroralert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_logonalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_accessalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_diskalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_netioalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_maxauditsz));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv403_srvheuristics));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_auditedevents));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv403_autoprofile));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv403_autopath));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_403(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_403 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_403");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv403_ulist_mtime", r->sv403_ulist_mtime);
+ ndr_print_uint32(ndr, "sv403_glist_mtime", r->sv403_glist_mtime);
+ ndr_print_uint32(ndr, "sv403_alist_mtime", r->sv403_alist_mtime);
+ ndr_print_string(ndr, "sv403_alerts", r->sv403_alerts);
+ ndr_print_uint32(ndr, "sv403_security", r->sv403_security);
+ ndr_print_uint32(ndr, "sv403_numadmin", r->sv403_numadmin);
+ ndr_print_uint32(ndr, "sv403_lanmask", r->sv403_lanmask);
+ ndr_print_string(ndr, "sv403_guestacct", r->sv403_guestacct);
+ ndr_print_uint32(ndr, "sv403_chdevs", r->sv403_chdevs);
+ ndr_print_uint32(ndr, "sv403_chdevq", r->sv403_chdevq);
+ ndr_print_uint32(ndr, "sv403_chdevjobs", r->sv403_chdevjobs);
+ ndr_print_uint32(ndr, "sv403_connections", r->sv403_connections);
+ ndr_print_uint32(ndr, "sv403_shares", r->sv403_shares);
+ ndr_print_uint32(ndr, "sv403_openfiles", r->sv403_openfiles);
+ ndr_print_uint32(ndr, "sv403_sessopens", r->sv403_sessopens);
+ ndr_print_uint32(ndr, "sv403_sessvcs", r->sv403_sessvcs);
+ ndr_print_uint32(ndr, "sv403_sessreqs", r->sv403_sessreqs);
+ ndr_print_uint32(ndr, "sv403_opensearch", r->sv403_opensearch);
+ ndr_print_uint32(ndr, "sv403_activelocks", r->sv403_activelocks);
+ ndr_print_uint32(ndr, "sv403_numreqbuf", r->sv403_numreqbuf);
+ ndr_print_uint32(ndr, "sv403_sizreqbuf", r->sv403_sizreqbuf);
+ ndr_print_uint32(ndr, "sv403_numbigbuf", r->sv403_numbigbuf);
+ ndr_print_uint32(ndr, "sv403_numfiletasks", r->sv403_numfiletasks);
+ ndr_print_uint32(ndr, "sv403_alertsched", r->sv403_alertsched);
+ ndr_print_uint32(ndr, "sv403_erroralert", r->sv403_erroralert);
+ ndr_print_uint32(ndr, "sv403_logonalert", r->sv403_logonalert);
+ ndr_print_uint32(ndr, "sv403_accessalert", r->sv403_accessalert);
+ ndr_print_uint32(ndr, "sv403_diskalert", r->sv403_diskalert);
+ ndr_print_uint32(ndr, "sv403_netioalert", r->sv403_netioalert);
+ ndr_print_uint32(ndr, "sv403_maxauditsz", r->sv403_maxauditsz);
+ ndr_print_string(ndr, "sv403_srvheuristics", r->sv403_srvheuristics);
+ ndr_print_uint32(ndr, "sv403_auditedevents", r->sv403_auditedevents);
+ ndr_print_uint32(ndr, "sv403_autoprofile", r->sv403_autoprofile);
+ ndr_print_string(ndr, "sv403_autopath", r->sv403_autopath);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_502(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_sessopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_sessvcs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_sizreqbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_initworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_maxworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_rawworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_irpstacksize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_maxrawbuflen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_sessusers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_sessconns));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_maxpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv502_maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv502_enablesoftcompat));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv502_enableforcedlogoff));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv502_timesource));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv502_acceptdownlevelapis));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv502_lmannounce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_502(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_sessopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_sessvcs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_sizreqbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_initworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_maxworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_rawworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_irpstacksize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_maxrawbuflen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_sessusers));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_sessconns));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_maxpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv502_maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv502_enablesoftcompat));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv502_enableforcedlogoff));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv502_timesource));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv502_acceptdownlevelapis));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv502_lmannounce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_502(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_502 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_502");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv502_sessopens", r->sv502_sessopens);
+ ndr_print_uint32(ndr, "sv502_sessvcs", r->sv502_sessvcs);
+ ndr_print_uint32(ndr, "sv502_opensearch", r->sv502_opensearch);
+ ndr_print_uint32(ndr, "sv502_sizreqbuf", r->sv502_sizreqbuf);
+ ndr_print_uint32(ndr, "sv502_initworkitems", r->sv502_initworkitems);
+ ndr_print_uint32(ndr, "sv502_maxworkitems", r->sv502_maxworkitems);
+ ndr_print_uint32(ndr, "sv502_rawworkitems", r->sv502_rawworkitems);
+ ndr_print_uint32(ndr, "sv502_irpstacksize", r->sv502_irpstacksize);
+ ndr_print_uint32(ndr, "sv502_maxrawbuflen", r->sv502_maxrawbuflen);
+ ndr_print_uint32(ndr, "sv502_sessusers", r->sv502_sessusers);
+ ndr_print_uint32(ndr, "sv502_sessconns", r->sv502_sessconns);
+ ndr_print_uint32(ndr, "sv502_maxpagedmemoryusage", r->sv502_maxpagedmemoryusage);
+ ndr_print_uint32(ndr, "sv502_maxnonpagedmemoryusage", r->sv502_maxnonpagedmemoryusage);
+ ndr_print_uint8(ndr, "sv502_enablesoftcompat", r->sv502_enablesoftcompat);
+ ndr_print_uint8(ndr, "sv502_enableforcedlogoff", r->sv502_enableforcedlogoff);
+ ndr_print_uint8(ndr, "sv502_timesource", r->sv502_timesource);
+ ndr_print_uint8(ndr, "sv502_acceptdownlevelapis", r->sv502_acceptdownlevelapis);
+ ndr_print_uint8(ndr, "sv502_lmannounce", r->sv502_lmannounce);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_503(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_503 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_sessopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_sessvcs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_sizreqbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_initworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_rawworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_irpstacksize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxrawbuflen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_sessusers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_sessconns));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_enablesoftcompat));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_enableforcedlogoff));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_timesource));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_acceptdownlevelapis));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_lmannounce));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv503_domain));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxcopyreadlen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxcopywritelen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_minkeepsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxkeepsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_minkeepcomplsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxkeepcomplsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_threadcountadd));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_numblockthreads));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_scavtimeout));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_minrcvqueue));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_minfreeworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_xactmemsize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_threadpriority));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxmpxct));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_oplockbreakwait));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_oplockbreakresponsewait));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_enableoplocks));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_enableoplockforceclose));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_enablefcbopens));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_enableraw));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv503_enablesharednetdrives));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_minfreeconnections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv503_maxfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_503(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_503 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_sessopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_sessvcs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_sizreqbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_initworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_rawworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_irpstacksize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxrawbuflen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_sessusers));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_sessconns));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_enablesoftcompat));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_enableforcedlogoff));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_timesource));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_acceptdownlevelapis));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_lmannounce));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv503_domain));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxcopyreadlen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxcopywritelen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_minkeepsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxkeepsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_minkeepcomplsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxkeepcomplsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_threadcountadd));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_numblockthreads));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_scavtimeout));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_minrcvqueue));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_minfreeworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_xactmemsize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_threadpriority));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxmpxct));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_oplockbreakwait));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_oplockbreakresponsewait));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_enableoplocks));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_enableoplockforceclose));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_enablefcbopens));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_enableraw));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv503_enablesharednetdrives));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_minfreeconnections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv503_maxfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_503(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_503 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_503");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv503_sessopens", r->sv503_sessopens);
+ ndr_print_uint32(ndr, "sv503_sessvcs", r->sv503_sessvcs);
+ ndr_print_uint32(ndr, "sv503_opensearch", r->sv503_opensearch);
+ ndr_print_uint32(ndr, "sv503_sizreqbuf", r->sv503_sizreqbuf);
+ ndr_print_uint32(ndr, "sv503_initworkitems", r->sv503_initworkitems);
+ ndr_print_uint32(ndr, "sv503_maxworkitems", r->sv503_maxworkitems);
+ ndr_print_uint32(ndr, "sv503_rawworkitems", r->sv503_rawworkitems);
+ ndr_print_uint32(ndr, "sv503_irpstacksize", r->sv503_irpstacksize);
+ ndr_print_uint32(ndr, "sv503_maxrawbuflen", r->sv503_maxrawbuflen);
+ ndr_print_uint32(ndr, "sv503_sessusers", r->sv503_sessusers);
+ ndr_print_uint32(ndr, "sv503_sessconns", r->sv503_sessconns);
+ ndr_print_uint32(ndr, "sv503_maxpagedmemoryusage", r->sv503_maxpagedmemoryusage);
+ ndr_print_uint32(ndr, "sv503_maxnonpagedmemoryusage", r->sv503_maxnonpagedmemoryusage);
+ ndr_print_uint8(ndr, "sv503_enablesoftcompat", r->sv503_enablesoftcompat);
+ ndr_print_uint8(ndr, "sv503_enableforcedlogoff", r->sv503_enableforcedlogoff);
+ ndr_print_uint8(ndr, "sv503_timesource", r->sv503_timesource);
+ ndr_print_uint8(ndr, "sv503_acceptdownlevelapis", r->sv503_acceptdownlevelapis);
+ ndr_print_uint8(ndr, "sv503_lmannounce", r->sv503_lmannounce);
+ ndr_print_string(ndr, "sv503_domain", r->sv503_domain);
+ ndr_print_uint32(ndr, "sv503_maxcopyreadlen", r->sv503_maxcopyreadlen);
+ ndr_print_uint32(ndr, "sv503_maxcopywritelen", r->sv503_maxcopywritelen);
+ ndr_print_uint32(ndr, "sv503_minkeepsearch", r->sv503_minkeepsearch);
+ ndr_print_uint32(ndr, "sv503_maxkeepsearch", r->sv503_maxkeepsearch);
+ ndr_print_uint32(ndr, "sv503_minkeepcomplsearch", r->sv503_minkeepcomplsearch);
+ ndr_print_uint32(ndr, "sv503_maxkeepcomplsearch", r->sv503_maxkeepcomplsearch);
+ ndr_print_uint32(ndr, "sv503_threadcountadd", r->sv503_threadcountadd);
+ ndr_print_uint32(ndr, "sv503_numblockthreads", r->sv503_numblockthreads);
+ ndr_print_uint32(ndr, "sv503_scavtimeout", r->sv503_scavtimeout);
+ ndr_print_uint32(ndr, "sv503_minrcvqueue", r->sv503_minrcvqueue);
+ ndr_print_uint32(ndr, "sv503_minfreeworkitems", r->sv503_minfreeworkitems);
+ ndr_print_uint32(ndr, "sv503_xactmemsize", r->sv503_xactmemsize);
+ ndr_print_uint32(ndr, "sv503_threadpriority", r->sv503_threadpriority);
+ ndr_print_uint32(ndr, "sv503_maxmpxct", r->sv503_maxmpxct);
+ ndr_print_uint32(ndr, "sv503_oplockbreakwait", r->sv503_oplockbreakwait);
+ ndr_print_uint32(ndr, "sv503_oplockbreakresponsewait", r->sv503_oplockbreakresponsewait);
+ ndr_print_uint8(ndr, "sv503_enableoplocks", r->sv503_enableoplocks);
+ ndr_print_uint8(ndr, "sv503_enableoplockforceclose", r->sv503_enableoplockforceclose);
+ ndr_print_uint8(ndr, "sv503_enablefcbopens", r->sv503_enablefcbopens);
+ ndr_print_uint8(ndr, "sv503_enableraw", r->sv503_enableraw);
+ ndr_print_uint8(ndr, "sv503_enablesharednetdrives", r->sv503_enablesharednetdrives);
+ ndr_print_uint32(ndr, "sv503_minfreeconnections", r->sv503_minfreeconnections);
+ ndr_print_uint32(ndr, "sv503_maxfreeconnections", r->sv503_maxfreeconnections);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_599(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_599 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_sessopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_sessvcs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_sizreqbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_initworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_rawworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_irpstacksize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxrawbuflen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_sessusers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_sessconns));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_enablesoftcompat));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_enableforcedlogoff));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_timesource));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_acceptdownlevelapis));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_lmannounce));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sv599_domain));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxcopyreadlen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxcopywritelen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_minkeepsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxkeepsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_minkeepcomplsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxkeepcomplsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_threadcountadd));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_numblockthreads));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_scavtimeout));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_minrcvqueue));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_minfreeworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_xactmemsize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_threadpriority));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxmpxct));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_oplockbreakwait));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_oplockbreakresponsewait));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_enableoplocks));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_enableoplockforceclose));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_enablefcbopens));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_enableraw));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv599_enablesharednetdrives));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_minfreeconnections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxfreeconnections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_initsesstable));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_initconntable));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_initfiletable));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_initsearchtable));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_alertschedule));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_errorthreshold));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_networkerrorthreshold));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_diskspacethreshold));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_reserved));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxlinkdelay));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_minlinkthroughput));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_linkinfovalidtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_scavqosinfoupdatetime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv599_maxworkitemidletime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_599(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_599 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_sessopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_sessvcs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_sizreqbuf));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_initworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_rawworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_irpstacksize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxrawbuflen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_sessusers));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_sessconns));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_enablesoftcompat));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_enableforcedlogoff));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_timesource));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_acceptdownlevelapis));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_lmannounce));
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sv599_domain));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxcopyreadlen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxcopywritelen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_minkeepsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxkeepsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_minkeepcomplsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxkeepcomplsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_threadcountadd));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_numblockthreads));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_scavtimeout));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_minrcvqueue));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_minfreeworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_xactmemsize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_threadpriority));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxmpxct));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_oplockbreakwait));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_oplockbreakresponsewait));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_enableoplocks));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_enableoplockforceclose));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_enablefcbopens));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_enableraw));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv599_enablesharednetdrives));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_minfreeconnections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxfreeconnections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_initsesstable));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_initconntable));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_initfiletable));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_initsearchtable));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_alertschedule));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_errorthreshold));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_networkerrorthreshold));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_diskspacethreshold));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_reserved));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxlinkdelay));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_minlinkthroughput));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_linkinfovalidtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_scavqosinfoupdatetime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv599_maxworkitemidletime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_599(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_599 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_599");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv599_sessopens", r->sv599_sessopens);
+ ndr_print_uint32(ndr, "sv599_sessvcs", r->sv599_sessvcs);
+ ndr_print_uint32(ndr, "sv599_opensearch", r->sv599_opensearch);
+ ndr_print_uint32(ndr, "sv599_sizreqbuf", r->sv599_sizreqbuf);
+ ndr_print_uint32(ndr, "sv599_initworkitems", r->sv599_initworkitems);
+ ndr_print_uint32(ndr, "sv599_maxworkitems", r->sv599_maxworkitems);
+ ndr_print_uint32(ndr, "sv599_rawworkitems", r->sv599_rawworkitems);
+ ndr_print_uint32(ndr, "sv599_irpstacksize", r->sv599_irpstacksize);
+ ndr_print_uint32(ndr, "sv599_maxrawbuflen", r->sv599_maxrawbuflen);
+ ndr_print_uint32(ndr, "sv599_sessusers", r->sv599_sessusers);
+ ndr_print_uint32(ndr, "sv599_sessconns", r->sv599_sessconns);
+ ndr_print_uint32(ndr, "sv599_maxpagedmemoryusage", r->sv599_maxpagedmemoryusage);
+ ndr_print_uint32(ndr, "sv599_maxnonpagedmemoryusage", r->sv599_maxnonpagedmemoryusage);
+ ndr_print_uint8(ndr, "sv599_enablesoftcompat", r->sv599_enablesoftcompat);
+ ndr_print_uint8(ndr, "sv599_enableforcedlogoff", r->sv599_enableforcedlogoff);
+ ndr_print_uint8(ndr, "sv599_timesource", r->sv599_timesource);
+ ndr_print_uint8(ndr, "sv599_acceptdownlevelapis", r->sv599_acceptdownlevelapis);
+ ndr_print_uint8(ndr, "sv599_lmannounce", r->sv599_lmannounce);
+ ndr_print_string(ndr, "sv599_domain", r->sv599_domain);
+ ndr_print_uint32(ndr, "sv599_maxcopyreadlen", r->sv599_maxcopyreadlen);
+ ndr_print_uint32(ndr, "sv599_maxcopywritelen", r->sv599_maxcopywritelen);
+ ndr_print_uint32(ndr, "sv599_minkeepsearch", r->sv599_minkeepsearch);
+ ndr_print_uint32(ndr, "sv599_maxkeepsearch", r->sv599_maxkeepsearch);
+ ndr_print_uint32(ndr, "sv599_minkeepcomplsearch", r->sv599_minkeepcomplsearch);
+ ndr_print_uint32(ndr, "sv599_maxkeepcomplsearch", r->sv599_maxkeepcomplsearch);
+ ndr_print_uint32(ndr, "sv599_threadcountadd", r->sv599_threadcountadd);
+ ndr_print_uint32(ndr, "sv599_numblockthreads", r->sv599_numblockthreads);
+ ndr_print_uint32(ndr, "sv599_scavtimeout", r->sv599_scavtimeout);
+ ndr_print_uint32(ndr, "sv599_minrcvqueue", r->sv599_minrcvqueue);
+ ndr_print_uint32(ndr, "sv599_minfreeworkitems", r->sv599_minfreeworkitems);
+ ndr_print_uint32(ndr, "sv599_xactmemsize", r->sv599_xactmemsize);
+ ndr_print_uint32(ndr, "sv599_threadpriority", r->sv599_threadpriority);
+ ndr_print_uint32(ndr, "sv599_maxmpxct", r->sv599_maxmpxct);
+ ndr_print_uint32(ndr, "sv599_oplockbreakwait", r->sv599_oplockbreakwait);
+ ndr_print_uint32(ndr, "sv599_oplockbreakresponsewait", r->sv599_oplockbreakresponsewait);
+ ndr_print_uint8(ndr, "sv599_enableoplocks", r->sv599_enableoplocks);
+ ndr_print_uint8(ndr, "sv599_enableoplockforceclose", r->sv599_enableoplockforceclose);
+ ndr_print_uint8(ndr, "sv599_enablefcbopens", r->sv599_enablefcbopens);
+ ndr_print_uint8(ndr, "sv599_enableraw", r->sv599_enableraw);
+ ndr_print_uint8(ndr, "sv599_enablesharednetdrives", r->sv599_enablesharednetdrives);
+ ndr_print_uint32(ndr, "sv599_minfreeconnections", r->sv599_minfreeconnections);
+ ndr_print_uint32(ndr, "sv599_maxfreeconnections", r->sv599_maxfreeconnections);
+ ndr_print_uint32(ndr, "sv599_initsesstable", r->sv599_initsesstable);
+ ndr_print_uint32(ndr, "sv599_initconntable", r->sv599_initconntable);
+ ndr_print_uint32(ndr, "sv599_initfiletable", r->sv599_initfiletable);
+ ndr_print_uint32(ndr, "sv599_initsearchtable", r->sv599_initsearchtable);
+ ndr_print_uint32(ndr, "sv599_alertschedule", r->sv599_alertschedule);
+ ndr_print_uint32(ndr, "sv599_errorthreshold", r->sv599_errorthreshold);
+ ndr_print_uint32(ndr, "sv599_networkerrorthreshold", r->sv599_networkerrorthreshold);
+ ndr_print_uint32(ndr, "sv599_diskspacethreshold", r->sv599_diskspacethreshold);
+ ndr_print_uint32(ndr, "sv599_reserved", r->sv599_reserved);
+ ndr_print_uint32(ndr, "sv599_maxlinkdelay", r->sv599_maxlinkdelay);
+ ndr_print_uint32(ndr, "sv599_minlinkthroughput", r->sv599_minlinkthroughput);
+ ndr_print_uint32(ndr, "sv599_linkinfovalidtime", r->sv599_linkinfovalidtime);
+ ndr_print_uint32(ndr, "sv599_scavqosinfoupdatetime", r->sv599_scavqosinfoupdatetime);
+ ndr_print_uint32(ndr, "sv599_maxworkitemidletime", r->sv599_maxworkitemidletime);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_598(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_598 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxrawworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxthreadsperqueue));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_producttype));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_serversize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_connectionlessautodisc));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_sharingviolationretries));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_sharingviolationdelay));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxglobalopensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_removeduplicatesearches));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_lockviolationoffset));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_lockviolationdelay));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_mdlreadswitchover));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_cachedopenlimit));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_otherqueueaffinity));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_restrictnullsessaccess));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_enablewfw311directipx));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_queuesamplesecs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_balancecount));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_preferredaffinity));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxfreerfcbs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxfreemfcbs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxfreelfcbs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxfreepagedpoolchunks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_minpagedpoolchunksize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxpagedpoolchunksize));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_sendsfrompreferredprocessor));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_cacheddirectorylimit));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_maxcopylength));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_enablecompression));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_autosharewks));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_autoshareserver));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_enablesecuritysignature));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_requiresecuritysignature));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_minclientbuffersize));
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->sv598_serverguid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_ConnectionNoSessionsTimeout));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_IdleThreadTimeOut));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_enableW9xsecuritysignature));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_enforcekerberosreauthentication));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_disabledos));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv598_lowdiskspaceminimum));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv598_disablestrictnamechecking));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_598(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_598 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxrawworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxthreadsperqueue));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_producttype));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_serversize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_connectionlessautodisc));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_sharingviolationretries));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_sharingviolationdelay));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxglobalopensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_removeduplicatesearches));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_lockviolationoffset));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_lockviolationdelay));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_mdlreadswitchover));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_cachedopenlimit));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_otherqueueaffinity));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_restrictnullsessaccess));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_enablewfw311directipx));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_queuesamplesecs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_balancecount));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_preferredaffinity));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxfreerfcbs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxfreemfcbs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxfreelfcbs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxfreepagedpoolchunks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_minpagedpoolchunksize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxpagedpoolchunksize));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_sendsfrompreferredprocessor));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_cacheddirectorylimit));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_maxcopylength));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_enablecompression));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_autosharewks));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_autoshareserver));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_enablesecuritysignature));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_requiresecuritysignature));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_minclientbuffersize));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->sv598_serverguid));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_ConnectionNoSessionsTimeout));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_IdleThreadTimeOut));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_enableW9xsecuritysignature));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_enforcekerberosreauthentication));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_disabledos));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv598_lowdiskspaceminimum));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv598_disablestrictnamechecking));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_598(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_598 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_598");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv598_maxrawworkitems", r->sv598_maxrawworkitems);
+ ndr_print_uint32(ndr, "sv598_maxthreadsperqueue", r->sv598_maxthreadsperqueue);
+ ndr_print_uint32(ndr, "sv598_producttype", r->sv598_producttype);
+ ndr_print_uint32(ndr, "sv598_serversize", r->sv598_serversize);
+ ndr_print_uint32(ndr, "sv598_connectionlessautodisc", r->sv598_connectionlessautodisc);
+ ndr_print_uint32(ndr, "sv598_sharingviolationretries", r->sv598_sharingviolationretries);
+ ndr_print_uint32(ndr, "sv598_sharingviolationdelay", r->sv598_sharingviolationdelay);
+ ndr_print_uint32(ndr, "sv598_maxglobalopensearch", r->sv598_maxglobalopensearch);
+ ndr_print_uint32(ndr, "sv598_removeduplicatesearches", r->sv598_removeduplicatesearches);
+ ndr_print_uint32(ndr, "sv598_lockviolationoffset", r->sv598_lockviolationoffset);
+ ndr_print_uint32(ndr, "sv598_lockviolationdelay", r->sv598_lockviolationdelay);
+ ndr_print_uint32(ndr, "sv598_mdlreadswitchover", r->sv598_mdlreadswitchover);
+ ndr_print_uint32(ndr, "sv598_cachedopenlimit", r->sv598_cachedopenlimit);
+ ndr_print_uint32(ndr, "sv598_otherqueueaffinity", r->sv598_otherqueueaffinity);
+ ndr_print_uint8(ndr, "sv598_restrictnullsessaccess", r->sv598_restrictnullsessaccess);
+ ndr_print_uint8(ndr, "sv598_enablewfw311directipx", r->sv598_enablewfw311directipx);
+ ndr_print_uint32(ndr, "sv598_queuesamplesecs", r->sv598_queuesamplesecs);
+ ndr_print_uint32(ndr, "sv598_balancecount", r->sv598_balancecount);
+ ndr_print_uint32(ndr, "sv598_preferredaffinity", r->sv598_preferredaffinity);
+ ndr_print_uint32(ndr, "sv598_maxfreerfcbs", r->sv598_maxfreerfcbs);
+ ndr_print_uint32(ndr, "sv598_maxfreemfcbs", r->sv598_maxfreemfcbs);
+ ndr_print_uint32(ndr, "sv598_maxfreelfcbs", r->sv598_maxfreelfcbs);
+ ndr_print_uint32(ndr, "sv598_maxfreepagedpoolchunks", r->sv598_maxfreepagedpoolchunks);
+ ndr_print_uint32(ndr, "sv598_minpagedpoolchunksize", r->sv598_minpagedpoolchunksize);
+ ndr_print_uint32(ndr, "sv598_maxpagedpoolchunksize", r->sv598_maxpagedpoolchunksize);
+ ndr_print_uint8(ndr, "sv598_sendsfrompreferredprocessor", r->sv598_sendsfrompreferredprocessor);
+ ndr_print_uint32(ndr, "sv598_cacheddirectorylimit", r->sv598_cacheddirectorylimit);
+ ndr_print_uint32(ndr, "sv598_maxcopylength", r->sv598_maxcopylength);
+ ndr_print_uint8(ndr, "sv598_enablecompression", r->sv598_enablecompression);
+ ndr_print_uint8(ndr, "sv598_autosharewks", r->sv598_autosharewks);
+ ndr_print_uint8(ndr, "sv598_autoshareserver", r->sv598_autoshareserver);
+ ndr_print_uint8(ndr, "sv598_enablesecuritysignature", r->sv598_enablesecuritysignature);
+ ndr_print_uint8(ndr, "sv598_requiresecuritysignature", r->sv598_requiresecuritysignature);
+ ndr_print_uint32(ndr, "sv598_minclientbuffersize", r->sv598_minclientbuffersize);
+ ndr_print_GUID(ndr, "sv598_serverguid", &r->sv598_serverguid);
+ ndr_print_uint32(ndr, "sv598_ConnectionNoSessionsTimeout", r->sv598_ConnectionNoSessionsTimeout);
+ ndr_print_uint32(ndr, "sv598_IdleThreadTimeOut", r->sv598_IdleThreadTimeOut);
+ ndr_print_uint8(ndr, "sv598_enableW9xsecuritysignature", r->sv598_enableW9xsecuritysignature);
+ ndr_print_uint8(ndr, "sv598_enforcekerberosreauthentication", r->sv598_enforcekerberosreauthentication);
+ ndr_print_uint8(ndr, "sv598_disabledos", r->sv598_disabledos);
+ ndr_print_uint32(ndr, "sv598_lowdiskspaceminimum", r->sv598_lowdiskspaceminimum);
+ ndr_print_uint8(ndr, "sv598_disablestrictnamechecking", r->sv598_disablestrictnamechecking);
+ ndr->depth--;
+}
+
_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1005(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1005 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -294,6 +1125,2796 @@ _PUBLIC_ void ndr_print_SERVER_INFO_1005(struct ndr_print *ndr, const char *name
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1107(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1107 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1107_users));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1107(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1107 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1107_users));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1107(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1107 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1107");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1107_users", r->sv1107_users);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1010(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1010 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->sv1010_disc));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1010(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1010 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->sv1010_disc));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1010(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1010 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1010");
+ ndr->depth++;
+ ndr_print_int32(ndr, "sv1010_disc", r->sv1010_disc);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1016(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1016 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1016_hidden));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1016(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1016 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1016_hidden));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1016(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1016 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1016");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1016_hidden", r->sv1016_hidden);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1017(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1017 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1017_announce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1017(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1017 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1017_announce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1017(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1017 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1017");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1017_announce", r->sv1017_announce);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1018(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1018 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1018_anndelta));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1018(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1018 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1018_anndelta));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1018(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1018 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1018");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1018_anndelta", r->sv1018_anndelta);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1501(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1501 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1501_sessopens));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1501(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1501 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1501_sessopens));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1501(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1501 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1501");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1501_sessopens", r->sv1501_sessopens);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1502(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1502_sessvcs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1502(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1502_sessvcs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1502(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1502 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1502");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1502_sessvcs", r->sv1502_sessvcs);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1503(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1503 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1503_opensearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1503(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1503 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1503_opensearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1503(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1503 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1503");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1503_opensearch", r->sv1503_opensearch);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1506(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1506 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1506_maxworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1506(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1506 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1506_maxworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1506(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1506 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1506");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1506_maxworkitems", r->sv1506_maxworkitems);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1509(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1509 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1509_maxrawbuflen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1509(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1509 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1509_maxrawbuflen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1509(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1509 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1509");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1509_maxrawbuflen", r->sv1509_maxrawbuflen);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1510(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1510 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1510_sessusers));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1510(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1510 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1510_sessusers));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1510(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1510 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1510");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1510_sessusers", r->sv1510_sessusers);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1511(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1511 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1511_sessconns));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1511(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1511 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1511_sessconns));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1511(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1511 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1511");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1511_sessconns", r->sv1511_sessconns);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1512(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1512 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1512_maxnonpagedmemoryusage));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1512(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1512 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1512_maxnonpagedmemoryusage));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1512(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1512 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1512");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1512_maxnonpagedmemoryusage", r->sv1512_maxnonpagedmemoryusage);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1513(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1513 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1513_maxpagedmemoryusage));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1513(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1513 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1513_maxpagedmemoryusage));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1513(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1513 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1513");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1513_maxpagedmemoryusage", r->sv1513_maxpagedmemoryusage);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1514(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1514 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1514_enablesoftcompat));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1514(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1514 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1514_enablesoftcompat));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1514(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1514 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1514");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1514_enablesoftcompat", r->sv1514_enablesoftcompat);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1515(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1515 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1515_enableforcedlogoff));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1515(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1515 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1515_enableforcedlogoff));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1515(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1515 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1515");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1515_enableforcedlogoff", r->sv1515_enableforcedlogoff);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1516(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1516 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1516_timesource));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1516(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1516 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1516_timesource));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1516(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1516 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1516");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1516_timesource", r->sv1516_timesource);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1518(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1518 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1518_lmannounce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1518(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1518 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1518_lmannounce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1518(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1518 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1518");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1518_lmannounce", r->sv1518_lmannounce);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1520(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1520 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1520_maxcopyreadlen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1520(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1520 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1520_maxcopyreadlen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1520(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1520 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1520");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1520_maxcopyreadlen", r->sv1520_maxcopyreadlen);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1521(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1521 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1521_maxcopywritelen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1521(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1521 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1521_maxcopywritelen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1521(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1521 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1521");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1521_maxcopywritelen", r->sv1521_maxcopywritelen);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1522(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1522 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1522_minkeepsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1522(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1522 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1522_minkeepsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1522(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1522 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1522");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1522_minkeepsearch", r->sv1522_minkeepsearch);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1523(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1523 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1523_maxkeepsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1523(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1523 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1523_maxkeepsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1523(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1523 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1523");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1523_maxkeepsearch", r->sv1523_maxkeepsearch);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1524(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1524 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1524_minkeepcomplsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1524(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1524 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1524_minkeepcomplsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1524(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1524 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1524");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1524_minkeepcomplsearch", r->sv1524_minkeepcomplsearch);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1525(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1525 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1525_maxkeepcomplsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1525(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1525 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1525_maxkeepcomplsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1525(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1525 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1525");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1525_maxkeepcomplsearch", r->sv1525_maxkeepcomplsearch);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1528(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1528 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1528_scavtimeout));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1528(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1528 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1528_scavtimeout));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1528(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1528 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1528");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1528_scavtimeout", r->sv1528_scavtimeout);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1529(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1529 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1529_minrcvqueue));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1529(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1529 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1529_minrcvqueue));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1529(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1529 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1529");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1529_minrcvqueue", r->sv1529_minrcvqueue);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1530(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1530 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1530_minfreeworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1530(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1530 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1530_minfreeworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1530(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1530 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1530");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1530_minfreeworkitems", r->sv1530_minfreeworkitems);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1533(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1533 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1533_maxmpxct));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1533(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1533 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1533_maxmpxct));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1533(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1533 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1533");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1533_maxmpxct", r->sv1533_maxmpxct);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1534(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1534 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1534_oplockbreakwait));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1534(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1534 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1534_oplockbreakwait));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1534(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1534 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1534");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1534_oplockbreakwait", r->sv1534_oplockbreakwait);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1535(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1535 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1535_oplockbreakresponsewait));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1535(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1535 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1535_oplockbreakresponsewait));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1535(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1535 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1535");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1535_oplockbreakresponsewait", r->sv1535_oplockbreakresponsewait);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1536(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1536 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1536_enableoplocks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1536(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1536 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1536_enableoplocks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1536(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1536 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1536");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1536_enableoplocks", r->sv1536_enableoplocks);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1537(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1537 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1537_enableoplockforceclose));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1537(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1537 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1537_enableoplockforceclose));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1537(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1537 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1537");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1537_enableoplockforceclose", r->sv1537_enableoplockforceclose);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1538(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1538 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1538_enablefcbopens));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1538(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1538 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1538_enablefcbopens));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1538(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1538 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1538");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1538_enablefcbopens", r->sv1538_enablefcbopens);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1539(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1539 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1539_enableraw));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1539(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1539 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1539_enableraw));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1539(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1539 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1539");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1539_enableraw", r->sv1539_enableraw);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1540(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1540 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1540_enablesharednetdrives));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1540(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1540 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1540_enablesharednetdrives));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1540(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1540 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1540");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1540_enablesharednetdrives", r->sv1540_enablesharednetdrives);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1541(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1541 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1541_minfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1541(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1541 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1541_minfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1541(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1541 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1541");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1541_minfreeconnections", r->sv1541_minfreeconnections);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1542(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1542 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1542_maxfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1542(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1542 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1542_maxfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1542(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1542 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1542");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1542_maxfreeconnections", r->sv1542_maxfreeconnections);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1543(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1543 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1543_initsesstable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1543(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1543 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1543_initsesstable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1543(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1543 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1543");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1543_initsesstable", r->sv1543_initsesstable);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1544(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1544 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1544_initconntable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1544(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1544 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1544_initconntable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1544(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1544 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1544");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1544_initconntable", r->sv1544_initconntable);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1545(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1545 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1545_initfiletable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1545(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1545 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1545_initfiletable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1545(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1545 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1545");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1545_initfiletable", r->sv1545_initfiletable);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1546(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1546 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1546_initsearchtable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1546(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1546 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1546_initsearchtable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1546(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1546 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1546");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1546_initsearchtable", r->sv1546_initsearchtable);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1547(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1547 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1547_alertschedule));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1547(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1547 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1547_alertschedule));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1547(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1547 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1547");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1547_alertschedule", r->sv1547_alertschedule);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1548(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1548 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1548_errorthreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1548(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1548 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1548_errorthreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1548(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1548 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1548");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1548_errorthreshold", r->sv1548_errorthreshold);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1549(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1549 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1549_networkerrorthreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1549(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1549 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1549_networkerrorthreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1549(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1549 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1549");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1549_networkerrorthreshold", r->sv1549_networkerrorthreshold);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1550(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1550 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1550_diskspacethreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1550(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1550 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1550_diskspacethreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1550(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1550 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1550");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1550_diskspacethreshold", r->sv1550_diskspacethreshold);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1552(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1552 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1552_maxlinkdelay));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1552(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1552 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1552_maxlinkdelay));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1552(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1552 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1552");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1552_maxlinkdelay", r->sv1552_maxlinkdelay);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1553(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1553 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1553_minlinkthroughput));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1553(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1553 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1553_minlinkthroughput));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1553(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1553 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1553");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1553_minlinkthroughput", r->sv1553_minlinkthroughput);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1554(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1554 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1554_linkinfovalidtime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1554(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1554 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1554_linkinfovalidtime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1554(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1554 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1554");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1554_linkinfovalidtime", r->sv1554_linkinfovalidtime);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1555(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1555 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1555_scavqosinfoupdatetime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1555(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1555 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1555_scavqosinfoupdatetime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1555(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1555 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1555");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1555_scavqosinfoupdatetime", r->sv1555_scavqosinfoupdatetime);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1556(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1556 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1556_maxworkitemidletime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1556(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1556 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1556_maxworkitemidletime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1556(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1556 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1556");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1556_maxworkitemidletime", r->sv1556_maxworkitemidletime);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1557(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1557 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1557_maxrawworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1557(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1557 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1557_maxrawworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1557(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1557 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1557");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1557_maxrawworkitems", r->sv1557_maxrawworkitems);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1560(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1560 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1560_producttype));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1560(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1560 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1560_producttype));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1560(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1560 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1560");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1560_producttype", r->sv1560_producttype);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1561(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1561 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1561_serversize));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1561(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1561 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1561_serversize));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1561(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1561 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1561");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1561_serversize", r->sv1561_serversize);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1562(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1562 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1562_connectionlessautodisc));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1562(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1562 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1562_connectionlessautodisc));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1562(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1562 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1562");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1562_connectionlessautodisc", r->sv1562_connectionlessautodisc);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1563(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1563 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1563_sharingviolationretries));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1563(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1563 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1563_sharingviolationretries));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1563(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1563 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1563");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1563_sharingviolationretries", r->sv1563_sharingviolationretries);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1564(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1564 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1564_sharingviolationdelay));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1564(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1564 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1564_sharingviolationdelay));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1564(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1564 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1564");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1564_sharingviolationdelay", r->sv1564_sharingviolationdelay);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1565(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1565 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1565_maxglobalopensearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1565(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1565 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1565_maxglobalopensearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1565(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1565 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1565");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1565_maxglobalopensearch", r->sv1565_maxglobalopensearch);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1566(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1566 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1566_removeduplicatesearches));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1566(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1566 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1566_removeduplicatesearches));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1566(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1566 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1566");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1566_removeduplicatesearches", r->sv1566_removeduplicatesearches);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1567(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1567 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1567_lockviolationretries));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1567(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1567 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1567_lockviolationretries));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1567(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1567 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1567");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1567_lockviolationretries", r->sv1567_lockviolationretries);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1568(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1568 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1568_lockviolationoffset));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1568(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1568 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1568_lockviolationoffset));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1568(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1568 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1568");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1568_lockviolationoffset", r->sv1568_lockviolationoffset);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1569(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1569 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1569_lockviolationdelay));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1569(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1569 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1569_lockviolationdelay));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1569(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1569 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1569");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1569_lockviolationdelay", r->sv1569_lockviolationdelay);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1570(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1570 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1570_mdlreadswitchover));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1570(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1570 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1570_mdlreadswitchover));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1570(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1570 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1570");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1570_mdlreadswitchover", r->sv1570_mdlreadswitchover);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1571(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1571 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1571_cachedopenlimit));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1571(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1571 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1571_cachedopenlimit));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1571(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1571 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1571");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1571_cachedopenlimit", r->sv1571_cachedopenlimit);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1572(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1572 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1572_criticalthreads));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1572(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1572 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1572_criticalthreads));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1572(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1572 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1572");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1572_criticalthreads", r->sv1572_criticalthreads);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1573(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1573 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1573_restrictnullsessaccess));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1573(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1573 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1573_restrictnullsessaccess));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1573(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1573 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1573");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1573_restrictnullsessaccess", r->sv1573_restrictnullsessaccess);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1574(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1574 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1574_enablewfw311directipx));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1574(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1574 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1574_enablewfw311directipx));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1574(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1574 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1574");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1574_enablewfw311directipx", r->sv1574_enablewfw311directipx);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1575(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1575 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1575_otherqueueaffinity));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1575(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1575 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1575_otherqueueaffinity));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1575(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1575 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1575");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1575_otherqueueaffinity", r->sv1575_otherqueueaffinity);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1576(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1576 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1576_queuesamplesecs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1576(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1576 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1576_queuesamplesecs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1576(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1576 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1576");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1576_queuesamplesecs", r->sv1576_queuesamplesecs);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1577(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1577 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1577_balancecount));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1577(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1577 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1577_balancecount));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1577(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1577 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1577");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1577_balancecount", r->sv1577_balancecount);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1578(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1578 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1578_preferredaffinity));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1578(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1578 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1578_preferredaffinity));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1578(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1578 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1578");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1578_preferredaffinity", r->sv1578_preferredaffinity);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1579(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1579 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1579_maxfreerfcbs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1579(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1579 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1579_maxfreerfcbs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1579(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1579 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1579");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1579_maxfreerfcbs", r->sv1579_maxfreerfcbs);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1580(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1580 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1580_maxfreemfcbs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1580(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1580 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1580_maxfreemfcbs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1580(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1580 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1580");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1580_maxfreemfcbs", r->sv1580_maxfreemfcbs);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1581(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1581 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1581_maxfreemlcbs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1581(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1581 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1581_maxfreemlcbs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1581(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1581 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1581");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1581_maxfreemlcbs", r->sv1581_maxfreemlcbs);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1582(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1582 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1582_maxfreepagedpoolchunks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1582(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1582 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1582_maxfreepagedpoolchunks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1582(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1582 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1582");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1582_maxfreepagedpoolchunks", r->sv1582_maxfreepagedpoolchunks);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1583(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1583 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1583_minpagedpoolchunksize));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1583(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1583 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1583_minpagedpoolchunksize));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1583(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1583 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1583");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1583_minpagedpoolchunksize", r->sv1583_minpagedpoolchunksize);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1584(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1584 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1584_maxpagedpoolchunksize));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1584(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1584 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1584_maxpagedpoolchunksize));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1584(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1584 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1584");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1584_maxpagedpoolchunksize", r->sv1584_maxpagedpoolchunksize);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1585(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1585 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1585_sendsfrompreferredprocessor));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1585(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1585 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1585_sendsfrompreferredprocessor));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1585(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1585 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1585");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1585_sendsfrompreferredprocessor", r->sv1585_sendsfrompreferredprocessor);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1586(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1586 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1586_maxthreadsperqueue));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1586(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1586 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1586_maxthreadsperqueue));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1586(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1586 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1586");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1586_maxthreadsperqueue", r->sv1586_maxthreadsperqueue);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1587(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1587 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1587_cacheddirectorylimit));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1587(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1587 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1587_cacheddirectorylimit));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1587(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1587 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1587");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1587_cacheddirectorylimit", r->sv1587_cacheddirectorylimit);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1588(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1588 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1588_maxcopylength));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1588(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1588 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1588_maxcopylength));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1588(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1588 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1588");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1588_maxcopylength", r->sv1588_maxcopylength);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1590(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1590 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1590_enablecompression));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1590(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1590 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1590_enablecompression));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1590(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1590 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1590");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1590_enablecompression", r->sv1590_enablecompression);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1591(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1591 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1591_autosharewks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1591(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1591 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1591_autosharewks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1591(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1591 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1591");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1591_autosharewks", r->sv1591_autosharewks);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1592(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1592 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1592_autosharewks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1592(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1592 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1592_autosharewks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1592(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1592 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1592");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1592_autosharewks", r->sv1592_autosharewks);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1593(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1593 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1593_enablesecuritysignature));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1593(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1593 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1593_enablesecuritysignature));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1593(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1593 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1593");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1593_enablesecuritysignature", r->sv1593_enablesecuritysignature);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1594(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1594 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1594_requiresecuritysignature));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1594(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1594 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1594_requiresecuritysignature));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1594(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1594 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1594");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1594_requiresecuritysignature", r->sv1594_requiresecuritysignature);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1595(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1595 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1595_minclientbuffersize));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1595(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1595 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1595_minclientbuffersize));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1595(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1595 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1595");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1595_minclientbuffersize", r->sv1595_minclientbuffersize);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1596(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1596 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1596_ConnectionNoSessionsTimeout));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1596(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1596 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1596_ConnectionNoSessionsTimeout));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1596(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1596 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1596");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1596_ConnectionNoSessionsTimeout", r->sv1596_ConnectionNoSessionsTimeout);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1597(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1597 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1597_IdleThreadTimeOut));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1597(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1597 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1597_IdleThreadTimeOut));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1597(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1597 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1597");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1597_IdleThreadTimeOut", r->sv1597_IdleThreadTimeOut);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1598(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1598 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1598_enableW9xsecuritysignature));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1598(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1598 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1598_enableW9xsecuritysignature));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1598(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1598 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1598");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1598_enableW9xsecuritysignature", r->sv1598_enableW9xsecuritysignature);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1599(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1599 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1598_enforcekerberosreauthentication));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1599(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1599 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1598_enforcekerberosreauthentication));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1599(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1599 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1599");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1598_enforcekerberosreauthentication", r->sv1598_enforcekerberosreauthentication);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1600(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1600 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv1598_disabledos));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1600(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1600 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv1598_disabledos));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1600(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1600 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1600");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv1598_disabledos", r->sv1598_disabledos);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1601(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1601 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sv1598_lowdiskspaceminimum));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1601(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1601 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sv1598_lowdiskspaceminimum));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1601(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1601 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1601");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sv1598_lowdiskspaceminimum", r->sv1598_lowdiskspaceminimum);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1602(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1602 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sv_1598_disablestrictnamechecking));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_SERVER_INFO_1602(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1602 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sv_1598_disablestrictnamechecking));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVER_INFO_1602(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1602 *r)
+{
+ ndr_print_struct(ndr, name, "SERVER_INFO_1602");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sv_1598_disablestrictnamechecking", r->sv_1598_disablestrictnamechecking);
+ ndr->depth--;
+}
+
_PUBLIC_ enum ndr_err_code ndr_push_DOMAIN_CONTROLLER_INFO(struct ndr_push *ndr, int ndr_flags, const struct DOMAIN_CONTROLLER_INFO *r)
{
if (ndr_flags & NDR_SCALARS) {
diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.h b/source3/librpc/gen_ndr/ndr_libnetapi.h
index d8e8e399b2..cae0a70ea6 100644
--- a/source3/librpc/gen_ndr/ndr_libnetapi.h
+++ b/source3/librpc/gen_ndr/ndr_libnetapi.h
@@ -123,9 +123,306 @@ void ndr_print_SERVER_INFO_101(struct ndr_print *ndr, const char *name, const st
enum ndr_err_code ndr_push_SERVER_INFO_102(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_102 *r);
enum ndr_err_code ndr_pull_SERVER_INFO_102(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_102 *r);
void ndr_print_SERVER_INFO_102(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_102 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_402(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_402 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_402(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_402 *r);
+void ndr_print_SERVER_INFO_402(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_402 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_403(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_403 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_403(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_403 *r);
+void ndr_print_SERVER_INFO_403(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_403 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_502(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_502 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_502(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_502 *r);
+void ndr_print_SERVER_INFO_502(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_502 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_503(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_503 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_503(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_503 *r);
+void ndr_print_SERVER_INFO_503(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_503 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_599(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_599 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_599(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_599 *r);
+void ndr_print_SERVER_INFO_599(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_599 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_598(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_598 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_598(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_598 *r);
+void ndr_print_SERVER_INFO_598(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_598 *r);
enum ndr_err_code ndr_push_SERVER_INFO_1005(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1005 *r);
enum ndr_err_code ndr_pull_SERVER_INFO_1005(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1005 *r);
void ndr_print_SERVER_INFO_1005(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1005 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1107(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1107 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1107(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1107 *r);
+void ndr_print_SERVER_INFO_1107(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1107 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1010(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1010 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1010(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1010 *r);
+void ndr_print_SERVER_INFO_1010(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1010 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1016(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1016 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1016(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1016 *r);
+void ndr_print_SERVER_INFO_1016(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1016 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1017(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1017 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1017(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1017 *r);
+void ndr_print_SERVER_INFO_1017(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1017 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1018(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1018 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1018(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1018 *r);
+void ndr_print_SERVER_INFO_1018(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1018 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1501(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1501 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1501(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1501 *r);
+void ndr_print_SERVER_INFO_1501(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1501 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1502(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1502 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1502(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1502 *r);
+void ndr_print_SERVER_INFO_1502(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1502 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1503(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1503 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1503(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1503 *r);
+void ndr_print_SERVER_INFO_1503(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1503 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1506(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1506 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1506(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1506 *r);
+void ndr_print_SERVER_INFO_1506(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1506 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1509(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1509 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1509(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1509 *r);
+void ndr_print_SERVER_INFO_1509(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1509 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1510(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1510 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1510(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1510 *r);
+void ndr_print_SERVER_INFO_1510(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1510 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1511(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1511 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1511(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1511 *r);
+void ndr_print_SERVER_INFO_1511(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1511 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1512(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1512 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1512(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1512 *r);
+void ndr_print_SERVER_INFO_1512(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1512 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1513(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1513 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1513(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1513 *r);
+void ndr_print_SERVER_INFO_1513(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1513 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1514(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1514 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1514(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1514 *r);
+void ndr_print_SERVER_INFO_1514(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1514 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1515(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1515 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1515(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1515 *r);
+void ndr_print_SERVER_INFO_1515(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1515 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1516(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1516 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1516(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1516 *r);
+void ndr_print_SERVER_INFO_1516(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1516 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1518(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1518 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1518(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1518 *r);
+void ndr_print_SERVER_INFO_1518(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1518 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1520(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1520 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1520(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1520 *r);
+void ndr_print_SERVER_INFO_1520(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1520 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1521(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1521 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1521(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1521 *r);
+void ndr_print_SERVER_INFO_1521(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1521 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1522(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1522 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1522(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1522 *r);
+void ndr_print_SERVER_INFO_1522(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1522 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1523(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1523 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1523(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1523 *r);
+void ndr_print_SERVER_INFO_1523(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1523 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1524(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1524 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1524(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1524 *r);
+void ndr_print_SERVER_INFO_1524(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1524 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1525(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1525 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1525(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1525 *r);
+void ndr_print_SERVER_INFO_1525(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1525 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1528(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1528 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1528(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1528 *r);
+void ndr_print_SERVER_INFO_1528(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1528 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1529(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1529 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1529(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1529 *r);
+void ndr_print_SERVER_INFO_1529(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1529 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1530(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1530 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1530(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1530 *r);
+void ndr_print_SERVER_INFO_1530(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1530 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1533(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1533 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1533(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1533 *r);
+void ndr_print_SERVER_INFO_1533(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1533 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1534(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1534 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1534(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1534 *r);
+void ndr_print_SERVER_INFO_1534(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1534 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1535(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1535 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1535(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1535 *r);
+void ndr_print_SERVER_INFO_1535(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1535 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1536(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1536 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1536(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1536 *r);
+void ndr_print_SERVER_INFO_1536(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1536 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1537(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1537 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1537(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1537 *r);
+void ndr_print_SERVER_INFO_1537(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1537 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1538(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1538 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1538(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1538 *r);
+void ndr_print_SERVER_INFO_1538(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1538 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1539(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1539 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1539(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1539 *r);
+void ndr_print_SERVER_INFO_1539(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1539 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1540(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1540 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1540(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1540 *r);
+void ndr_print_SERVER_INFO_1540(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1540 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1541(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1541 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1541(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1541 *r);
+void ndr_print_SERVER_INFO_1541(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1541 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1542(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1542 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1542(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1542 *r);
+void ndr_print_SERVER_INFO_1542(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1542 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1543(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1543 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1543(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1543 *r);
+void ndr_print_SERVER_INFO_1543(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1543 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1544(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1544 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1544(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1544 *r);
+void ndr_print_SERVER_INFO_1544(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1544 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1545(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1545 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1545(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1545 *r);
+void ndr_print_SERVER_INFO_1545(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1545 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1546(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1546 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1546(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1546 *r);
+void ndr_print_SERVER_INFO_1546(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1546 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1547(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1547 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1547(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1547 *r);
+void ndr_print_SERVER_INFO_1547(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1547 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1548(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1548 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1548(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1548 *r);
+void ndr_print_SERVER_INFO_1548(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1548 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1549(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1549 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1549(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1549 *r);
+void ndr_print_SERVER_INFO_1549(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1549 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1550(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1550 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1550(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1550 *r);
+void ndr_print_SERVER_INFO_1550(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1550 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1552(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1552 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1552(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1552 *r);
+void ndr_print_SERVER_INFO_1552(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1552 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1553(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1553 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1553(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1553 *r);
+void ndr_print_SERVER_INFO_1553(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1553 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1554(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1554 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1554(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1554 *r);
+void ndr_print_SERVER_INFO_1554(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1554 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1555(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1555 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1555(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1555 *r);
+void ndr_print_SERVER_INFO_1555(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1555 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1556(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1556 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1556(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1556 *r);
+void ndr_print_SERVER_INFO_1556(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1556 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1557(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1557 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1557(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1557 *r);
+void ndr_print_SERVER_INFO_1557(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1557 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1560(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1560 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1560(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1560 *r);
+void ndr_print_SERVER_INFO_1560(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1560 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1561(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1561 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1561(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1561 *r);
+void ndr_print_SERVER_INFO_1561(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1561 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1562(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1562 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1562(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1562 *r);
+void ndr_print_SERVER_INFO_1562(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1562 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1563(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1563 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1563(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1563 *r);
+void ndr_print_SERVER_INFO_1563(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1563 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1564(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1564 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1564(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1564 *r);
+void ndr_print_SERVER_INFO_1564(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1564 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1565(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1565 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1565(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1565 *r);
+void ndr_print_SERVER_INFO_1565(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1565 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1566(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1566 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1566(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1566 *r);
+void ndr_print_SERVER_INFO_1566(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1566 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1567(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1567 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1567(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1567 *r);
+void ndr_print_SERVER_INFO_1567(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1567 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1568(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1568 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1568(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1568 *r);
+void ndr_print_SERVER_INFO_1568(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1568 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1569(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1569 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1569(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1569 *r);
+void ndr_print_SERVER_INFO_1569(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1569 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1570(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1570 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1570(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1570 *r);
+void ndr_print_SERVER_INFO_1570(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1570 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1571(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1571 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1571(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1571 *r);
+void ndr_print_SERVER_INFO_1571(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1571 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1572(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1572 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1572(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1572 *r);
+void ndr_print_SERVER_INFO_1572(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1572 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1573(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1573 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1573(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1573 *r);
+void ndr_print_SERVER_INFO_1573(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1573 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1574(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1574 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1574(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1574 *r);
+void ndr_print_SERVER_INFO_1574(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1574 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1575(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1575 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1575(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1575 *r);
+void ndr_print_SERVER_INFO_1575(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1575 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1576(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1576 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1576(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1576 *r);
+void ndr_print_SERVER_INFO_1576(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1576 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1577(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1577 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1577(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1577 *r);
+void ndr_print_SERVER_INFO_1577(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1577 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1578(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1578 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1578(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1578 *r);
+void ndr_print_SERVER_INFO_1578(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1578 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1579(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1579 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1579(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1579 *r);
+void ndr_print_SERVER_INFO_1579(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1579 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1580(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1580 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1580(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1580 *r);
+void ndr_print_SERVER_INFO_1580(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1580 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1581(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1581 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1581(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1581 *r);
+void ndr_print_SERVER_INFO_1581(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1581 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1582(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1582 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1582(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1582 *r);
+void ndr_print_SERVER_INFO_1582(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1582 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1583(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1583 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1583(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1583 *r);
+void ndr_print_SERVER_INFO_1583(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1583 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1584(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1584 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1584(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1584 *r);
+void ndr_print_SERVER_INFO_1584(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1584 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1585(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1585 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1585(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1585 *r);
+void ndr_print_SERVER_INFO_1585(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1585 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1586(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1586 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1586(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1586 *r);
+void ndr_print_SERVER_INFO_1586(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1586 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1587(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1587 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1587(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1587 *r);
+void ndr_print_SERVER_INFO_1587(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1587 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1588(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1588 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1588(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1588 *r);
+void ndr_print_SERVER_INFO_1588(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1588 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1590(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1590 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1590(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1590 *r);
+void ndr_print_SERVER_INFO_1590(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1590 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1591(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1591 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1591(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1591 *r);
+void ndr_print_SERVER_INFO_1591(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1591 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1592(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1592 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1592(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1592 *r);
+void ndr_print_SERVER_INFO_1592(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1592 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1593(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1593 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1593(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1593 *r);
+void ndr_print_SERVER_INFO_1593(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1593 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1594(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1594 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1594(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1594 *r);
+void ndr_print_SERVER_INFO_1594(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1594 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1595(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1595 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1595(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1595 *r);
+void ndr_print_SERVER_INFO_1595(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1595 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1596(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1596 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1596(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1596 *r);
+void ndr_print_SERVER_INFO_1596(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1596 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1597(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1597 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1597(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1597 *r);
+void ndr_print_SERVER_INFO_1597(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1597 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1598(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1598 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1598(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1598 *r);
+void ndr_print_SERVER_INFO_1598(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1598 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1599(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1599 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1599(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1599 *r);
+void ndr_print_SERVER_INFO_1599(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1599 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1600(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1600 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1600(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1600 *r);
+void ndr_print_SERVER_INFO_1600(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1600 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1601(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1601 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1601(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1601 *r);
+void ndr_print_SERVER_INFO_1601(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1601 *r);
+enum ndr_err_code ndr_push_SERVER_INFO_1602(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1602 *r);
+enum ndr_err_code ndr_pull_SERVER_INFO_1602(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1602 *r);
+void ndr_print_SERVER_INFO_1602(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1602 *r);
enum ndr_err_code ndr_push_DOMAIN_CONTROLLER_INFO(struct ndr_push *ndr, int ndr_flags, const struct DOMAIN_CONTROLLER_INFO *r);
enum ndr_err_code ndr_pull_DOMAIN_CONTROLLER_INFO(struct ndr_pull *ndr, int ndr_flags, struct DOMAIN_CONTROLLER_INFO *r);
void ndr_print_DOMAIN_CONTROLLER_INFO(struct ndr_print *ndr, const char *name, const struct DOMAIN_CONTROLLER_INFO *r);
diff --git a/source3/librpc/idl/libnetapi.idl b/source3/librpc/idl/libnetapi.idl
index f2f4a16c12..6be2171bee 100644
--- a/source3/librpc/idl/libnetapi.idl
+++ b/source3/librpc/idl/libnetapi.idl
@@ -141,9 +141,622 @@ interface libnetapi
} SERVER_INFO_102;
[public] typedef struct {
+ uint32 sv402_ulist_mtime;
+ uint32 sv402_glist_mtime;
+ uint32 sv402_alist_mtime;
+ string sv402_alerts;
+ uint32 sv402_security;
+ uint32 sv402_numadmin;
+ uint32 sv402_lanmask;
+ string sv402_guestacct;
+ uint32 sv402_chdevs;
+ uint32 sv402_chdevq;
+ uint32 sv402_chdevjobs;
+ uint32 sv402_connections;
+ uint32 sv402_shares;
+ uint32 sv402_openfiles;
+ uint32 sv402_sessopens;
+ uint32 sv402_sessvcs;
+ uint32 sv402_sessreqs;
+ uint32 sv402_opensearch;
+ uint32 sv402_activelocks;
+ uint32 sv402_numreqbuf;
+ uint32 sv402_sizreqbuf;
+ uint32 sv402_numbigbuf;
+ uint32 sv402_numfiletasks;
+ uint32 sv402_alertsched;
+ uint32 sv402_erroralert;
+ uint32 sv402_logonalert;
+ uint32 sv402_accessalert;
+ uint32 sv402_diskalert;
+ uint32 sv402_netioalert;
+ uint32 sv402_maxauditsz;
+ string sv402_srvheuristics;
+ } SERVER_INFO_402;
+
+ [public] typedef struct {
+ uint32 sv403_ulist_mtime;
+ uint32 sv403_glist_mtime;
+ uint32 sv403_alist_mtime;
+ string sv403_alerts;
+ uint32 sv403_security;
+ uint32 sv403_numadmin;
+ uint32 sv403_lanmask;
+ string sv403_guestacct;
+ uint32 sv403_chdevs;
+ uint32 sv403_chdevq;
+ uint32 sv403_chdevjobs;
+ uint32 sv403_connections;
+ uint32 sv403_shares;
+ uint32 sv403_openfiles;
+ uint32 sv403_sessopens;
+ uint32 sv403_sessvcs;
+ uint32 sv403_sessreqs;
+ uint32 sv403_opensearch;
+ uint32 sv403_activelocks;
+ uint32 sv403_numreqbuf;
+ uint32 sv403_sizreqbuf;
+ uint32 sv403_numbigbuf;
+ uint32 sv403_numfiletasks;
+ uint32 sv403_alertsched;
+ uint32 sv403_erroralert;
+ uint32 sv403_logonalert;
+ uint32 sv403_accessalert;
+ uint32 sv403_diskalert;
+ uint32 sv403_netioalert;
+ uint32 sv403_maxauditsz;
+ string sv403_srvheuristics;
+ uint32 sv403_auditedevents;
+ uint32 sv403_autoprofile;
+ string sv403_autopath;
+ } SERVER_INFO_403;
+
+ [public] typedef struct {
+ uint32 sv502_sessopens;
+ uint32 sv502_sessvcs;
+ uint32 sv502_opensearch;
+ uint32 sv502_sizreqbuf;
+ uint32 sv502_initworkitems;
+ uint32 sv502_maxworkitems;
+ uint32 sv502_rawworkitems;
+ uint32 sv502_irpstacksize;
+ uint32 sv502_maxrawbuflen;
+ uint32 sv502_sessusers;
+ uint32 sv502_sessconns;
+ uint32 sv502_maxpagedmemoryusage;
+ uint32 sv502_maxnonpagedmemoryusage;
+ boolean8 sv502_enablesoftcompat;
+ boolean8 sv502_enableforcedlogoff;
+ boolean8 sv502_timesource;
+ boolean8 sv502_acceptdownlevelapis;
+ boolean8 sv502_lmannounce;
+ } SERVER_INFO_502;
+
+ [public] typedef struct {
+ uint32 sv503_sessopens;
+ uint32 sv503_sessvcs;
+ uint32 sv503_opensearch;
+ uint32 sv503_sizreqbuf;
+ uint32 sv503_initworkitems;
+ uint32 sv503_maxworkitems;
+ uint32 sv503_rawworkitems;
+ uint32 sv503_irpstacksize;
+ uint32 sv503_maxrawbuflen;
+ uint32 sv503_sessusers;
+ uint32 sv503_sessconns;
+ uint32 sv503_maxpagedmemoryusage;
+ uint32 sv503_maxnonpagedmemoryusage;
+ boolean8 sv503_enablesoftcompat;
+ boolean8 sv503_enableforcedlogoff;
+ boolean8 sv503_timesource;
+ boolean8 sv503_acceptdownlevelapis;
+ boolean8 sv503_lmannounce;
+ string sv503_domain;
+ uint32 sv503_maxcopyreadlen;
+ uint32 sv503_maxcopywritelen;
+ uint32 sv503_minkeepsearch;
+ uint32 sv503_maxkeepsearch;
+ uint32 sv503_minkeepcomplsearch;
+ uint32 sv503_maxkeepcomplsearch;
+ uint32 sv503_threadcountadd;
+ uint32 sv503_numblockthreads;
+ uint32 sv503_scavtimeout;
+ uint32 sv503_minrcvqueue;
+ uint32 sv503_minfreeworkitems;
+ uint32 sv503_xactmemsize;
+ uint32 sv503_threadpriority;
+ uint32 sv503_maxmpxct;
+ uint32 sv503_oplockbreakwait;
+ uint32 sv503_oplockbreakresponsewait;
+ boolean8 sv503_enableoplocks;
+ boolean8 sv503_enableoplockforceclose;
+ boolean8 sv503_enablefcbopens;
+ boolean8 sv503_enableraw;
+ boolean8 sv503_enablesharednetdrives;
+ uint32 sv503_minfreeconnections;
+ uint32 sv503_maxfreeconnections;
+ } SERVER_INFO_503;
+
+ [public] typedef struct {
+ uint32 sv599_sessopens;
+ uint32 sv599_sessvcs;
+ uint32 sv599_opensearch;
+ uint32 sv599_sizreqbuf;
+ uint32 sv599_initworkitems;
+ uint32 sv599_maxworkitems;
+ uint32 sv599_rawworkitems;
+ uint32 sv599_irpstacksize;
+ uint32 sv599_maxrawbuflen;
+ uint32 sv599_sessusers;
+ uint32 sv599_sessconns;
+ uint32 sv599_maxpagedmemoryusage;
+ uint32 sv599_maxnonpagedmemoryusage;
+ boolean8 sv599_enablesoftcompat;
+ boolean8 sv599_enableforcedlogoff;
+ boolean8 sv599_timesource;
+ boolean8 sv599_acceptdownlevelapis;
+ boolean8 sv599_lmannounce;
+ string sv599_domain;
+ uint32 sv599_maxcopyreadlen;
+ uint32 sv599_maxcopywritelen;
+ uint32 sv599_minkeepsearch;
+ uint32 sv599_maxkeepsearch;
+ uint32 sv599_minkeepcomplsearch;
+ uint32 sv599_maxkeepcomplsearch;
+ uint32 sv599_threadcountadd;
+ uint32 sv599_numblockthreads;
+ uint32 sv599_scavtimeout;
+ uint32 sv599_minrcvqueue;
+ uint32 sv599_minfreeworkitems;
+ uint32 sv599_xactmemsize;
+ uint32 sv599_threadpriority;
+ uint32 sv599_maxmpxct;
+ uint32 sv599_oplockbreakwait;
+ uint32 sv599_oplockbreakresponsewait;
+ boolean8 sv599_enableoplocks;
+ boolean8 sv599_enableoplockforceclose;
+ boolean8 sv599_enablefcbopens;
+ boolean8 sv599_enableraw;
+ boolean8 sv599_enablesharednetdrives;
+ uint32 sv599_minfreeconnections;
+ uint32 sv599_maxfreeconnections;
+ uint32 sv599_initsesstable;
+ uint32 sv599_initconntable;
+ uint32 sv599_initfiletable;
+ uint32 sv599_initsearchtable;
+ uint32 sv599_alertschedule;
+ uint32 sv599_errorthreshold;
+ uint32 sv599_networkerrorthreshold;
+ uint32 sv599_diskspacethreshold;
+ uint32 sv599_reserved;
+ uint32 sv599_maxlinkdelay;
+ uint32 sv599_minlinkthroughput;
+ uint32 sv599_linkinfovalidtime;
+ uint32 sv599_scavqosinfoupdatetime;
+ uint32 sv599_maxworkitemidletime;
+ } SERVER_INFO_599;
+
+ [public] typedef struct {
+ uint32 sv598_maxrawworkitems;
+ uint32 sv598_maxthreadsperqueue;
+ uint32 sv598_producttype;
+ uint32 sv598_serversize;
+ uint32 sv598_connectionlessautodisc;
+ uint32 sv598_sharingviolationretries;
+ uint32 sv598_sharingviolationdelay;
+ uint32 sv598_maxglobalopensearch;
+ uint32 sv598_removeduplicatesearches;
+ uint32 sv598_lockviolationoffset;
+ uint32 sv598_lockviolationdelay;
+ uint32 sv598_mdlreadswitchover;
+ uint32 sv598_cachedopenlimit;
+ uint32 sv598_otherqueueaffinity;
+ boolean8 sv598_restrictnullsessaccess;
+ boolean8 sv598_enablewfw311directipx;
+ uint32 sv598_queuesamplesecs;
+ uint32 sv598_balancecount;
+ uint32 sv598_preferredaffinity;
+ uint32 sv598_maxfreerfcbs;
+ uint32 sv598_maxfreemfcbs;
+ uint32 sv598_maxfreelfcbs;
+ uint32 sv598_maxfreepagedpoolchunks;
+ uint32 sv598_minpagedpoolchunksize;
+ uint32 sv598_maxpagedpoolchunksize;
+ boolean8 sv598_sendsfrompreferredprocessor;
+ uint32 sv598_cacheddirectorylimit;
+ uint32 sv598_maxcopylength;
+ boolean8 sv598_enablecompression;
+ boolean8 sv598_autosharewks;
+ boolean8 sv598_autoshareserver;
+ boolean8 sv598_enablesecuritysignature;
+ boolean8 sv598_requiresecuritysignature;
+ uint32 sv598_minclientbuffersize;
+ GUID sv598_serverguid;
+ uint32 sv598_ConnectionNoSessionsTimeout;
+ uint32 sv598_IdleThreadTimeOut;
+ boolean8 sv598_enableW9xsecuritysignature;
+ boolean8 sv598_enforcekerberosreauthentication;
+ boolean8 sv598_disabledos;
+ uint32 sv598_lowdiskspaceminimum;
+ boolean8 sv598_disablestrictnamechecking;
+ } SERVER_INFO_598;
+
+ [public] typedef struct {
string sv1005_comment;
} SERVER_INFO_1005;
+ [public] typedef struct {
+ uint32 sv1107_users;
+ } SERVER_INFO_1107;
+
+ [public] typedef struct {
+ int32 sv1010_disc;
+ } SERVER_INFO_1010;
+
+ [public] typedef struct {
+ boolean8 sv1016_hidden;
+ } SERVER_INFO_1016;
+
+ [public] typedef struct {
+ uint32 sv1017_announce;
+ } SERVER_INFO_1017;
+
+ [public] typedef struct {
+ uint32 sv1018_anndelta;
+ } SERVER_INFO_1018;
+
+ [public] typedef struct {
+ uint32 sv1501_sessopens;
+ } SERVER_INFO_1501;
+
+ [public] typedef struct {
+ uint32 sv1502_sessvcs;
+ } SERVER_INFO_1502;
+
+ [public] typedef struct {
+ uint32 sv1503_opensearch;
+ } SERVER_INFO_1503;
+
+ [public] typedef struct {
+ uint32 sv1506_maxworkitems;
+ } SERVER_INFO_1506;
+
+ [public] typedef struct {
+ uint32 sv1509_maxrawbuflen;
+ } SERVER_INFO_1509;
+
+ [public] typedef struct {
+ uint32 sv1510_sessusers;
+ } SERVER_INFO_1510;
+
+ [public] typedef struct {
+ uint32 sv1511_sessconns;
+ } SERVER_INFO_1511;
+
+ [public] typedef struct {
+ uint32 sv1512_maxnonpagedmemoryusage;
+ } SERVER_INFO_1512;
+
+ [public] typedef struct {
+ uint32 sv1513_maxpagedmemoryusage;
+ } SERVER_INFO_1513;
+
+ [public] typedef struct {
+ boolean8 sv1514_enablesoftcompat;
+ } SERVER_INFO_1514;
+
+ [public] typedef struct {
+ boolean8 sv1515_enableforcedlogoff;
+ } SERVER_INFO_1515;
+
+ [public] typedef struct {
+ boolean8 sv1516_timesource;
+ } SERVER_INFO_1516;
+
+ [public] typedef struct {
+ boolean8 sv1518_lmannounce;
+ } SERVER_INFO_1518;
+
+ [public] typedef struct {
+ uint32 sv1520_maxcopyreadlen;
+ } SERVER_INFO_1520;
+
+ [public] typedef struct {
+ uint32 sv1521_maxcopywritelen;
+ } SERVER_INFO_1521;
+
+ [public] typedef struct {
+ uint32 sv1522_minkeepsearch;
+ } SERVER_INFO_1522;
+
+ [public] typedef struct {
+ uint32 sv1523_maxkeepsearch;
+ } SERVER_INFO_1523;
+
+ [public] typedef struct {
+ uint32 sv1524_minkeepcomplsearch;
+ } SERVER_INFO_1524;
+
+ [public] typedef struct {
+ uint32 sv1525_maxkeepcomplsearch;
+ } SERVER_INFO_1525;
+
+ [public] typedef struct {
+ uint32 sv1528_scavtimeout;
+ } SERVER_INFO_1528;
+
+ [public] typedef struct {
+ uint32 sv1529_minrcvqueue;
+ } SERVER_INFO_1529;
+
+ [public] typedef struct {
+ uint32 sv1530_minfreeworkitems;
+ } SERVER_INFO_1530;
+
+ [public] typedef struct {
+ uint32 sv1533_maxmpxct;
+ } SERVER_INFO_1533;
+
+ [public] typedef struct {
+ uint32 sv1534_oplockbreakwait;
+ } SERVER_INFO_1534;
+
+ [public] typedef struct {
+ uint32 sv1535_oplockbreakresponsewait;
+ } SERVER_INFO_1535;
+
+ [public] typedef struct {
+ boolean8 sv1536_enableoplocks;
+ } SERVER_INFO_1536;
+
+ [public] typedef struct {
+ boolean8 sv1537_enableoplockforceclose;
+ } SERVER_INFO_1537;
+
+ [public] typedef struct {
+ boolean8 sv1538_enablefcbopens;
+ } SERVER_INFO_1538;
+
+ [public] typedef struct {
+ boolean8 sv1539_enableraw;
+ } SERVER_INFO_1539;
+
+ [public] typedef struct {
+ boolean8 sv1540_enablesharednetdrives;
+ } SERVER_INFO_1540;
+
+ [public] typedef struct {
+ boolean8 sv1541_minfreeconnections;
+ } SERVER_INFO_1541;
+
+ [public] typedef struct {
+ boolean8 sv1542_maxfreeconnections;
+ } SERVER_INFO_1542;
+
+ [public] typedef struct {
+ uint32 sv1543_initsesstable;
+ } SERVER_INFO_1543;
+
+ [public] typedef struct {
+ uint32 sv1544_initconntable;
+ } SERVER_INFO_1544;
+
+ [public] typedef struct {
+ uint32 sv1545_initfiletable;
+ } SERVER_INFO_1545;
+
+ [public] typedef struct {
+ uint32 sv1546_initsearchtable;
+ } SERVER_INFO_1546;
+
+ [public] typedef struct {
+ uint32 sv1547_alertschedule;
+ } SERVER_INFO_1547;
+
+ [public] typedef struct {
+ uint32 sv1548_errorthreshold;
+ } SERVER_INFO_1548;
+
+ [public] typedef struct {
+ uint32 sv1549_networkerrorthreshold;
+ } SERVER_INFO_1549;
+
+ [public] typedef struct {
+ uint32 sv1550_diskspacethreshold;
+ } SERVER_INFO_1550;
+
+ [public] typedef struct {
+ uint32 sv1552_maxlinkdelay;
+ } SERVER_INFO_1552;
+
+ [public] typedef struct {
+ uint32 sv1553_minlinkthroughput;
+ } SERVER_INFO_1553;
+
+ [public] typedef struct {
+ uint32 sv1554_linkinfovalidtime;
+ } SERVER_INFO_1554;
+
+ [public] typedef struct {
+ uint32 sv1555_scavqosinfoupdatetime;
+ } SERVER_INFO_1555;
+
+ [public] typedef struct {
+ uint32 sv1556_maxworkitemidletime;
+ } SERVER_INFO_1556;
+
+ [public] typedef struct {
+ uint32 sv1557_maxrawworkitems;
+ } SERVER_INFO_1557;
+
+ [public] typedef struct {
+ uint32 sv1560_producttype;
+ } SERVER_INFO_1560;
+
+ [public] typedef struct {
+ uint32 sv1561_serversize;
+ } SERVER_INFO_1561;
+
+ [public] typedef struct {
+ uint32 sv1562_connectionlessautodisc;
+ } SERVER_INFO_1562;
+
+ [public] typedef struct {
+ uint32 sv1563_sharingviolationretries;
+ } SERVER_INFO_1563;
+
+ [public] typedef struct {
+ uint32 sv1564_sharingviolationdelay;
+ } SERVER_INFO_1564;
+
+ [public] typedef struct {
+ uint32 sv1565_maxglobalopensearch;
+ } SERVER_INFO_1565;
+
+ [public] typedef struct {
+ boolean8 sv1566_removeduplicatesearches;
+ } SERVER_INFO_1566;
+
+ [public] typedef struct {
+ uint32 sv1567_lockviolationretries;
+ } SERVER_INFO_1567;
+
+ [public] typedef struct {
+ uint32 sv1568_lockviolationoffset;
+ } SERVER_INFO_1568;
+
+ [public] typedef struct {
+ uint32 sv1569_lockviolationdelay;
+ } SERVER_INFO_1569;
+
+ [public] typedef struct {
+ uint32 sv1570_mdlreadswitchover;
+ } SERVER_INFO_1570;
+
+ [public] typedef struct {
+ uint32 sv1571_cachedopenlimit;
+ } SERVER_INFO_1571;
+
+ [public] typedef struct {
+ uint32 sv1572_criticalthreads;
+ } SERVER_INFO_1572;
+
+ [public] typedef struct {
+ uint32 sv1573_restrictnullsessaccess;
+ } SERVER_INFO_1573;
+
+ [public] typedef struct {
+ uint32 sv1574_enablewfw311directipx;
+ } SERVER_INFO_1574;
+
+ [public] typedef struct {
+ uint32 sv1575_otherqueueaffinity;
+ } SERVER_INFO_1575;
+
+ [public] typedef struct {
+ uint32 sv1576_queuesamplesecs;
+ } SERVER_INFO_1576;
+
+ [public] typedef struct {
+ uint32 sv1577_balancecount;
+ } SERVER_INFO_1577;
+
+ [public] typedef struct {
+ uint32 sv1578_preferredaffinity;
+ } SERVER_INFO_1578;
+
+ [public] typedef struct {
+ uint32 sv1579_maxfreerfcbs;
+ } SERVER_INFO_1579;
+
+ [public] typedef struct {
+ uint32 sv1580_maxfreemfcbs;
+ } SERVER_INFO_1580;
+
+ [public] typedef struct {
+ uint32 sv1581_maxfreemlcbs;
+ } SERVER_INFO_1581;
+
+ [public] typedef struct {
+ uint32 sv1582_maxfreepagedpoolchunks;
+ } SERVER_INFO_1582;
+
+ [public] typedef struct {
+ uint32 sv1583_minpagedpoolchunksize;
+ } SERVER_INFO_1583;
+
+ [public] typedef struct {
+ uint32 sv1584_maxpagedpoolchunksize;
+ } SERVER_INFO_1584;
+
+ [public] typedef struct {
+ boolean8 sv1585_sendsfrompreferredprocessor;
+ } SERVER_INFO_1585;
+
+ [public] typedef struct {
+ uint32 sv1586_maxthreadsperqueue;
+ } SERVER_INFO_1586;
+
+ [public] typedef struct {
+ uint32 sv1587_cacheddirectorylimit;
+ } SERVER_INFO_1587;
+
+ [public] typedef struct {
+ uint32 sv1588_maxcopylength;
+ } SERVER_INFO_1588;
+
+ [public] typedef struct {
+ uint32 sv1590_enablecompression;
+ } SERVER_INFO_1590;
+
+ [public] typedef struct {
+ uint32 sv1591_autosharewks;
+ } SERVER_INFO_1591;
+
+ [public] typedef struct {
+ uint32 sv1592_autosharewks;
+ } SERVER_INFO_1592;
+
+ [public] typedef struct {
+ uint32 sv1593_enablesecuritysignature;
+ } SERVER_INFO_1593;
+
+ [public] typedef struct {
+ uint32 sv1594_requiresecuritysignature;
+ } SERVER_INFO_1594;
+
+ [public] typedef struct {
+ uint32 sv1595_minclientbuffersize;
+ } SERVER_INFO_1595;
+
+ [public] typedef struct {
+ uint32 sv1596_ConnectionNoSessionsTimeout;
+ } SERVER_INFO_1596;
+
+ [public] typedef struct {
+ uint32 sv1597_IdleThreadTimeOut;
+ } SERVER_INFO_1597;
+
+ [public] typedef struct {
+ uint32 sv1598_enableW9xsecuritysignature;
+ } SERVER_INFO_1598;
+
+ [public] typedef struct {
+ boolean8 sv1598_enforcekerberosreauthentication;
+ } SERVER_INFO_1599;
+
+ [public] typedef struct {
+ boolean8 sv1598_disabledos;
+ } SERVER_INFO_1600;
+
+ [public] typedef struct {
+ uint32 sv1598_lowdiskspaceminimum;
+ } SERVER_INFO_1601;
+
+ [public] typedef struct {
+ boolean8 sv_1598_disablestrictnamechecking;
+ } SERVER_INFO_1602;
+
[nopush,nopull] NET_API_STATUS NetServerGetInfo(
[in,unique] string *server_name,
[in] uint32 level,
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index d71a318a1f..4c5a758aab 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -1501,7 +1501,7 @@ cacl_set(TALLOC_CTX *ctx,
struct cli_state *ipc_cli,
POLICY_HND *pol,
const char *filename,
- const char *the_acl,
+ char *the_acl,
int mode,
int flags)
{
@@ -2113,11 +2113,13 @@ SMBC_getxattr_ctx(SMBCCTX *context,
StrCaseCmp(name, "system.dos_attr.inode") == 0) {
/* Yup. */
+ char *filename = (char *) name;
ret = cacl_get(context, talloc_tos(), srv,
ipc_srv == NULL ? NULL : ipc_srv->cli,
&ipc_srv->pol, path,
- CONST_DISCARD(char *, name),
- CONST_DISCARD(char *, value), size);
+ filename,
+ CONST_DISCARD(char *, value),
+ size);
if (ret < 0 && errno == 0) {
errno = SMBC_errno(context, srv->cli);
}
@@ -2236,7 +2238,8 @@ SMBC_removexattr_ctx(SMBCCTX *context,
/* Yup. */
ret = cacl_set(talloc_tos(), srv->cli,
ipc_srv->cli, &ipc_srv->pol, path,
- name + 19, SMBC_XATTR_MODE_REMOVE, 0);
+ CONST_DISCARD(char *, name) + 19,
+ SMBC_XATTR_MODE_REMOVE, 0);
TALLOC_FREE(frame);
return ret;
}
diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index 9c1c1647ba..2044ebec48 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -53,6 +53,62 @@ enum onefs_acl_wire_format
#define PARM_UNMAPPABLE_SIDS_IGNORE_LIST_DEFAULT NULL
#define PARM_IGNORE_SACL "ignore sacl"
#define PARM_IGNORE_SACL_DEFAULT false
+#define PARM_ATIME_NOW "atime now files"
+#define PARM_ATIME_SLOP "atime now slop"
+#define PARM_CTIME_NOW "ctime now files"
+#define PARM_CTIME_SLOP "ctime now slop"
+#define PARM_MTIME_NOW "mtime now files"
+#define PARM_MTIME_SLOP "mtime now slop"
+#define PARM_MTIME_STATIC "mtime static files"
+#define PARM_ATIME_STATIC "atime static files"
+
+#define IS_CTIME_NOW_PATH(conn,cfg,path) ((conn) && is_in_path((path),\
+ (cfg)->ctime_now_list,(conn)->case_sensitive))
+#define IS_MTIME_NOW_PATH(conn,cfg,path) ((conn) && is_in_path((path),\
+ (cfg)->mtime_now_list,(conn)->case_sensitive))
+#define IS_ATIME_NOW_PATH(conn,cfg,path) ((conn) && is_in_path((path),\
+ (cfg)->atime_now_list,(conn)->case_sensitive))
+#define IS_MTIME_STATIC_PATH(conn,cfg,path) ((conn) && is_in_path((path),\
+ (cfg)->mtime_static_list,(conn)->case_sensitive))
+#define IS_ATIME_STATIC_PATH(conn,cfg,path) ((conn) && is_in_path((path),\
+ (cfg)->atime_static_list,(conn)->case_sensitive))
+
+/*
+ * Store some commonly evaluated parameters to avoid loadparm pain.
+ */
+
+#define ONEFS_VFS_CONFIG_INITIALIZED 0x00010000
+
+#define ONEFS_VFS_CONFIG_FAKETIMESTAMPS 0x00000001
+
+
+struct onefs_vfs_config
+{
+ int32 init_flags;
+
+ /* data for fake timestamps */
+ int atime_slop;
+ int ctime_slop;
+ int mtime_slop;
+
+ /* Per-share list of files to fake the create time for. */
+ name_compare_entry *ctime_now_list;
+
+ /* Per-share list of files to fake the modification time for. */
+ name_compare_entry *mtime_now_list;
+
+ /* Per-share list of files to fake the access time for. */
+ name_compare_entry *atime_now_list;
+
+ /* Per-share list of files to fake the modification time for. */
+ name_compare_entry *mtime_static_list;
+
+ /* The access time will equal the create time. */
+ /* The modification time will equal the create time.*/
+
+ /* Per-share list of files to fake the access time for. */
+ name_compare_entry *atime_static_list;
+};
/*
* vfs interface handlers
@@ -121,6 +177,8 @@ NTSTATUS onefs_samba_sd_to_sd(uint32 security_info_sent, SEC_DESC *psd,
NTSTATUS onefs_split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
char **pbase, char **pstream);
+bool onefs_get_config(int snum, int config_type,
+ struct onefs_vfs_config *cfg);
/*
* System Interfaces
*/
diff --git a/source3/modules/onefs_streams.c b/source3/modules/onefs_streams.c
index 78b0fd61bf..615edf379d 100644
--- a/source3/modules/onefs_streams.c
+++ b/source3/modules/onefs_streams.c
@@ -216,6 +216,58 @@ static void merge_stat(SMB_STRUCT_STAT *stream_sbuf,
stream_sbuf->st_flags |= base_sbuf->st_flags & dos_flags;
}
+/* fake timestamps */
+static void onefs_adjust_stat_time(vfs_handle_struct *handle, const char *fname,
+ SMB_STRUCT_STAT *sbuf)
+{
+ struct onefs_vfs_config cfg;
+ struct timeval tv_now = {0, 0};
+ bool static_mtime = False;
+ bool static_atime = False;
+
+ if (!onefs_get_config(SNUM(handle->conn),
+ ONEFS_VFS_CONFIG_FAKETIMESTAMPS, &cfg)) {
+ return;
+ }
+
+ if (IS_MTIME_STATIC_PATH(handle->conn, &cfg, fname)) {
+ sbuf->st_mtime = sbuf->st_birthtime;
+ static_mtime = True;
+ }
+ if (IS_ATIME_STATIC_PATH(handle->conn, &cfg, fname)) {
+ sbuf->st_atime = sbuf->st_birthtime;
+ static_atime = True;
+ }
+
+ if (IS_CTIME_NOW_PATH(handle->conn, &cfg, fname)) {
+ if (cfg.ctime_slop < 0) {
+ sbuf->st_birthtime = INT_MAX - 1;
+ } else {
+ GetTimeOfDay(&tv_now);
+ sbuf->st_birthtime = tv_now.tv_sec + cfg.ctime_slop;
+ }
+ }
+
+ if (!static_mtime && IS_MTIME_NOW_PATH(handle->conn,&cfg,fname)) {
+ if (cfg.mtime_slop < 0) {
+ sbuf->st_mtime = INT_MAX - 1;
+ } else {
+ if (tv_now.tv_sec == 0)
+ GetTimeOfDay(&tv_now);
+ sbuf->st_mtime = tv_now.tv_sec + cfg.mtime_slop;
+ }
+ }
+ if (!static_atime && IS_ATIME_NOW_PATH(handle->conn,&cfg,fname)) {
+ if (cfg.atime_slop < 0) {
+ sbuf->st_atime = INT_MAX - 1;
+ } else {
+ if (tv_now.tv_sec == 0)
+ GetTimeOfDay(&tv_now);
+ sbuf->st_atime = tv_now.tv_sec + cfg.atime_slop;
+ }
+ }
+}
+
static int stat_stream(vfs_handle_struct *handle, const char *base,
const char *stream, SMB_STRUCT_STAT *sbuf, int flags)
{
@@ -257,15 +309,16 @@ int onefs_stat(vfs_handle_struct *handle, const char *path,
return ret;
if (!is_stream) {
- return SMB_VFS_NEXT_STAT(handle, path, sbuf);
- }
-
- /* If it's the ::$DATA stream just stat the base file name. */
- if (!stream) {
- return SMB_VFS_NEXT_STAT(handle, base, sbuf);
+ ret = SMB_VFS_NEXT_STAT(handle, path, sbuf);
+ } else if (!stream) {
+ /* If it's the ::$DATA stream just stat the base file name. */
+ ret = SMB_VFS_NEXT_STAT(handle, base, sbuf);
+ } else {
+ ret = stat_stream(handle, base, stream, sbuf, 0);
}
- return stat_stream(handle, base, stream, sbuf, 0);
+ onefs_adjust_stat_time(handle, path, sbuf);
+ return ret;
}
int onefs_fstat(vfs_handle_struct *handle, struct files_struct *fsp,
@@ -288,6 +341,7 @@ int onefs_fstat(vfs_handle_struct *handle, struct files_struct *fsp,
}
}
+ onefs_adjust_stat_time(handle, fsp->fsp_name, sbuf);
return ret;
}
@@ -304,15 +358,17 @@ int onefs_lstat(vfs_handle_struct *handle, const char *path,
return ret;
if (!is_stream) {
- return SMB_VFS_NEXT_LSTAT(handle, path, sbuf);
- }
-
- /* If it's the ::$DATA stream just stat the base file name. */
- if (!stream) {
- return SMB_VFS_NEXT_LSTAT(handle, base, sbuf);
+ ret = SMB_VFS_NEXT_LSTAT(handle, path, sbuf);
+ } else if (!stream) {
+ /* If it's the ::$DATA stream just stat the base file name. */
+ ret = SMB_VFS_NEXT_LSTAT(handle, base, sbuf);
+ } else {
+ ret = stat_stream(handle, base, stream, sbuf,
+ AT_SYMLINK_NOFOLLOW);
}
- return stat_stream(handle, base, stream, sbuf, AT_SYMLINK_NOFOLLOW);
+ onefs_adjust_stat_time(handle, path, sbuf);
+ return ret;
}
int onefs_unlink(vfs_handle_struct *handle, const char *path)
diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index e2f272aa11..1f11f691a4 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -24,6 +24,118 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
+#define ONEFS_DATA_FASTBUF 10
+
+struct onefs_vfs_config share_config[ONEFS_DATA_FASTBUF];
+struct onefs_vfs_config *pshare_config;
+
+static void onefs_load_faketimestamp_config(struct vfs_handle_struct *handle,
+ struct onefs_vfs_config *cfg)
+{
+ const char **parm;
+ int snum = SNUM(handle->conn);
+
+ parm = lp_parm_string_list(snum, PARM_ONEFS_TYPE, PARM_ATIME_NOW,
+ NULL);
+
+ if (parm) {
+ cfg->init_flags |= ONEFS_VFS_CONFIG_FAKETIMESTAMPS;
+ set_namearray(&cfg->atime_now_list,*parm);
+ }
+
+ parm = lp_parm_string_list(snum, PARM_ONEFS_TYPE, PARM_CTIME_NOW,
+ NULL);
+
+ if (parm) {
+ cfg->init_flags |= ONEFS_VFS_CONFIG_FAKETIMESTAMPS;
+ set_namearray(&cfg->ctime_now_list,*parm);
+ }
+
+ parm = lp_parm_string_list(snum, PARM_ONEFS_TYPE, PARM_MTIME_NOW,
+ NULL);
+
+ if (parm) {
+ cfg->init_flags |= ONEFS_VFS_CONFIG_FAKETIMESTAMPS;
+ set_namearray(&cfg->mtime_now_list,*parm);
+ }
+
+ parm = lp_parm_string_list(snum, PARM_ONEFS_TYPE, PARM_ATIME_STATIC,
+ NULL);
+
+ if (parm) {
+ cfg->init_flags |= ONEFS_VFS_CONFIG_FAKETIMESTAMPS;
+ set_namearray(&cfg->atime_static_list,*parm);
+ }
+
+ parm = lp_parm_string_list(snum, PARM_ONEFS_TYPE, PARM_MTIME_STATIC,
+ NULL);
+
+ if (parm) {
+ cfg->init_flags |= ONEFS_VFS_CONFIG_FAKETIMESTAMPS;
+ set_namearray(&cfg->mtime_static_list,*parm);
+ }
+
+ cfg->atime_slop = lp_parm_int(snum, PARM_ONEFS_TYPE, PARM_ATIME_SLOP,0);
+ cfg->ctime_slop = lp_parm_int(snum, PARM_ONEFS_TYPE, PARM_CTIME_SLOP,0);
+ cfg->mtime_slop = lp_parm_int(snum, PARM_ONEFS_TYPE, PARM_MTIME_SLOP,0);
+}
+
+
+static int onefs_load_config(struct vfs_handle_struct *handle)
+{
+ int snum = SNUM(handle->conn);
+ int share_count = lp_numservices();
+
+ if (!pshare_config) {
+
+ if (share_count <= ONEFS_DATA_FASTBUF)
+ pshare_config = share_config;
+ else {
+ pshare_config = SMB_MALLOC_ARRAY(struct onefs_vfs_config,
+ share_count);
+ if (!pshare_config) {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ memset(pshare_config, 0,
+ (sizeof(struct onefs_vfs_config) * share_count));
+ }
+ }
+
+ if ((pshare_config[snum].init_flags &
+ ONEFS_VFS_CONFIG_INITIALIZED) == 0) {
+ pshare_config[snum].init_flags =
+ ONEFS_VFS_CONFIG_INITIALIZED;
+ onefs_load_faketimestamp_config(handle,
+ &pshare_config[snum]);
+ }
+
+ return 0;
+}
+
+bool onefs_get_config(int snum, int config_type,
+ struct onefs_vfs_config *cfg)
+{
+ if (share_config[snum].init_flags & config_type)
+ *cfg = share_config[snum];
+ else
+ return false;
+
+ return true;
+}
+
+static int onefs_connect(struct vfs_handle_struct *handle, const char *service,
+ const char *user)
+{
+ int ret = onefs_load_config(handle);
+
+ if (ret)
+ return ret;
+
+ return SMB_VFS_NEXT_CONNECT(handle, service, user);
+}
+
static int onefs_mkdir(vfs_handle_struct *handle, const char *path,
mode_t mode)
{
@@ -130,6 +242,8 @@ static uint32_t onefs_fs_capabilities(struct vfs_handle_struct *handle)
}
static vfs_op_tuple onefs_ops[] = {
+ {SMB_VFS_OP(onefs_connect), SMB_VFS_OP_CONNECT,
+ SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(onefs_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(onefs_mkdir), SMB_VFS_OP_MKDIR,
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 7a8086c63e..c79caf2d36 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -6,17 +6,17 @@
Copyright (C) Gerald (Jerry) Carter 2000-2006
Copyright (C) Andrew Bartlett 2001-2002
Copyright (C) Stefan (metze) Metzmacher 2002
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -78,7 +78,7 @@ time_t pdb_get_pass_can_change_time(const struct samu *sampass)
*/
if (sampass->pass_last_set_time == 0)
return (time_t) 0;
-
+
/* if the time is max, and the field has been changed,
we're trying to update this real value from the sampass
to indicate that the user cannot change their password. jmcd
@@ -165,7 +165,7 @@ const uint8 *pdb_get_pw_history(const struct samu *sampass, uint32 *current_hist
/* Return the plaintext password if known. Most of the time
it isn't, so don't assume anything magic about this function.
-
+
Used to pass the plaintext to passdb backends that might
want to store more than just the NTLM hashes.
*/
@@ -183,18 +183,18 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
{
DOM_SID *gsid;
struct passwd *pwd;
-
+
/* Return the cached group SID if we have that */
if ( sampass->group_sid ) {
return sampass->group_sid;
}
-
+
/* generate the group SID from the user's primary Unix group */
-
+
if ( !(gsid = TALLOC_P( sampass, DOM_SID )) ) {
return NULL;
}
-
+
/* No algorithmic mapping, meaning that we have to figure out the
primary group SID according to group mapping and the user SID must
be a newly allocated one. We rely on the user's Unix primary gid.
@@ -210,12 +210,12 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
DEBUG(0,("pdb_get_group_sid: Failed to find Unix account for %s\n", pdb_get_username(sampass) ));
return NULL;
}
-
+
if ( pdb_gid_to_sid(pwd->pw_gid, gsid) ) {
enum lsa_SidType type = SID_NAME_UNKNOWN;
TALLOC_CTX *mem_ctx = talloc_init("pdb_get_group_sid");
bool lookup_ret;
-
+
if (!mem_ctx) {
return NULL;
}
@@ -237,12 +237,12 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
/* Just set it to the 'Domain Users' RID of 512 which will
always resolve to a name */
-
+
sid_copy( gsid, get_global_sam_sid() );
sid_append_rid( gsid, DOMAIN_GROUP_RID_USERS );
-
+
sampass->group_sid = gsid;
-
+
return sampass->group_sid;
}
@@ -251,19 +251,19 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
* @param sampass the struct samu in question
* @return the flags indicating the members initialised in the struct.
**/
-
+
enum pdb_value_state pdb_get_init_flags(const struct samu *sampass, enum pdb_elements element)
{
enum pdb_value_state ret = PDB_DEFAULT;
-
+
if (!sampass->change_flags || !sampass->set_flags)
return ret;
-
+
if (bitmap_query(sampass->set_flags, element)) {
DEBUG(11, ("element %d: SET\n", element));
ret = PDB_SET;
}
-
+
if (bitmap_query(sampass->change_flags, element)) {
DEBUG(11, ("element %d: CHANGED\n", element));
ret = PDB_CHANGED;
@@ -430,7 +430,7 @@ bool pdb_set_logon_divs(struct samu *sampass, uint16 hours, enum pdb_value_state
* @param flag The *new* flag to be set. Old flags preserved
* this flag is only added.
**/
-
+
bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pdb_value_state value_flag)
{
if (!sampass->set_flags) {
@@ -449,7 +449,7 @@ bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pd
return False;
}
}
-
+
switch(value_flag) {
case PDB_CHANGED:
if (!bitmap_set(sampass->change_flags, element)) {
@@ -494,7 +494,7 @@ bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value
{
if (!u_sid)
return False;
-
+
sid_copy(&sampass->user_sid, u_sid);
DEBUG(10, ("pdb_set_user_sid: setting user sid %s\n",
@@ -506,7 +506,7 @@ bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value
bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_value_state flag)
{
DOM_SID new_sid;
-
+
if (!u_sid)
return False;
@@ -517,7 +517,7 @@ bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_
DEBUG(1, ("pdb_set_user_sid_from_string: %s isn't a valid SID!\n", u_sid));
return False;
}
-
+
if (!pdb_set_user_sid(sampass, &new_sid, flag)) {
DEBUG(1, ("pdb_set_user_sid_from_string: could not set sid %s on struct samu!\n", u_sid));
return False;
@@ -580,7 +580,7 @@ bool pdb_set_username(struct samu *sampass, const char *username, enum pdb_value
} else {
sampass->username = PDB_NOT_QUITE_NULL;
}
-
+
return pdb_set_init_flags(sampass, PDB_USERNAME, flag);
}
@@ -618,7 +618,7 @@ bool pdb_set_nt_username(struct samu *sampass, const char *nt_username, enum pdb
(sampass->nt_username)?(sampass->nt_username):"NULL"));
sampass->nt_username = talloc_strdup(sampass, nt_username);
-
+
if (!sampass->nt_username) {
DEBUG(0, ("pdb_set_nt_username: talloc_strdup() failed!\n"));
return False;
@@ -639,7 +639,7 @@ bool pdb_set_fullname(struct samu *sampass, const char *full_name, enum pdb_valu
if (full_name) {
DEBUG(10, ("pdb_set_full_name: setting full name %s, was %s\n", full_name,
(sampass->full_name)?(sampass->full_name):"NULL"));
-
+
sampass->full_name = talloc_strdup(sampass, full_name);
if (!sampass->full_name) {
@@ -662,7 +662,7 @@ bool pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum p
if (logon_script) {
DEBUG(10, ("pdb_set_logon_script: setting logon script %s, was %s\n", logon_script,
(sampass->logon_script)?(sampass->logon_script):"NULL"));
-
+
sampass->logon_script = talloc_strdup(sampass, logon_script);
if (!sampass->logon_script) {
@@ -672,7 +672,7 @@ bool pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum p
} else {
sampass->logon_script = PDB_NOT_QUITE_NULL;
}
-
+
return pdb_set_init_flags(sampass, PDB_LOGONSCRIPT, flag);
}
@@ -685,9 +685,9 @@ bool pdb_set_profile_path(struct samu *sampass, const char *profile_path, enum p
if (profile_path) {
DEBUG(10, ("pdb_set_profile_path: setting profile path %s, was %s\n", profile_path,
(sampass->profile_path)?(sampass->profile_path):"NULL"));
-
+
sampass->profile_path = talloc_strdup(sampass, profile_path);
-
+
if (!sampass->profile_path) {
DEBUG(0, ("pdb_set_profile_path: talloc_strdup() failed!\n"));
return False;
@@ -708,9 +708,9 @@ bool pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_val
if (dir_drive) {
DEBUG(10, ("pdb_set_dir_drive: setting dir drive %s, was %s\n", dir_drive,
(sampass->dir_drive)?(sampass->dir_drive):"NULL"));
-
+
sampass->dir_drive = talloc_strdup(sampass, dir_drive);
-
+
if (!sampass->dir_drive) {
DEBUG(0, ("pdb_set_dir_drive: talloc_strdup() failed!\n"));
return False;
@@ -719,7 +719,7 @@ bool pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_val
} else {
sampass->dir_drive = PDB_NOT_QUITE_NULL;
}
-
+
return pdb_set_init_flags(sampass, PDB_DRIVE, flag);
}
@@ -732,9 +732,9 @@ bool pdb_set_homedir(struct samu *sampass, const char *home_dir, enum pdb_value_
if (home_dir) {
DEBUG(10, ("pdb_set_homedir: setting home dir %s, was %s\n", home_dir,
(sampass->home_dir)?(sampass->home_dir):"NULL"));
-
+
sampass->home_dir = talloc_strdup(sampass, home_dir);
-
+
if (!sampass->home_dir) {
DEBUG(0, ("pdb_set_home_dir: talloc_strdup() failed!\n"));
return False;
@@ -775,7 +775,7 @@ bool pdb_set_workstations(struct samu *sampass, const char *workstations, enum p
if (workstations) {
DEBUG(10, ("pdb_set_workstations: setting workstations %s, was %s\n", workstations,
(sampass->workstations)?(sampass->workstations):"NULL"));
-
+
sampass->workstations = talloc_strdup(sampass, workstations);
if (!sampass->workstations) {
@@ -796,7 +796,7 @@ bool pdb_set_comment(struct samu *sampass, const char *comment, enum pdb_value_s
{
if (comment) {
sampass->comment = talloc_strdup(sampass, comment);
-
+
if (!sampass->comment) {
DEBUG(0, ("pdb_set_comment: talloc_strdup() failed!\n"));
return False;
@@ -816,7 +816,7 @@ bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb
{
if (munged_dial) {
sampass->munged_dial = talloc_strdup(sampass, munged_dial);
-
+
if (!sampass->munged_dial) {
DEBUG(0, ("pdb_set_munged_dial: talloc_strdup() failed!\n"));
return False;
@@ -835,7 +835,7 @@ bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb
bool pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum pdb_value_state flag)
{
data_blob_clear_free(&sampass->nt_pw);
-
+
if (pwd) {
sampass->nt_pw =
data_blob_talloc(sampass, pwd, NT_HASH_LEN);
@@ -853,7 +853,7 @@ bool pdb_set_nt_passwd(struct samu *sampass, const uint8 pwd[NT_HASH_LEN], enum
bool pdb_set_lanman_passwd(struct samu *sampass, const uint8 pwd[LM_HASH_LEN], enum pdb_value_state flag)
{
data_blob_clear_free(&sampass->lm_pw);
-
+
/* on keep the password if we are allowing LANMAN authentication */
if (pwd && lp_lanman_auth() ) {
@@ -900,7 +900,7 @@ bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum
memset(sampass->plaintext_pw,'\0',strlen(sampass->plaintext_pw)+1);
sampass->plaintext_pw = talloc_strdup(sampass, password);
-
+
if (!sampass->plaintext_pw) {
DEBUG(0, ("pdb_set_unknown_str: talloc_strdup() failed!\n"));
return False;
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index bfbc35f3d3..ad3a95826a 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -31,7 +31,7 @@ static TDB_CONTEXT *tdb_printers; /* used for printers files */
#define PRINTERS_PREFIX "PRINTERS/"
#define SECDESC_PREFIX "SECDESC/"
#define GLOBAL_C_SETPRINTER "GLOBALS/c_setprinter"
-
+
#define NTDRIVERS_DATABASE_VERSION_1 1
#define NTDRIVERS_DATABASE_VERSION_2 2
#define NTDRIVERS_DATABASE_VERSION_3 3 /* little endian version of v2 */
@@ -209,7 +209,7 @@ struct table_node {
const char *short_archi;
int version;
};
-
+
#define SPL_ARCH_WIN40 "WIN40"
#define SPL_ARCH_W32X86 "W32X86"
#define SPL_ARCH_W32MIPS "W32MIPS"
@@ -276,9 +276,9 @@ static TDB_DATA make_printers_secdesc_tdbkey(TALLOC_CTX *ctx,
static bool upgrade_to_version_3(void)
{
TDB_DATA kbuf, newkey, dbuf;
-
+
DEBUG(0,("upgrade_to_version_3: upgrading print tdb's to version 3\n"));
-
+
for (kbuf = tdb_firstkey(tdb_drivers); kbuf.dptr;
newkey = tdb_nextkey(tdb_drivers, kbuf), free(kbuf.dptr), kbuf=newkey) {
@@ -297,7 +297,7 @@ static bool upgrade_to_version_3(void)
return False;
}
}
-
+
if (strncmp((const char *)kbuf.dptr, PRINTERS_PREFIX, strlen(PRINTERS_PREFIX)) == 0) {
DEBUG(0,("upgrade_to_version_3:moving printer\n"));
if (tdb_store(tdb_printers, kbuf, dbuf, TDB_REPLACE) != 0) {
@@ -311,7 +311,7 @@ static bool upgrade_to_version_3(void)
return False;
}
}
-
+
if (strncmp((const char *)kbuf.dptr, SECDESC_PREFIX, strlen(SECDESC_PREFIX)) == 0) {
DEBUG(0,("upgrade_to_version_3:moving secdesc\n"));
if (tdb_store(tdb_printers, kbuf, dbuf, TDB_REPLACE) != 0) {
@@ -325,7 +325,7 @@ static bool upgrade_to_version_3(void)
return False;
}
}
-
+
SAFE_FREE(dbuf.dptr);
}
@@ -333,10 +333,10 @@ static bool upgrade_to_version_3(void)
}
/*******************************************************************
- Fix an issue with security descriptors. Printer sec_desc must
- use more than the generic bits that were previously used
+ Fix an issue with security descriptors. Printer sec_desc must
+ use more than the generic bits that were previously used
in <= 3.0.14a. They must also have a owner and group SID assigned.
- Otherwise, any printers than have been migrated to a Windows
+ Otherwise, any printers than have been migrated to a Windows
host using printmig.exe will not be accessible.
*******************************************************************/
@@ -381,29 +381,29 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
return 0;
}
sec = sd_orig->sd;
-
+
/* is this even valid? */
-
+
if ( !sec->dacl ) {
prs_mem_free( &ps );
return 0;
}
-
+
/* update access masks */
-
+
for ( i=0; i<sec->dacl->num_aces; i++ ) {
switch ( sec->dacl->aces[i].access_mask ) {
case (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS):
sec->dacl->aces[i].access_mask = PRINTER_ACE_PRINT;
break;
-
+
case GENERIC_ALL_ACCESS:
sec->dacl->aces[i].access_mask = PRINTER_ACE_FULL_CONTROL;
break;
-
+
case READ_CONTROL_ACCESS:
sec->dacl->aces[i].access_mask = PRINTER_ACE_MANAGE_DOCUMENTS;
-
+
default: /* no change */
break;
}
@@ -430,11 +430,11 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
prs_mem_free( &ps );
return 0;
}
-
+
prs_mem_free( &ps );
/* store it back */
-
+
sd_size = ndr_size_security_descriptor(sd_store->sd, NULL, 0)
+ sizeof(SEC_DESC_BUF);
if ( !prs_init(&ps, sd_size, ctx, MARSHALL) ) {
@@ -450,11 +450,11 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
data.dptr = (uint8 *)prs_data_p( &ps );
data.dsize = sd_size;
-
+
result = tdb_store( tdb_printers, key, data, TDB_REPLACE );
prs_mem_free( &ps );
-
+
/* 0 to continue and non-zero to stop traversal */
return (result == -1);
@@ -470,7 +470,7 @@ static bool upgrade_to_version_4(void)
DEBUG(0,("upgrade_to_version_4: upgrading printer security descriptors\n"));
- if ( !(ctx = talloc_init( "upgrade_to_version_4" )) )
+ if ( !(ctx = talloc_init( "upgrade_to_version_4" )) )
return False;
result = tdb_traverse( tdb_printers, sec_desc_upg_fn, ctx );
@@ -481,10 +481,10 @@ static bool upgrade_to_version_4(void)
}
/*******************************************************************
- Fix an issue with security descriptors. Printer sec_desc must
- use more than the generic bits that were previously used
+ Fix an issue with security descriptors. Printer sec_desc must
+ use more than the generic bits that were previously used
in <= 3.0.14a. They must also have a owner and group SID assigned.
- Otherwise, any printers than have been migrated to a Windows
+ Otherwise, any printers than have been migrated to a Windows
host using printmig.exe will not be accessible.
*******************************************************************/
@@ -513,7 +513,7 @@ static int normalize_printers_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
/* delete the original record and store under the normalized key */
if ( tdb_delete( the_tdb, key ) != 0 ) {
- DEBUG(0,("normalize_printers_fn: tdb_delete for [%s] failed!\n",
+ DEBUG(0,("normalize_printers_fn: tdb_delete for [%s] failed!\n",
key.dptr));
return 1;
}
@@ -537,7 +537,7 @@ static bool upgrade_to_version_5(void)
DEBUG(0,("upgrade_to_version_5: normalizing printer keys\n"));
- if ( !(ctx = talloc_init( "upgrade_to_version_5" )) )
+ if ( !(ctx = talloc_init( "upgrade_to_version_5" )) )
return False;
result = tdb_traverse( tdb_printers, normalize_printers_fn, NULL );
@@ -559,7 +559,7 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
if ( tdb_drivers && tdb_printers && tdb_forms )
return True;
-
+
if (tdb_drivers)
tdb_close(tdb_drivers);
tdb_drivers = tdb_open_log(state_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
@@ -568,7 +568,7 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
state_path("ntdrivers.tdb"), strerror(errno) ));
return False;
}
-
+
if (tdb_printers)
tdb_close(tdb_printers);
tdb_printers = tdb_open_log(state_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
@@ -577,7 +577,7 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
state_path("ntprinters.tdb"), strerror(errno) ));
return False;
}
-
+
if (tdb_forms)
tdb_close(tdb_forms);
tdb_forms = tdb_open_log(state_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
@@ -586,9 +586,9 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
state_path("ntforms.tdb"), strerror(errno) ));
return False;
}
-
+
/* handle a Samba upgrade */
-
+
vers_id = tdb_fetch_int32(tdb_drivers, vstring);
if (vers_id == -1) {
DEBUG(10, ("Fresh database\n"));
@@ -598,13 +598,13 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
if ( vers_id != NTDRIVERS_DATABASE_VERSION_5 ) {
- if ((vers_id == NTDRIVERS_DATABASE_VERSION_1) || (IREV(vers_id) == NTDRIVERS_DATABASE_VERSION_1)) {
+ if ((vers_id == NTDRIVERS_DATABASE_VERSION_1) || (IREV(vers_id) == NTDRIVERS_DATABASE_VERSION_1)) {
if (!upgrade_to_version_3())
return False;
tdb_store_int32(tdb_drivers, vstring, NTDRIVERS_DATABASE_VERSION_3);
vers_id = NTDRIVERS_DATABASE_VERSION_3;
- }
-
+ }
+
if ((vers_id == NTDRIVERS_DATABASE_VERSION_2) || (IREV(vers_id) == NTDRIVERS_DATABASE_VERSION_2)) {
/* Written on a bigendian machine with old fetch_int code. Save as le. */
/* The only upgrade between V2 and V3 is to save the version in little-endian. */
@@ -632,7 +632,7 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
return False;
}
}
-
+
update_c_setprinter(True);
/*
@@ -652,7 +652,7 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
reset_all_printerdata);
/* of course, none of the message callbacks matter if you don't
- tell messages.c that you interested in receiving PRINT_GENERAL
+ tell messages.c that you interested in receiving PRINT_GENERAL
msgs. This is done in claim_connection() */
@@ -698,15 +698,15 @@ static int traverse_counting_printers(TDB_CONTEXT *t, TDB_DATA key,
TDB_DATA data, void *context)
{
int *printer_count = (int*)context;
-
+
if (memcmp(PRINTERS_PREFIX, key.dptr, sizeof(PRINTERS_PREFIX)-1) == 0) {
(*printer_count)++;
DEBUG(10,("traverse_counting_printers: printer = [%s] printer_count = %d\n", key.dptr, *printer_count));
}
-
+
return 0;
}
-
+
/*******************************************************************
Update the spooler global c_setprinter. This variable is initialized
when the parent smbd starts with the number of existing printers. It
@@ -718,12 +718,12 @@ uint32 update_c_setprinter(bool initialize)
{
int32 c_setprinter;
int32 printer_count = 0;
-
+
tdb_lock_bystring(tdb_printers, GLOBAL_C_SETPRINTER);
-
+
/* Traverse the tdb, counting the printers */
tdb_traverse(tdb_printers, traverse_counting_printers, (void *)&printer_count);
-
+
/* If initializing, set c_setprinter to current printers count
* otherwise, bump it by the current printer count
*/
@@ -731,12 +731,12 @@ uint32 update_c_setprinter(bool initialize)
c_setprinter = tdb_fetch_int32(tdb_printers, GLOBAL_C_SETPRINTER) + printer_count;
else
c_setprinter = printer_count;
-
+
DEBUG(10,("update_c_setprinter: c_setprinter = %u\n", (unsigned int)c_setprinter));
tdb_store_int32(tdb_printers, GLOBAL_C_SETPRINTER, c_setprinter);
-
+
tdb_unlock_bystring(tdb_printers, GLOBAL_C_SETPRINTER);
-
+
return (uint32)c_setprinter;
}
@@ -747,12 +747,12 @@ uint32 update_c_setprinter(bool initialize)
uint32 get_c_setprinter(void)
{
int32 c_setprinter = tdb_fetch_int32(tdb_printers, GLOBAL_C_SETPRINTER);
-
+
if (c_setprinter == (int32)-1)
c_setprinter = update_c_setprinter(True);
-
+
DEBUG(10,("get_c_setprinter: c_setprinter = %d\n", c_setprinter));
-
+
return (uint32)c_setprinter;
}
@@ -773,11 +773,9 @@ int get_builtin_ntforms(nt_forms_struct **list)
get a builtin form struct
****************************************************************************/
-bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form)
+bool get_a_builtin_ntform_by_string(const char *form_name, nt_forms_struct *form)
{
int i,count;
- fstring form_name;
- unistr2_to_ascii(form_name, uni_formname, sizeof(form_name));
DEBUGADD(6,("Looking for builtin form %s \n", form_name));
count = sizeof(default_forms) / sizeof(default_forms[0]);
for (i=0;i<count;i++) {
@@ -791,6 +789,13 @@ bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form)
return (i !=count);
}
+bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form)
+{
+ fstring form_name;
+ unistr2_to_ascii(form_name, uni_formname, sizeof(form_name));
+ return get_a_builtin_ntform_by_string(form_name, form);
+}
+
/****************************************************************************
get a form struct list.
****************************************************************************/
@@ -807,13 +812,13 @@ int get_ntforms(nt_forms_struct **list)
for (kbuf = tdb_firstkey(tdb_forms);
kbuf.dptr;
- newkey = tdb_nextkey(tdb_forms, kbuf), free(kbuf.dptr), kbuf=newkey)
+ newkey = tdb_nextkey(tdb_forms, kbuf), free(kbuf.dptr), kbuf=newkey)
{
- if (strncmp((const char *)kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) != 0)
+ if (strncmp((const char *)kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) != 0)
continue;
-
+
dbuf = tdb_fetch(tdb_forms, kbuf);
- if (!dbuf.dptr)
+ if (!dbuf.dptr)
continue;
fstrcpy(form.name, (const char *)kbuf.dptr+strlen(FORMS_PREFIX));
@@ -821,7 +826,7 @@ int get_ntforms(nt_forms_struct **list)
&i, &form.flag, &form.width, &form.length, &form.left,
&form.top, &form.right, &form.bottom);
SAFE_FREE(dbuf.dptr);
- if (ret != dbuf.dsize)
+ if (ret != dbuf.dsize)
continue;
*list = SMB_REALLOC_ARRAY(*list, nt_forms_struct, n+1);
@@ -832,7 +837,7 @@ int get_ntforms(nt_forms_struct **list)
(*list)[n] = form;
n++;
}
-
+
return n;
}
@@ -888,11 +893,10 @@ int write_ntforms(nt_forms_struct **list, int number)
/****************************************************************************
add a form struct at the end of the list
****************************************************************************/
-bool add_a_form(nt_forms_struct **list, const FORM *form, int *count)
+bool add_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int *count)
{
int n=0;
bool update;
- fstring form_name;
/*
* NT tries to add forms even when
@@ -901,10 +905,9 @@ bool add_a_form(nt_forms_struct **list, const FORM *form, int *count)
*/
update=False;
-
- unistr2_to_ascii(form_name, &form->name, sizeof(form_name));
+
for (n=0; n<*count; n++) {
- if ( strequal((*list)[n].name, form_name) ) {
+ if ( strequal((*list)[n].name, form->form_name) ) {
update=True;
break;
}
@@ -915,20 +918,20 @@ bool add_a_form(nt_forms_struct **list, const FORM *form, int *count)
DEBUG(0,("add_a_form: failed to enlarge forms list!\n"));
return False;
}
- unistr2_to_ascii((*list)[n].name, &form->name, sizeof((*list)[n].name));
+ fstrcpy((*list)[n].name, form->form_name);
(*count)++;
}
-
- (*list)[n].flag=form->flags;
- (*list)[n].width=form->size_x;
- (*list)[n].length=form->size_y;
- (*list)[n].left=form->left;
- (*list)[n].top=form->top;
- (*list)[n].right=form->right;
- (*list)[n].bottom=form->bottom;
- DEBUG(6,("add_a_form: Successfully %s form [%s]\n",
- update ? "updated" : "added", form_name));
+ (*list)[n].flag = form->flags;
+ (*list)[n].width = form->size.width;
+ (*list)[n].length = form->size.height;
+ (*list)[n].left = form->area.left;
+ (*list)[n].top = form->area.top;
+ (*list)[n].right = form->area.right;
+ (*list)[n].bottom = form->area.bottom;
+
+ DEBUG(6,("add_a_form: Successfully %s form [%s]\n",
+ update ? "updated" : "added", form->form_name));
return True;
}
@@ -937,25 +940,22 @@ bool add_a_form(nt_forms_struct **list, const FORM *form, int *count)
Delete a named form struct.
****************************************************************************/
-bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret)
+bool delete_a_form(nt_forms_struct **list, const char *del_name, int *count, WERROR *ret)
{
char *key = NULL;
int n=0;
- fstring form_name;
*ret = WERR_OK;
- unistr2_to_ascii(form_name, del_name, sizeof(form_name));
-
for (n=0; n<*count; n++) {
- if (!strncmp((*list)[n].name, form_name, strlen(form_name))) {
- DEBUG(103, ("delete_a_form, [%s] in list\n", form_name));
+ if (!strncmp((*list)[n].name, del_name, strlen(del_name))) {
+ DEBUG(103, ("delete_a_form, [%s] in list\n", del_name));
break;
}
}
if (n == *count) {
- DEBUG(10,("delete_a_form, [%s] not found\n", form_name));
+ DEBUG(10,("delete_a_form, [%s] not found\n", del_name));
*ret = WERR_INVALID_PARAM;
return False;
}
@@ -977,28 +977,26 @@ bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR
Update a form struct.
****************************************************************************/
-void update_a_form(nt_forms_struct **list, const FORM *form, int count)
+void update_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int count)
{
int n=0;
- fstring form_name;
- unistr2_to_ascii(form_name, &(form->name), sizeof(form_name));
- DEBUG(106, ("[%s]\n", form_name));
+ DEBUG(106, ("[%s]\n", form->form_name));
for (n=0; n<count; n++) {
DEBUGADD(106, ("n [%d]:[%s]\n", n, (*list)[n].name));
- if (!strncmp((*list)[n].name, form_name, strlen(form_name)))
+ if (!strncmp((*list)[n].name, form->form_name, strlen(form->form_name)))
break;
}
if (n==count) return;
- (*list)[n].flag=form->flags;
- (*list)[n].width=form->size_x;
- (*list)[n].length=form->size_y;
- (*list)[n].left=form->left;
- (*list)[n].top=form->top;
- (*list)[n].right=form->right;
- (*list)[n].bottom=form->bottom;
+ (*list)[n].flag = form->flags;
+ (*list)[n].width = form->size.width;
+ (*list)[n].length = form->size.height;
+ (*list)[n].left = form->area.left;
+ (*list)[n].top = form->area.top;
+ (*list)[n].right = form->area.right;
+ (*list)[n].bottom = form->area.bottom;
}
/****************************************************************************
@@ -1585,9 +1583,9 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
/*
* This is a Microsoft'ism. See references in MSDN to VER_FILEVERSION
- * for more details. Version in this case is not just the version of the
+ * for more details. Version in this case is not just the version of the
* file, but the version in the sense of kernal mode (2) vs. user mode
- * (3) drivers. Other bits of the version fields are the version info.
+ * (3) drivers. Other bits of the version fields are the version info.
* JRR 010716
*/
cversion = major & 0x0000ffff;
@@ -1595,9 +1593,9 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
case 2: /* WinNT drivers */
case 3: /* Win2K drivers */
break;
-
+
default:
- DEBUG(6,("get_correct_cversion: cversion invalid [%s] cversion = %d\n",
+ DEBUG(6,("get_correct_cversion: cversion invalid [%s] cversion = %d\n",
driverpath, cversion));
goto error_exit;
}
@@ -1676,7 +1674,7 @@ static WERROR clean_up_driver_struct_level_3(struct pipes_struct *rpc_pipe,
if (!architecture) {
return WERR_UNKNOWN_PRINTER_DRIVER;
}
-
+
/* jfm:7/16/2000 the client always sends the cversion=0.
* The server should check which version the driver is by reading
* the PE header of driver->driverpath.
@@ -1695,7 +1693,7 @@ static WERROR clean_up_driver_struct_level_3(struct pipes_struct *rpc_pipe,
return WERR_OK;
}
-
+
/****************************************************************************
****************************************************************************/
static WERROR clean_up_driver_struct_level_6(struct pipes_struct *rpc_pipe,
@@ -2160,10 +2158,10 @@ static uint32 add_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 *driver)
return (uint32)-1;
}
- /* .inf files do not always list a file for each of the four standard files.
+ /* .inf files do not always list a file for each of the four standard files.
* Don't prepend a path to a null filename, or client claims:
- * "The server on which the printer resides does not have a suitable
- * <printer driver name> printer driver installed. Click OK if you
+ * "The server on which the printer resides does not have a suitable
+ * <printer driver name> printer driver installed. Click OK if you
* wish to install the driver on your local machine."
*/
if (strlen(driver->driverpath)) {
@@ -2280,7 +2278,7 @@ static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **in
fstrcpy(info.name, driver);
fstrcpy(info.defaultdatatype, "RAW");
-
+
fstrcpy(info.driverpath, "");
fstrcpy(info.datafile, "");
fstrcpy(info.configfile, "");
@@ -2297,7 +2295,7 @@ static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **in
SAFE_FREE(info.dependentfiles);
return WERR_NOMEM;
}
-
+
return WERR_OK;
}
@@ -2391,9 +2389,9 @@ static uint32 dump_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32
uint32 result;
NT_PRINTER_DRIVER_INFO_LEVEL_3 *info3;
int i;
-
+
DEBUG(20,("Dumping printer driver at level [%d]\n", level));
-
+
switch (level)
{
case 3:
@@ -2402,7 +2400,7 @@ static uint32 dump_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32
result=5;
else {
info3=driver.info_3;
-
+
DEBUGADD(20,("version:[%d]\n", info3->cversion));
DEBUGADD(20,("name:[%s]\n", info3->name));
DEBUGADD(20,("environment:[%s]\n", info3->environment));
@@ -2412,7 +2410,7 @@ static uint32 dump_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32
DEBUGADD(20,("helpfile:[%s]\n", info3->helpfile));
DEBUGADD(20,("monitorname:[%s]\n", info3->monitorname));
DEBUGADD(20,("defaultdatatype:[%s]\n", info3->defaultdatatype));
-
+
for (i=0; info3->dependentfiles &&
*info3->dependentfiles[i]; i++) {
DEBUGADD(20,("dependentfile:[%s]\n",
@@ -2427,7 +2425,7 @@ static uint32 dump_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32
result=1;
break;
}
-
+
return result;
}
@@ -2464,7 +2462,7 @@ int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen)
nt_devmode->ttoption,
nt_devmode->collate,
nt_devmode->logpixels,
-
+
nt_devmode->fields,
nt_devmode->bitsperpel,
nt_devmode->pelswidth,
@@ -2597,7 +2595,7 @@ static WERROR update_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info)
int retlen;
WERROR ret;
TDB_DATA kbuf, dbuf;
-
+
/*
* in addprinter: no servername and the printer is the name
* in setprinter: servername is \\server
@@ -2712,8 +2710,8 @@ NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename)
ZERO_STRUCTP(nt_devmode);
slprintf(adevice, sizeof(adevice), "%s", default_devicename);
- fstrcpy(nt_devmode->devicename, adevice);
-
+ fstrcpy(nt_devmode->devicename, adevice);
+
fstrcpy(nt_devmode->formname, "Letter");
nt_devmode->specversion = 0x0401;
@@ -2752,7 +2750,7 @@ NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename)
nt_devmode->reserved2 = 0;
nt_devmode->panningwidth = 0;
nt_devmode->panningheight = 0;
-
+
nt_devmode->nt_dev_private = NULL;
return nt_devmode;
}
@@ -2826,7 +2824,7 @@ int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen)
int len = 0;
int extra_len = 0;
NT_DEVICEMODE devmode;
-
+
ZERO_STRUCT(devmode);
len += tdb_unpack(buf+len, buflen-len, "p", nt_devmode);
@@ -2855,7 +2853,7 @@ int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen)
&devmode.ttoption,
&devmode.collate,
&devmode.logpixels,
-
+
&devmode.fields,
&devmode.bitsperpel,
&devmode.pelswidth,
@@ -2871,14 +2869,14 @@ int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen)
&devmode.panningwidth,
&devmode.panningheight,
&devmode.nt_dev_private);
-
+
if (devmode.nt_dev_private) {
/* the len in tdb_unpack is an int value and
* devmode.driverextra is only a short
*/
len += tdb_unpack(buf+len, buflen-len, "B", &extra_len, &devmode.nt_dev_private);
devmode.driverextra=(uint16)extra_len;
-
+
/* check to catch an invalid TDB entry so we don't segfault */
if (devmode.driverextra == 0) {
devmode.nt_dev_private = NULL;
@@ -2901,37 +2899,37 @@ int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen)
/****************************************************************************
Allocate and initialize a new slot.
***************************************************************************/
-
+
int add_new_printer_key( NT_PRINTER_DATA *data, const char *name )
{
NT_PRINTER_KEY *d;
int key_index;
-
+
if ( !name || !data )
return -1;
/* allocate another slot in the NT_PRINTER_KEY array */
-
+
if ( !(d = TALLOC_REALLOC_ARRAY( data, data->keys, NT_PRINTER_KEY, data->num_keys+1)) ) {
DEBUG(0,("add_new_printer_key: Realloc() failed!\n"));
return -1;
}
data->keys = d;
-
+
key_index = data->num_keys;
-
+
/* initialze new key */
-
+
data->keys[key_index].name = talloc_strdup( data, name );
-
- if ( !(data->keys[key_index].values = TALLOC_ZERO_P( data, REGVAL_CTR )) )
+
+ if ( !(data->keys[key_index].values = TALLOC_ZERO_P( data, REGVAL_CTR )) )
return -1;
-
+
data->num_keys++;
DEBUG(10,("add_new_printer_key: Inserted new data key [%s]\n", name ));
-
+
return key_index;
}
@@ -2942,25 +2940,25 @@ int add_new_printer_key( NT_PRINTER_DATA *data, const char *name )
int delete_printer_key( NT_PRINTER_DATA *data, const char *name )
{
int i;
-
+
for ( i=0; i<data->num_keys; i++ ) {
if ( strequal( data->keys[i].name, name ) ) {
-
+
/* cleanup memory */
-
+
TALLOC_FREE( data->keys[i].name );
TALLOC_FREE( data->keys[i].values );
-
+
/* if not the end of the array, move remaining elements down one slot */
-
+
data->num_keys--;
if ( data->num_keys && (i < data->num_keys) )
memmove( &data->keys[i], &data->keys[i+1], sizeof(NT_PRINTER_KEY)*(data->num_keys-i) );
-
+
break;
}
}
-
+
return data->num_keys;
}
@@ -2968,28 +2966,28 @@ int delete_printer_key( NT_PRINTER_DATA *data, const char *name )
/****************************************************************************
search for a registry key name in the existing printer data
***************************************************************************/
-
+
int lookup_printerkey( NT_PRINTER_DATA *data, const char *name )
{
int key_index = -1;
int i;
-
+
if ( !data || !name )
return -1;
DEBUG(12,("lookup_printerkey: Looking for [%s]\n", name));
/* loop over all existing keys */
-
+
for ( i=0; i<data->num_keys; i++ ) {
if ( strequal(data->keys[i].name, name) ) {
DEBUG(12,("lookup_printerkey: Found [%s]!\n", name));
key_index = i;
break;
-
+
}
}
-
+
return key_index;
}
@@ -3004,7 +3002,7 @@ int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subke
char *p;
fstring *subkeys_ptr = NULL;
fstring subkeyname;
-
+
*subkeys = NULL;
if ( !data )
@@ -3017,33 +3015,33 @@ int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subke
if ( strlen(key) == 0 ) {
for ( i=0; i<data->num_keys; i++ ) {
-
+
/* found a match, so allocate space and copy the name */
-
+
if ( !(subkeys_ptr = SMB_REALLOC_ARRAY( subkeys_ptr, fstring, num_subkeys+2)) ) {
- DEBUG(0,("get_printer_subkeys: Realloc failed for [%d] entries!\n",
+ DEBUG(0,("get_printer_subkeys: Realloc failed for [%d] entries!\n",
num_subkeys+1));
return -1;
}
-
+
fstrcpy( subkeys_ptr[num_subkeys], data->keys[i].name );
num_subkeys++;
}
goto done;
}
-
+
/* asking for the subkeys of some key */
/* subkey paths are stored in the key name using '\' as the delimiter */
for ( i=0; i<data->num_keys; i++ ) {
if ( StrnCaseCmp(data->keys[i].name, key, strlen(key)) == 0 ) {
-
+
/* if we found the exact key, then break */
key_len = strlen( key );
if ( strlen(data->keys[i].name) == key_len )
break;
-
+
/* get subkey path */
p = data->keys[i].name + key_len;
@@ -3052,51 +3050,51 @@ int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subke
fstrcpy( subkeyname, p );
if ( (p = strchr( subkeyname, '\\' )) )
*p = '\0';
-
+
/* don't add a key more than once */
-
+
for ( j=0; j<num_subkeys; j++ ) {
if ( strequal( subkeys_ptr[j], subkeyname ) )
break;
}
-
+
if ( j != num_subkeys )
continue;
/* found a match, so allocate space and copy the name */
-
+
if ( !(subkeys_ptr = SMB_REALLOC_ARRAY( subkeys_ptr, fstring, num_subkeys+2)) ) {
- DEBUG(0,("get_printer_subkeys: Realloc failed for [%d] entries!\n",
+ DEBUG(0,("get_printer_subkeys: Realloc failed for [%d] entries!\n",
num_subkeys+1));
return 0;
}
-
+
fstrcpy( subkeys_ptr[num_subkeys], subkeyname );
num_subkeys++;
}
-
+
}
-
+
/* return error if the key was not found */
-
+
if ( i == data->num_keys ) {
SAFE_FREE(subkeys_ptr);
return -1;
}
-
+
done:
/* tag off the end */
-
+
if (num_subkeys)
fstrcpy(subkeys_ptr[num_subkeys], "" );
-
+
*subkeys = subkeys_ptr;
return num_subkeys;
}
#ifdef HAVE_ADS
-static void map_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name,
+static void map_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name,
const char *sz)
{
smb_ucs2_t conv_str[1024];
@@ -3105,11 +3103,11 @@ static void map_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name,
regval_ctr_delvalue(ctr, val_name);
str_size = push_ucs2(NULL, conv_str, sz, sizeof(conv_str),
STR_TERMINATE | STR_NOALIGN);
- regval_ctr_addvalue(ctr, val_name, REG_SZ,
+ regval_ctr_addvalue(ctr, val_name, REG_SZ,
(char *) conv_str, str_size);
}
-static void map_dword_into_ctr(REGVAL_CTR *ctr, const char *val_name,
+static void map_dword_into_ctr(REGVAL_CTR *ctr, const char *val_name,
uint32 dword)
{
regval_ctr_delvalue(ctr, val_name);
@@ -3122,7 +3120,7 @@ static void map_bool_into_ctr(REGVAL_CTR *ctr, const char *val_name,
{
uint8 bin_bool = (b ? 1 : 0);
regval_ctr_delvalue(ctr, val_name);
- regval_ctr_addvalue(ctr, val_name, REG_BINARY,
+ regval_ctr_addvalue(ctr, val_name, REG_BINARY,
(char *) &bin_bool, sizeof(bin_bool));
}
@@ -3142,12 +3140,12 @@ static void map_single_multi_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name,
/* Change to byte units. */
str_size *= sizeof(smb_ucs2_t);
- push_ucs2(NULL, conv_strs, multi_sz, str_size,
+ push_ucs2(NULL, conv_strs, multi_sz, str_size,
STR_TERMINATE | STR_NOALIGN);
regval_ctr_delvalue(ctr, val_name);
- regval_ctr_addvalue(ctr, val_name, REG_MULTI_SZ,
- (char *) conv_strs, str_size);
+ regval_ctr_addvalue(ctr, val_name, REG_MULTI_SZ,
+ (char *) conv_strs, str_size);
SAFE_FREE(conv_strs);
}
@@ -3204,7 +3202,7 @@ static bool map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
map_dword_into_ctr(ctr, SPOOL_REG_PRIORITY, info2->priority);
map_bool_into_ctr(ctr, SPOOL_REG_PRINTKEEPPRINTEDJOBS,
- (info2->attributes &
+ (info2->attributes &
PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS));
switch (info2->attributes & 0x3) {
@@ -3228,7 +3226,7 @@ static bool map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
/*****************************************************************
****************************************************************/
-static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2,
+static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2,
struct GUID guid)
{
int i;
@@ -3245,15 +3243,15 @@ static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2,
/* We used to store this as a REG_BINARY but that causes
Vista to whine */
- ZERO_STRUCT( unistr_guid );
-
+ ZERO_STRUCT( unistr_guid );
+
init_unistr2( &unistr_guid, GUID_string(talloc_tos(), &guid),
UNI_STR_TERMINATE );
- regval_ctr_addvalue(ctr, "objectGUID", REG_SZ,
- (char *)unistr_guid.buffer,
+ regval_ctr_addvalue(ctr, "objectGUID", REG_SZ,
+ (char *)unistr_guid.buffer,
unistr_guid.uni_max_len*2);
-
+
}
static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
@@ -3346,7 +3344,7 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
}
get_local_printer_publishing_data(ctx, &mods, printer->info_2->data);
- ads_mod_str(ctx, &mods, SPOOL_REG_PRINTERNAME,
+ ads_mod_str(ctx, &mods, SPOOL_REG_PRINTERNAME,
printer->info_2->sharename);
/* publish it */
@@ -3361,7 +3359,7 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
if (!ADS_ERR_OK(ads_rc))
DEBUG(3, ("error publishing %s: %s\n", printer->info_2->sharename, ads_errstr(ads_rc)));
-
+
talloc_destroy(ctx);
/* retreive the guid and store it locally */
@@ -3371,7 +3369,7 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
ads_msgfree(ads, res);
store_printer_guid(printer->info_2, guid);
win_rc = mod_a_printer(printer, 2);
- }
+ }
SAFE_FREE(prt_dn);
return win_rc;
@@ -3387,7 +3385,7 @@ static WERROR nt_printer_unpublish_ads(ADS_STRUCT *ads,
DEBUG(5, ("unpublishing printer %s\n", printer->info_2->printername));
/* remove the printer from the directory */
- ads_rc = ads_find_printer_on_server(ads, &res,
+ ads_rc = ads_find_printer_on_server(ads, &res,
printer->info_2->sharename, global_myname());
if (ADS_ERR_OK(ads_rc) && res && ads_count_replies(ads, res)) {
@@ -3460,7 +3458,7 @@ WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action)
ads->auth.password = secrets_fetch_machine_password(lp_workgroup(),
NULL, NULL);
- /* ads_connect() will find the DC for us */
+ /* ads_connect() will find the DC for us */
ads_rc = ads_connect(ads);
if (!ADS_ERR_OK(ads_rc)) {
DEBUG(3, ("ads_connect failed: %s\n", ads_errstr(ads_rc)));
@@ -3502,7 +3500,7 @@ WERROR check_published_printers(void)
ads->auth.password = secrets_fetch_machine_password(lp_workgroup(),
NULL, NULL);
- /* ads_connect() will find the DC for us */
+ /* ads_connect() will find the DC for us */
ads_rc = ads_connect(ads);
if (!ADS_ERR_OK(ads_rc)) {
DEBUG(3, ("ads_connect failed: %s\n", ads_errstr(ads_rc)));
@@ -3528,7 +3526,7 @@ WERROR check_published_printers(void)
return WERR_OK;
}
-bool is_printer_published(Printer_entry *print_hnd, int snum,
+bool is_printer_published(Printer_entry *print_hnd, int snum,
struct GUID *guid)
{
NT_PRINTER_INFO_LEVEL *printer = NULL;
@@ -3544,7 +3542,7 @@ bool is_printer_published(Printer_entry *print_hnd, int snum,
!(printer->info_2->attributes & PRINTER_ATTRIBUTE_PUBLISHED) ||
((i = lookup_printerkey(printer->info_2->data, SPOOL_DSSPOOLER_KEY)) < 0) ||
!(ctr = printer->info_2->data->keys[i].values) ||
- !(guid_val = regval_ctr_getvalue(ctr, "objectGUID")))
+ !(guid_val = regval_ctr_getvalue(ctr, "objectGUID")))
{
free_a_printer(&printer, 2);
return False;
@@ -3552,18 +3550,18 @@ bool is_printer_published(Printer_entry *print_hnd, int snum,
/* fetching printer guids really ought to be a separate function. */
- if ( guid ) {
+ if ( guid ) {
fstring guid_str;
-
- /* We used to store the guid as REG_BINARY, then swapped
+
+ /* We used to store the guid as REG_BINARY, then swapped
to REG_SZ for Vista compatibility so check for both */
switch ( regval_type(guid_val) ){
- case REG_SZ:
- rpcstr_pull( guid_str, regval_data_p(guid_val),
+ case REG_SZ:
+ rpcstr_pull( guid_str, regval_data_p(guid_val),
sizeof(guid_str)-1, -1, STR_TERMINATE );
ret = NT_STATUS_IS_OK(GUID_from_string( guid_str, guid ));
- break;
+ break;
case REG_BINARY:
if ( regval_size(guid_val) != sizeof(struct GUID) ) {
ret = False;
@@ -3573,7 +3571,7 @@ bool is_printer_published(Printer_entry *print_hnd, int snum,
break;
default:
DEBUG(0,("is_printer_published: GUID value stored as "
- "invaluid type (%d)\n", regval_type(guid_val) ));
+ "invaluid type (%d)\n", regval_type(guid_val) ));
break;
}
}
@@ -3592,7 +3590,7 @@ WERROR check_published_printers(void)
return WERR_OK;
}
-bool is_printer_published(Printer_entry *print_hnd, int snum,
+bool is_printer_published(Printer_entry *print_hnd, int snum,
struct GUID *guid)
{
return False;
@@ -3601,41 +3599,41 @@ bool is_printer_published(Printer_entry *print_hnd, int snum,
/****************************************************************************
***************************************************************************/
-
+
WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key )
{
NT_PRINTER_DATA *data;
int i;
int removed_keys = 0;
int empty_slot;
-
+
data = p2->data;
empty_slot = data->num_keys;
if ( !key )
return WERR_INVALID_PARAM;
-
+
/* remove all keys */
if ( !strlen(key) ) {
-
+
TALLOC_FREE( data );
p2->data = NULL;
DEBUG(8,("delete_all_printer_data: Removed all Printer Data from printer [%s]\n",
p2->printername ));
-
+
return WERR_OK;
}
/* remove a specific key (and all subkeys) */
-
+
for ( i=0; i<data->num_keys; i++ ) {
if ( StrnCaseCmp( data->keys[i].name, key, strlen(key)) == 0 ) {
DEBUG(8,("delete_all_printer_data: Removed all Printer Data from key [%s]\n",
data->keys[i].name));
-
+
TALLOC_FREE( data->keys[i].name );
TALLOC_FREE( data->keys[i].values );
@@ -3660,10 +3658,10 @@ WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key )
return WERR_INVALID_PARAM;
/* move everything down */
-
+
for ( i=empty_slot+1; i<data->num_keys; i++ ) {
if ( data->keys[i].name ) {
- memcpy( &data->keys[empty_slot], &data->keys[i], sizeof(NT_PRINTER_KEY) );
+ memcpy( &data->keys[empty_slot], &data->keys[i], sizeof(NT_PRINTER_KEY) );
ZERO_STRUCTP( &data->keys[i] );
empty_slot++;
removed_keys++;
@@ -3671,7 +3669,7 @@ WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key )
}
/* update count */
-
+
data->num_keys -= removed_keys;
/* sanity check to see if anything is left */
@@ -3688,62 +3686,62 @@ WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key )
/****************************************************************************
***************************************************************************/
-
+
WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value )
{
WERROR result = WERR_OK;
int key_index;
-
+
/* we must have names on non-zero length */
-
+
if ( !key || !*key|| !value || !*value )
return WERR_INVALID_NAME;
-
+
/* find the printer key first */
key_index = lookup_printerkey( p2->data, key );
if ( key_index == -1 )
return WERR_OK;
-
+
/* make sure the value exists so we can return the correct error code */
-
+
if ( !regval_ctr_getvalue( p2->data->keys[key_index].values, value ) )
return WERR_BADFILE;
-
+
regval_ctr_delvalue( p2->data->keys[key_index].values, value );
-
+
DEBUG(8,("delete_printer_data: Removed key => [%s], value => [%s]\n",
key, value ));
-
+
return result;
}
/****************************************************************************
***************************************************************************/
-
-WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value,
+
+WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value,
uint32 type, uint8 *data, int real_len )
{
WERROR result = WERR_OK;
int key_index;
/* we must have names on non-zero length */
-
+
if ( !key || !*key|| !value || !*value )
return WERR_INVALID_NAME;
-
+
/* find the printer key first */
-
+
key_index = lookup_printerkey( p2->data, key );
if ( key_index == -1 )
key_index = add_new_printer_key( p2->data, key );
-
+
if ( key_index == -1 )
return WERR_NOMEM;
-
+
regval_ctr_addvalue( p2->data->keys[key_index].values, value,
type, (const char *)data, real_len );
-
+
DEBUG(8,("add_printer_data: Added key => [%s], value => [%s], type=> [%d], size => [%d]\n",
key, value, type, real_len ));
@@ -3867,10 +3865,10 @@ static int unpack_values(NT_PRINTER_DATA *printer_data, const uint8 *buf, int bu
memcpy( &guid, data_p, sizeof(struct GUID) );
init_unistr2( &unistr_guid,
- GUID_string(talloc_tos(), &guid),
+ GUID_string(talloc_tos(), &guid),
UNI_STR_TERMINATE );
- regval_ctr_addvalue( printer_data->keys[key_index].values,
+ regval_ctr_addvalue( printer_data->keys[key_index].values,
valuename, REG_SZ,
(const char *)unistr_guid.buffer,
unistr_guid.uni_str_len*2 );
@@ -3878,8 +3876,8 @@ static int unpack_values(NT_PRINTER_DATA *printer_data, const uint8 *buf, int bu
} else {
/* add the value */
- regval_ctr_addvalue( printer_data->keys[key_index].values,
- valuename, type, (const char *)data_p,
+ regval_ctr_addvalue( printer_data->keys[key_index].values,
+ valuename, type, (const char *)data_p,
size );
}
@@ -4018,14 +4016,14 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 *info,
int snum = lp_servicenumber(sharename);
slprintf(info->servername, sizeof(info->servername)-1, "\\\\%s", servername);
- slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s",
+ slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s",
servername, sharename);
fstrcpy(info->sharename, sharename);
fstrcpy(info->portname, SAMBA_PRINTER_PORT_NAME);
/* by setting the driver name to an empty string, a local NT admin
can now run the **local** APW to install a local printer driver
- for a Samba shared printer in 2.2. Without this, drivers **must** be
+ for a Samba shared printer in 2.2. Without this, drivers **must** be
installed on the Samba server for NT clients --jerry */
#if 0 /* JERRY --do not uncomment-- */
if (!*info->drivername)
@@ -4040,7 +4038,7 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 *info,
fstrcpy(info->datatype, "RAW");
#ifdef HAVE_CUPS
- if (get_loc_com && (enum printing_types)lp_printing(snum) == PRINT_CUPS ) {
+ if (get_loc_com && (enum printing_types)lp_printing(snum) == PRINT_CUPS ) {
/* Pull the location and comment strings from cups if we don't
already have one */
if ( !strlen(info->location) || !strlen(info->comment) )
@@ -4167,7 +4165,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info,
/*
* Some client drivers freak out if there is a NULL devmode
- * (probably the driver is not checking before accessing
+ * (probably the driver is not checking before accessing
* the devmode pointer) --jerry
*
* See comments in get_a_printer_2_default()
@@ -4181,7 +4179,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info,
slprintf( adevice, sizeof(adevice), "%s", info->printername );
if (info->devmode) {
- fstrcpy(info->devmode->devicename, adevice);
+ fstrcpy(info->devmode->devicename, adevice);
}
if ( !(info->data = TALLOC_ZERO_P( info, NT_PRINTER_DATA )) ) {
@@ -4210,7 +4208,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info,
DEBUG(9,("Unpacked printer [%s] name [%s] running driver [%s]\n",
sharename, info->printername, info->drivername));
- return WERR_OK;
+ return WERR_OK;
}
/****************************************************************************
@@ -4220,9 +4218,9 @@ static uint32 dump_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
{
uint32 result;
NT_PRINTER_INFO_LEVEL_2 *info2;
-
+
DEBUG(106,("Dumping printer at level [%d]\n", level));
-
+
switch (level) {
case 2:
{
@@ -4231,7 +4229,7 @@ static uint32 dump_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
else
{
info2=printer->info_2;
-
+
DEBUGADD(106,("attributes:[%d]\n", info2->attributes));
DEBUGADD(106,("priority:[%d]\n", info2->priority));
DEBUGADD(106,("default_priority:[%d]\n", info2->default_priority));
@@ -4264,7 +4262,7 @@ static uint32 dump_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
result=1;
break;
}
-
+
return result;
}
@@ -4309,15 +4307,15 @@ static uint32 rev_changeid(void)
WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
{
WERROR result;
-
- dump_a_printer(printer, level);
-
+
+ dump_a_printer(printer, level);
+
switch (level) {
case 2:
{
/*
* Update the changestamp. Emperical tests show that the
- * ChangeID is always updated,but c_setprinter is
+ * ChangeID is always updated,but c_setprinter is
* global spooler variable (not per printer).
*/
@@ -4332,7 +4330,7 @@ WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
* NT->NT An admin connection to a remote
* printer show changes imeediately in
* the properities dialog
- *
+ *
* A non-admin connection will only show the
* changes after viewing the properites page
* 2 times. Seems to be related to a
@@ -4499,7 +4497,7 @@ bool del_driver_init(char *drivername)
}
/****************************************************************************
- Pack up the DEVMODE and values for a printer into a 'driver init' entry
+ Pack up the DEVMODE and values for a printer into a 'driver init' entry
in the tdb. Note: this is different from the driver entry and the printer
entry. There should be a single driver init entry for each driver regardless
of whether it was installed from NT or 2K. Technically, they should be
@@ -4569,9 +4567,9 @@ done:
static uint32 update_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
{
uint32 result;
-
- dump_a_printer(printer, level);
-
+
+ dump_a_printer(printer, level);
+
switch (level) {
case 2:
result = update_driver_init_2(printer->info_2);
@@ -4580,12 +4578,12 @@ static uint32 update_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level)
result = 1;
break;
}
-
+
return result;
}
/****************************************************************************
- Convert the printer data value, a REG_BINARY array, into an initialization
+ Convert the printer data value, a REG_BINARY array, into an initialization
DEVMODE. Note: the array must be parsed as if it was a DEVMODE in an rpc...
got to keep the endians happy :).
****************************************************************************/
@@ -4626,7 +4624,7 @@ static bool convert_driver_init( TALLOC_CTX *ctx, NT_DEVICEMODE *nt_devmode, uin
The Win32 client side code requirement sucks! But until we can run arbitrary
Win32 printer driver code on any Unix that Samba runs on, we are stuck with it.
-
+
It would have been easier to use SetPrinter because all the UNMARSHALLING of
the DEVMODE is done there, but 2K/XP clients do not set the DEVMODE... think
about it and you will realize why. JRR 010720
@@ -4638,12 +4636,12 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, uint8 *data, ui
TALLOC_CTX *ctx = NULL;
NT_DEVICEMODE *nt_devmode = NULL;
NT_DEVICEMODE *tmp_devmode = printer->info_2->devmode;
-
+
/*
* When the DEVMODE is already set on the printer, don't try to unpack it.
*/
DEBUG(8,("save_driver_init_2: Enter...\n"));
-
+
if ( !printer->info_2->devmode && data_len ) {
/*
* Set devmode on printer info, so entire printer initialization can be
@@ -4657,7 +4655,7 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, uint8 *data, ui
status = WERR_NOMEM;
goto done;
}
-
+
ZERO_STRUCTP(nt_devmode);
/*
@@ -4676,7 +4674,7 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, uint8 *data, ui
/*
* Pack up and add (or update) the DEVMODE and any current printer data to
* a 'driver init' element in the tdb
- *
+ *
*/
if ( update_driver_init(printer, 2) != 0 ) {
@@ -4684,10 +4682,10 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, uint8 *data, ui
status = WERR_NOMEM;
goto done;
}
-
+
/*
- * If driver initialization info was successfully saved, set the current
- * printer to match it. This allows initialization of the current printer
+ * If driver initialization info was successfully saved, set the current
+ * printer to match it. This allows initialization of the current printer
* as well as the driver.
*/
status = mod_a_printer(printer, 2);
@@ -4695,11 +4693,11 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, uint8 *data, ui
DEBUG(10,("save_driver_init_2: error setting DEVMODE on printer [%s]\n",
printer->info_2->printername));
}
-
+
done:
talloc_destroy(ctx);
free_nt_devicemode( &nt_devmode );
-
+
printer->info_2->devmode = tmp_devmode;
return status;
@@ -4712,7 +4710,7 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, uint8 *data, ui
WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, uint8 *data, uint32 data_len)
{
WERROR status = WERR_OK;
-
+
switch (level) {
case 2:
status = save_driver_init_2( printer, data, data_len );
@@ -4721,7 +4719,7 @@ WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, uint8 *dat
status = WERR_UNKNOWN_LEVEL;
break;
}
-
+
return status;
}
@@ -4729,22 +4727,22 @@ WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, uint8 *dat
Get a NT_PRINTER_INFO_LEVEL struct. It returns malloced memory.
Previously the code had a memory allocation problem because it always
- used the TALLOC_CTX from the Printer_entry*. This context lasts
- as a long as the original handle is open. So if the client made a lot
+ used the TALLOC_CTX from the Printer_entry*. This context lasts
+ as a long as the original handle is open. So if the client made a lot
of getprinter[data]() calls, the memory usage would climb. Now we use
- a short lived TALLOC_CTX for printer_info_2 objects returned. We
+ a short lived TALLOC_CTX for printer_info_2 objects returned. We
still use the Printer_entry->ctx for maintaining the cache copy though
- since that object must live as long as the handle by definition.
+ since that object must live as long as the handle by definition.
--jerry
****************************************************************************/
-static WERROR get_a_printer_internal( Printer_entry *print_hnd, NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level,
+static WERROR get_a_printer_internal( Printer_entry *print_hnd, NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level,
const char *sharename, bool get_loc_com)
{
WERROR result;
fstring servername;
-
+
DEBUG(10,("get_a_printer: [%s] level %u\n", sharename, (unsigned int)level));
if ( !(*pp_printer = TALLOC_ZERO_P(NULL, NT_PRINTER_INFO_LEVEL)) ) {
@@ -4760,7 +4758,7 @@ static WERROR get_a_printer_internal( Printer_entry *print_hnd, NT_PRINTER_INFO_
return WERR_NOMEM;
}
- if ( print_hnd )
+ if ( print_hnd )
fstrcpy( servername, print_hnd->servername );
else {
fstrcpy( servername, "%L" );
@@ -4775,20 +4773,20 @@ static WERROR get_a_printer_internal( Printer_entry *print_hnd, NT_PRINTER_INFO_
if ( !W_ERROR_IS_OK(result) ) {
TALLOC_FREE( *pp_printer );
- DEBUG(10,("get_a_printer: [%s] level %u returning %s\n",
+ DEBUG(10,("get_a_printer: [%s] level %u returning %s\n",
sharename, (unsigned int)level, win_errstr(result)));
return result;
}
dump_a_printer( *pp_printer, level);
-
+
break;
-
+
default:
TALLOC_FREE( *pp_printer );
return WERR_UNKNOWN_LEVEL;
}
-
+
return WERR_OK;
}
@@ -4820,10 +4818,10 @@ uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level)
if ( !printer )
return 0;
-
+
switch (level) {
case 2:
- if ( printer->info_2 )
+ if ( printer->info_2 )
free_nt_printer_info_level_2(&printer->info_2);
break;
@@ -4844,7 +4842,7 @@ uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level)
uint32 result;
DEBUG(104,("adding a printer at level [%d]\n", level));
dump_a_printer_driver(driver, level);
-
+
switch (level) {
case 3:
result=add_a_printer_driver_3(driver.info_3);
@@ -4858,7 +4856,7 @@ uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level)
result=1;
break;
}
-
+
return result;
}
/****************************************************************************
@@ -4868,34 +4866,34 @@ WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
fstring drivername, const char *architecture, uint32 version)
{
WERROR result;
-
+
switch (level) {
case 3:
/* Sometime we just want any version of the driver */
-
+
if ( version == DRIVER_ANY_VERSION ) {
/* look for Win2k first and then for NT4 */
- result = get_a_printer_driver_3(&driver->info_3, drivername,
+ result = get_a_printer_driver_3(&driver->info_3, drivername,
architecture, 3);
-
+
if ( !W_ERROR_IS_OK(result) ) {
- result = get_a_printer_driver_3( &driver->info_3,
+ result = get_a_printer_driver_3( &driver->info_3,
drivername, architecture, 2 );
}
} else {
- result = get_a_printer_driver_3(&driver->info_3, drivername,
- architecture, version);
+ result = get_a_printer_driver_3(&driver->info_3, drivername,
+ architecture, version);
}
break;
-
+
default:
result=W_ERROR(1);
break;
}
-
+
if (W_ERROR_IS_OK(result))
dump_a_printer_driver(*driver, level);
-
+
return result;
}
@@ -4904,7 +4902,7 @@ WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level)
{
uint32 result;
-
+
switch (level) {
case 3:
{
@@ -4956,50 +4954,50 @@ bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 )
NT_PRINTER_INFO_LEVEL *printer = NULL;
bool in_use = False;
- if ( !info_3 )
+ if ( !info_3 )
return False;
DEBUG(10,("printer_driver_in_use: Beginning search through ntprinters.tdb...\n"));
-
+
/* loop through the printers.tdb and check for the drivername */
-
+
for (snum=0; snum<n_services && !in_use; snum++) {
if ( !(lp_snum_ok(snum) && lp_print_ok(snum) ) )
continue;
-
+
if ( !W_ERROR_IS_OK(get_a_printer(NULL, &printer, 2, lp_servicename(snum))) )
continue;
-
- if ( strequal(info_3->name, printer->info_2->drivername) )
+
+ if ( strequal(info_3->name, printer->info_2->drivername) )
in_use = True;
-
+
free_a_printer( &printer, 2 );
}
-
+
DEBUG(10,("printer_driver_in_use: Completed search through ntprinters.tdb...\n"));
-
+
if ( in_use ) {
NT_PRINTER_DRIVER_INFO_LEVEL d;
WERROR werr;
-
+
DEBUG(5,("printer_driver_in_use: driver \"%s\" is currently in use\n", info_3->name));
-
- /* we can still remove the driver if there is one of
+
+ /* we can still remove the driver if there is one of
"Windows NT x86" version 2 or 3 left */
-
+
if ( !strequal( "Windows NT x86", info_3->environment ) ) {
- werr = get_a_printer_driver( &d, 3, info_3->name, "Windows NT x86", DRIVER_ANY_VERSION );
+ werr = get_a_printer_driver( &d, 3, info_3->name, "Windows NT x86", DRIVER_ANY_VERSION );
}
else {
switch ( info_3->cversion ) {
case 2:
werr = get_a_printer_driver( &d, 3, info_3->name, "Windows NT x86", 3 );
break;
- case 3:
+ case 3:
werr = get_a_printer_driver( &d, 3, info_3->name, "Windows NT x86", 2 );
break;
default:
- DEBUG(0,("printer_driver_in_use: ERROR! unknown driver version (%d)\n",
+ DEBUG(0,("printer_driver_in_use: ERROR! unknown driver version (%d)\n",
info_3->cversion));
werr = WERR_UNKNOWN_PRINTER_DRIVER;
break;
@@ -5007,16 +5005,16 @@ bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 )
}
/* now check the error code */
-
+
if ( W_ERROR_IS_OK(werr) ) {
/* it's ok to remove the driver, we have other architctures left */
in_use = False;
free_a_printer_driver( d, 3 );
}
}
-
+
/* report that the driver is not in use by default */
-
+
return in_use;
}
@@ -5024,7 +5022,7 @@ bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 )
/**********************************************************************
Check to see if a ogiven file is in use by *info
*********************************************************************/
-
+
static bool drv_file_in_use( char* file, NT_PRINTER_DRIVER_INFO_LEVEL_3 *info )
{
int i = 0;
@@ -5048,86 +5046,86 @@ static bool drv_file_in_use( char* file, NT_PRINTER_DRIVER_INFO_LEVEL_3 *info )
if ( strequal(file, info->helpfile) )
return True;
-
+
/* see of there are any dependent files to examine */
-
+
if ( !info->dependentfiles )
return False;
-
+
while ( *info->dependentfiles[i] ) {
if ( strequal(file, info->dependentfiles[i]) )
return True;
i++;
}
-
+
return False;
}
/**********************************************************************
- Utility function to remove the dependent file pointed to by the
- input parameter from the list
+ Utility function to remove the dependent file pointed to by the
+ input parameter from the list
*********************************************************************/
static void trim_dependent_file( fstring files[], int idx )
{
-
+
/* bump everything down a slot */
while( *files[idx+1] ) {
fstrcpy( files[idx], files[idx+1] );
idx++;
}
-
+
*files[idx] = '\0';
- return;
+ return;
}
/**********************************************************************
- Check if any of the files used by src are also used by drv
+ Check if any of the files used by src are also used by drv
*********************************************************************/
-static bool trim_overlap_drv_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *src,
+static bool trim_overlap_drv_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *src,
NT_PRINTER_DRIVER_INFO_LEVEL_3 *drv )
{
bool in_use = False;
int i = 0;
-
+
if ( !src || !drv )
return False;
-
+
/* check each file. Remove it from the src structure if it overlaps */
-
+
if ( drv_file_in_use(src->driverpath, drv) ) {
in_use = True;
DEBUG(10,("Removing driverfile [%s] from list\n", src->driverpath));
fstrcpy( src->driverpath, "" );
}
-
+
if ( drv_file_in_use(src->datafile, drv) ) {
in_use = True;
DEBUG(10,("Removing datafile [%s] from list\n", src->datafile));
fstrcpy( src->datafile, "" );
}
-
+
if ( drv_file_in_use(src->configfile, drv) ) {
in_use = True;
DEBUG(10,("Removing configfile [%s] from list\n", src->configfile));
fstrcpy( src->configfile, "" );
}
-
+
if ( drv_file_in_use(src->helpfile, drv) ) {
in_use = True;
DEBUG(10,("Removing helpfile [%s] from list\n", src->helpfile));
fstrcpy( src->helpfile, "" );
}
-
+
/* are there any dependentfiles to examine? */
-
+
if ( !src->dependentfiles )
return in_use;
-
+
while ( *src->dependentfiles[i] ) {
if ( drv_file_in_use(src->dependentfiles[i], drv) ) {
in_use = True;
@@ -5135,18 +5133,18 @@ static bool trim_overlap_drv_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *src,
trim_dependent_file( src->dependentfiles, i );
} else
i++;
- }
-
+ }
+
return in_use;
}
/****************************************************************************
- Determine whether or not a particular driver files are currently being
- used by any other driver.
-
+ Determine whether or not a particular driver files are currently being
+ used by any other driver.
+
Return value is True if any files were in use by other drivers
and False otherwise.
-
+
Upon return, *info has been modified to only contain the driver files
which are not in use
@@ -5168,36 +5166,36 @@ bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info )
if ( !info )
return False;
-
+
version = info->cversion;
-
+
/* loop over all driver versions */
-
+
DEBUG(5,("printer_driver_files_in_use: Beginning search through ntdrivers.tdb...\n"));
-
+
/* get the list of drivers */
-
+
list = NULL;
ndrivers = get_ntdrivers(&list, info->environment, version);
-
- DEBUGADD(4,("we have:[%d] drivers in environment [%s] and version [%d]\n",
+
+ DEBUGADD(4,("we have:[%d] drivers in environment [%s] and version [%d]\n",
ndrivers, info->environment, version));
/* check each driver for overlap in files */
-
+
for (i=0; i<ndrivers; i++) {
DEBUGADD(5,("\tdriver: [%s]\n", list[i]));
-
+
ZERO_STRUCT(driver);
-
+
if ( !W_ERROR_IS_OK(get_a_printer_driver(&driver, 3, list[i], info->environment, version)) ) {
SAFE_FREE(list);
return True;
}
-
+
/* check if d2 uses any files from d1 */
/* only if this is a different driver than the one being deleted */
-
+
if ( !strequal(info->name, driver.info_3->name) ) {
if ( trim_overlap_drv_files(info, driver.info_3) ) {
/* mz: Do not instantly return -
@@ -5477,7 +5475,7 @@ WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr)
/* Store the security descriptor in a tdb */
if (!prs_init(&ps,
- (uint32_t)ndr_size_security_descriptor(new_secdesc_ctr->sd,
+ (uint32_t)ndr_size_security_descriptor(new_secdesc_ctr->sd,
NULL, 0)
+ sizeof(SEC_DESC_BUF), mem_ctx, MARSHALL) ) {
status = WERR_NOMEM;
@@ -5536,16 +5534,16 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx)
sa, SEC_ACE_FLAG_CONTAINER_INHERIT);
/* Add the domain admins group if we are a DC */
-
+
if ( IS_DC ) {
DOM_SID domadmins_sid;
-
+
sid_copy(&domadmins_sid, get_global_sam_sid());
sid_append_rid(&domadmins_sid, DOMAIN_GROUP_RID_ADMINS);
-
+
sa = PRINTER_ACE_FULL_CONTROL;
- init_sec_ace(&ace[i++], &domadmins_sid,
- SEC_ACE_TYPE_ACCESS_ALLOWED, sa,
+ init_sec_ace(&ace[i++], &domadmins_sid,
+ SEC_ACE_TYPE_ACCESS_ALLOWED, sa,
SEC_ACE_FLAG_OBJECT_INHERIT | SEC_ACE_FLAG_INHERIT_ONLY);
init_sec_ace(&ace[i++], &domadmins_sid, SEC_ACE_TYPE_ACCESS_ALLOWED,
sa, SEC_ACE_FLAG_CONTAINER_INHERIT);
@@ -5554,8 +5552,8 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx)
sid_append_rid(&adm_sid, DOMAIN_USER_RID_ADMIN);
sa = PRINTER_ACE_FULL_CONTROL;
- init_sec_ace(&ace[i++], &adm_sid,
- SEC_ACE_TYPE_ACCESS_ALLOWED, sa,
+ init_sec_ace(&ace[i++], &adm_sid,
+ SEC_ACE_TYPE_ACCESS_ALLOWED, sa,
SEC_ACE_FLAG_OBJECT_INHERIT | SEC_ACE_FLAG_INHERIT_ONLY);
init_sec_ace(&ace[i++], &adm_sid, SEC_ACE_TYPE_ACCESS_ALLOWED,
sa, SEC_ACE_FLAG_CONTAINER_INHERIT);
@@ -5564,10 +5562,10 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx)
/* add BUILTIN\Administrators as FULL CONTROL */
sa = PRINTER_ACE_FULL_CONTROL;
- init_sec_ace(&ace[i++], &global_sid_Builtin_Administrators,
- SEC_ACE_TYPE_ACCESS_ALLOWED, sa,
+ init_sec_ace(&ace[i++], &global_sid_Builtin_Administrators,
+ SEC_ACE_TYPE_ACCESS_ALLOWED, sa,
SEC_ACE_FLAG_OBJECT_INHERIT | SEC_ACE_FLAG_INHERIT_ONLY);
- init_sec_ace(&ace[i++], &global_sid_Builtin_Administrators,
+ init_sec_ace(&ace[i++], &global_sid_Builtin_Administrators,
SEC_ACE_TYPE_ACCESS_ALLOWED,
sa, SEC_ACE_FLAG_CONTAINER_INHERIT);
@@ -5580,7 +5578,7 @@ static SEC_DESC_BUF *construct_default_printer_sdb(TALLOC_CTX *ctx)
if ((psa = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) != NULL) {
psd = make_sec_desc(ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
- &global_sid_Builtin_Administrators,
+ &global_sid_Builtin_Administrators,
&global_sid_Builtin_Administrators,
NULL, psa, &sd_size);
}
@@ -5694,14 +5692,14 @@ bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **s
SEC_ACL *the_acl = (*secdesc_ctr)->sd->dacl;
int i;
- DEBUG(10, ("secdesc_ctr for %s has %d aces:\n",
+ DEBUG(10, ("secdesc_ctr for %s has %d aces:\n",
sharename, the_acl->num_aces));
for (i = 0; i < the_acl->num_aces; i++) {
DEBUG(10, ("%s %d %d 0x%08x\n",
sid_string_dbg(&the_acl->aces[i].trustee),
- the_acl->aces[i].type, the_acl->aces[i].flags,
- the_acl->aces[i].access_mask));
+ the_acl->aces[i].type, the_acl->aces[i].flags,
+ the_acl->aces[i].access_mask));
}
}
@@ -5721,15 +5719,15 @@ bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **s
A printer and a printer driver are 2 different things.
NT manages them separatelly, Samba does the same.
Why ? Simply because it's easier and it makes sense !
-
+
Now explanation: You have 3 printers behind your samba server,
2 of them are the same make and model (laser A and B). But laser B
has an 3000 sheet feeder and laser A doesn't such an option.
Your third printer is an old dot-matrix model for the accounting :-).
-
+
If the /usr/local/samba/lib directory (default dir), you will have
5 files to describe all of this.
-
+
3 files for the printers (1 by printer):
NTprinter_laser A
NTprinter_laser B
@@ -5787,7 +5785,7 @@ void map_job_permissions(SEC_DESC *sd)
print_queue_purge
Try access control in the following order (for performance reasons):
- 1) root ans SE_PRINT_OPERATOR can do anything (easy check)
+ 1) root ans SE_PRINT_OPERATOR can do anything (easy check)
2) check security descriptor (bit comparisons in memory)
3) "printer admins" (may result in numerous calls to winbind)
@@ -5801,7 +5799,7 @@ bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
const char *pname;
TALLOC_CTX *mem_ctx = NULL;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
-
+
/* If user is NULL then use the current_user structure */
/* Always allow root or SE_PRINT_OPERATROR to do anything */
@@ -5870,7 +5868,7 @@ bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
}
talloc_destroy(mem_ctx);
-
+
if (!NT_STATUS_IS_OK(status)) {
errno = EACCES;
}
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 30a707f943..1ad8b5dd61 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -482,31 +482,6 @@ WERROR rpccli_spoolss_open_printer_ex(struct rpc_pipe_client *cli, TALLOC_CTX *m
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_CLOSEPRINTER in;
- SPOOL_R_CLOSEPRINTER out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_closeprinter( &in, pol );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_CLOSEPRINTER,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_closeprinter,
- spoolss_io_r_closeprinter,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
char *name, uint32 flags, uint32 level,
uint32 *num_printers, PRINTER_INFO_CTR *ctr)
@@ -1061,66 +1036,6 @@ WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_deleteprinterdriverex(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, const char *arch,
- const char *driver, int version)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_DELETEPRINTERDRIVEREX in;
- SPOOL_R_DELETEPRINTERDRIVEREX out;
- fstring server;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- slprintf(server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
- strupper_m(server);
-
- make_spoolss_q_deleteprinterdriverex( mem_ctx, &in, server, arch, driver, version );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_DELETEPRINTERDRIVEREX,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_deleteprinterdriverex,
- spoolss_io_r_deleteprinterdriverex,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_deleteprinterdriver (struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, const char *arch,
- const char *driver)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_DELETEPRINTERDRIVER in;
- SPOOL_R_DELETEPRINTERDRIVER out;
- fstring server;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- slprintf(server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
- strupper_m(server);
-
- make_spoolss_q_deleteprinterdriver( mem_ctx, &in, server, arch, driver );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_DELETEPRINTERDRIVER,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_deleteprinterdriver,
- spoolss_io_r_deleteprinterdriver,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
char *name, char *environment,
@@ -1179,138 +1094,6 @@ WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli,
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, uint32 level, FORM *form)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_ADDFORM in;
- SPOOL_R_ADDFORM out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_addform( &in, handle, level, form );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ADDFORM,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_addform,
- spoolss_io_r_addform,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, uint32 level,
- const char *form_name, FORM *form)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_SETFORM in;
- SPOOL_R_SETFORM out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_setform( &in, handle, level, form_name, form );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_SETFORM,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_setform,
- spoolss_io_r_setform,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, const char *formname,
- uint32 level, FORM_1 *form)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_GETFORM in;
- SPOOL_R_GETFORM out;
- RPC_BUFFER buffer;
- uint32 offered;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- offered = 0;
- if (!rpcbuf_init(&buffer, offered, mem_ctx))
- return WERR_NOMEM;
- make_spoolss_q_getform( &in, handle, formname, level, &buffer, offered );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_GETFORM,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_getform,
- spoolss_io_r_getform,
- WERR_GENERAL_FAILURE );
-
- if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) {
- offered = out.needed;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- if (!rpcbuf_init(&buffer, offered, mem_ctx))
- return WERR_NOMEM;
- make_spoolss_q_getform( &in, handle, formname, level, &buffer, offered );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_GETFORM,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_getform,
- spoolss_io_r_getform,
- WERR_GENERAL_FAILURE );
- }
-
- if (!W_ERROR_IS_OK(out.status))
- return out.status;
-
- if (!smb_io_form_1("", out.buffer, form, 0)) {
- return WERR_GENERAL_FAILURE;
- }
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_deleteform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, const char *form_name)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_DELETEFORM in;
- SPOOL_R_DELETEFORM out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_deleteform( &in, handle, form_name );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_DELETEFORM,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_deleteform,
- spoolss_io_r_deleteform,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *handle, int level, uint32 *num_forms,
FORM_1 **forms)
@@ -1534,56 +1317,6 @@ WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_startpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_STARTPAGEPRINTER in;
- SPOOL_R_STARTPAGEPRINTER out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_startpageprinter( &in, hnd );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_STARTPAGEPRINTER,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_startpageprinter,
- spoolss_io_r_startpageprinter,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_endpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_ENDPAGEPRINTER in;
- SPOOL_R_ENDPAGEPRINTER out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_endpageprinter( &in, hnd );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENDPAGEPRINTER,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_endpageprinter,
- spoolss_io_r_endpageprinter,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, char *docname,
char *outputfile, char *datatype,
@@ -1615,31 +1348,6 @@ WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *m
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_enddocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_ENDDOCPRINTER in;
- SPOOL_R_ENDDOCPRINTER out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_enddocprinter( &in, hnd );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENDDOCPRINTER,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_enddocprinter,
- spoolss_io_r_enddocprinter,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *valuename,
REGISTRY_VALUE *value)
@@ -1913,86 +1621,6 @@ WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_writeprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, uint32 data_size, char *data,
- uint32 *num_written)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_WRITEPRINTER in;
- SPOOL_R_WRITEPRINTER out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_writeprinter( &in, hnd, data_size, data );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_WRITEPRINTER,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_writeprinter,
- spoolss_io_r_writeprinter,
- WERR_GENERAL_FAILURE );
-
- if (num_written)
- *num_written = out.buffer_written;
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_deleteprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, char *valuename)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_DELETEPRINTERDATA in;
- SPOOL_R_DELETEPRINTERDATA out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_deleteprinterdata( &in, hnd, valuename );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_DELETEPRINTERDATA,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_deleteprinterdata,
- spoolss_io_r_deleteprinterdata,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_deleteprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, char *keyname,
- char *valuename)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_DELETEPRINTERDATAEX in;
- SPOOL_R_DELETEPRINTERDATAEX out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_deleteprinterdataex( &in, hnd, keyname, valuename );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_DELETEPRINTERDATAEX,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_deleteprinterdataex,
- spoolss_io_r_deleteprinterdataex,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *keyname,
uint16 **keylist, uint32 *len)
@@ -2046,29 +1674,4 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *me
return out.status;
}
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_deleteprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, char *keyname)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_DELETEPRINTERKEY in;
- SPOOL_R_DELETEPRINTERKEY out;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_deleteprinterkey( &in, hnd, keyname );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_DELETEPRINTERKEY,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_deleteprinterkey,
- spoolss_io_r_deleteprinterkey,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
/** @} **/
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index e8103ad866..bc9202cccc 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -267,12 +267,12 @@ bool prs_grow(prs_struct *ps, uint32 extra_space)
extra_space -= (ps->buffer_size - ps->data_offset);
if(ps->buffer_size == 0) {
+
/*
- * Ensure we have at least a PDU's length, or extra_space, whichever
- * is greater.
+ * Start with 128 bytes (arbitrary value), enough for small rpc
+ * requests
*/
-
- new_size = MAX(RPC_MAX_PDU_FRAG_LEN,extra_space);
+ new_size = MAX(128, extra_space);
if((ps->data_p = (char *)SMB_MALLOC(new_size)) == NULL) {
DEBUG(0,("prs_grow: Malloc failure for size %u.\n", (unsigned int)new_size));
@@ -281,10 +281,13 @@ bool prs_grow(prs_struct *ps, uint32 extra_space)
memset(ps->data_p, '\0', (size_t)new_size );
} else {
/*
- * If the current buffer size is bigger than the space needed, just
- * double it, else add extra_space.
+ * If the current buffer size is bigger than the space needed,
+ * just double it, else add extra_space. Always keep 64 bytes
+ * more, so that after we added a large blob we don't have to
+ * realloc immediately again.
*/
- new_size = MAX(ps->buffer_size*2, ps->buffer_size + extra_space);
+ new_size = MAX(ps->buffer_size*2,
+ ps->buffer_size + extra_space + 64);
if ((ps->data_p = (char *)SMB_REALLOC(ps->data_p, new_size)) == NULL) {
DEBUG(0,("prs_grow: Realloc failure for size %u.\n",
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 3fe0c3a416..84b764eeab 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -1232,60 +1232,6 @@ bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u
}
/*******************************************************************
- * init a structure.
- ********************************************************************/
-bool make_spoolss_q_deleteprinterdriverex( TALLOC_CTX *mem_ctx,
- SPOOL_Q_DELETEPRINTERDRIVEREX *q_u,
- const char *server,
- const char* arch,
- const char* driver,
- int version)
-{
- DEBUG(5,("make_spoolss_q_deleteprinterdriverex\n"));
-
- q_u->server_ptr = (server!=NULL)?1:0;
- q_u->delete_flags = DPD_DELETE_UNUSED_FILES;
-
- /* these must be NULL terminated or else NT4 will
- complain about invalid parameters --jerry */
- init_unistr2(&q_u->server, server, UNI_STR_TERMINATE);
- init_unistr2(&q_u->arch, arch, UNI_STR_TERMINATE);
- init_unistr2(&q_u->driver, driver, UNI_STR_TERMINATE);
-
- if (version >= 0) {
- q_u->delete_flags |= DPD_DELETE_SPECIFIC_VERSION;
- q_u->version = version;
- }
-
- return True;
-}
-
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-bool make_spoolss_q_deleteprinterdriver(
- TALLOC_CTX *mem_ctx,
- SPOOL_Q_DELETEPRINTERDRIVER *q_u,
- const char *server,
- const char* arch,
- const char* driver
-)
-{
- DEBUG(5,("make_spoolss_q_deleteprinterdriver\n"));
-
- q_u->server_ptr = (server!=NULL)?1:0;
-
- /* these must be NULL terminated or else NT4 will
- complain about invalid parameters --jerry */
- init_unistr2(&q_u->server, server, UNI_STR_TERMINATE);
- init_unistr2(&q_u->arch, arch, UNI_STR_TERMINATE);
- init_unistr2(&q_u->driver, driver, UNI_STR_TERMINATE);
-
- return True;
-}
-
-/*******************************************************************
* make a structure.
********************************************************************/
@@ -1355,88 +1301,6 @@ bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u,
}
/*******************************************************************
- * read a structure.
- * called from spoolss_q_deleteprinterdata (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinterdata");
- depth++;
-
- if (!prs_align(ps))
- return False;
- if (!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
- if (!prs_align(ps))
- return False;
- if (!smb_io_unistr2("valuename", &q_u->valuename,True,ps,depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_deleteprinterdata (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdata");
- depth++;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
- * called from spoolss_q_deleteprinterdataex (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinterdataex");
- depth++;
-
- if (!prs_align(ps))
- return False;
- if (!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
- return False;
-
- if (!smb_io_unistr2("keyname ", &q_u->keyname, True, ps, depth))
- return False;
- if (!smb_io_unistr2("valuename", &q_u->valuename, True, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_deleteprinterdataex (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdataex");
- depth++;
-
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
* write a structure.
* called from spoolss_r_getprinterdata (srv_spoolss.c)
********************************************************************/
@@ -1477,256 +1341,6 @@ bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u,
}
/*******************************************************************
- * make a structure.
- ********************************************************************/
-
-bool make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd)
-{
- if (q_u == NULL) return False;
-
- DEBUG(5,("make_spoolss_q_closeprinter\n"));
-
- memcpy(&q_u->handle, hnd, sizeof(q_u->handle));
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
- * called from static spoolss_q_abortprinter (srv_spoolss.c)
- * called from spoolss_abortprinter (cli_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_abortprinter");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_abortprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_abortprinter");
- depth++;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
- * called from static spoolss_q_deleteprinter (srv_spoolss.c)
- * called from spoolss_deleteprinter (cli_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinter");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from static spoolss_r_deleteprinter (srv_spoolss.c)
- * called from spoolss_deleteprinter (cli_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinter");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!smb_io_pol_hnd("printer handle",&r_u->handle,ps,depth))
- return False;
- if (!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
- * read a structure.
- * called from api_spoolss_deleteprinterdriver (srv_spoolss.c)
- * called from spoolss_deleteprinterdriver (cli_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinterdriver");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if(!prs_uint32("server_ptr", ps, depth, &q_u->server_ptr))
- return False;
- if(!smb_io_unistr2("server", &q_u->server, q_u->server_ptr, ps, depth))
- return False;
- if(!smb_io_unistr2("arch", &q_u->arch, True, ps, depth))
- return False;
- if(!smb_io_unistr2("driver", &q_u->driver, True, ps, depth))
- return False;
-
-
- return True;
-}
-
-
-/*******************************************************************
- * write a structure.
- ********************************************************************/
-bool spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth)
-{
- if (r_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdriver");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
- * read a structure.
- * called from api_spoolss_deleteprinterdriver (srv_spoolss.c)
- * called from spoolss_deleteprinterdriver (cli_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinterdriverex");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if(!prs_uint32("server_ptr", ps, depth, &q_u->server_ptr))
- return False;
- if(!smb_io_unistr2("server", &q_u->server, q_u->server_ptr, ps, depth))
- return False;
- if(!smb_io_unistr2("arch", &q_u->arch, True, ps, depth))
- return False;
- if(!smb_io_unistr2("driver", &q_u->driver, True, ps, depth))
- return False;
-
- if (!prs_align(ps))
- return False;
-
- if(!prs_uint32("delete_flags ", ps, depth, &q_u->delete_flags))
- return False;
- if(!prs_uint32("version ", ps, depth, &q_u->version))
- return False;
-
-
- return True;
-}
-
-
-/*******************************************************************
- * write a structure.
- ********************************************************************/
-bool spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth)
-{
- if (r_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdriverex");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-
-
-/*******************************************************************
- * read a structure.
- * called from static spoolss_q_closeprinter (srv_spoolss.c)
- * called from spoolss_closeprinter (cli_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_closeprinter");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from static spoolss_r_closeprinter (srv_spoolss.c)
- * called from spoolss_closeprinter (cli_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_closeprinter");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!smb_io_pol_hnd("printer handle",&r_u->handle,ps,depth))
- return False;
- if (!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
* read a structure.
* called from spoolss_q_startdocprinter (srv_spoolss.c)
********************************************************************/
@@ -1769,168 +1383,6 @@ bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u
/*******************************************************************
* read a structure.
- * called from spoolss_q_enddocprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_enddocprinter");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_enddocprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_enddocprinter");
- depth++;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
- * called from spoolss_q_startpageprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_startpageprinter");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_startpageprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_startpageprinter");
- depth++;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
- * called from spoolss_q_endpageprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_endpageprinter");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_endpageprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_endpageprinter");
- depth++;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
- * called from spoolss_q_writeprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_writeprinter");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
- if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size))
- return False;
-
- if (q_u->buffer_size!=0)
- {
- if (UNMARSHALLING(ps))
- q_u->buffer=PRS_ALLOC_MEM(ps, uint8, q_u->buffer_size);
- if(q_u->buffer == NULL)
- return False;
- if(!prs_uint8s(True, "buffer", ps, depth, q_u->buffer, q_u->buffer_size))
- return False;
- }
- if(!prs_align(ps))
- return False;
- if(!prs_uint32("buffer_size2", ps, depth, &q_u->buffer_size2))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_writeprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_writeprinter");
- depth++;
- if(!prs_uint32("buffer_written", ps, depth, &r_u->buffer_written))
- return False;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
* called from spoolss_q_rffpcnex (srv_spoolss.c)
********************************************************************/
@@ -3997,42 +3449,6 @@ bool spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_stru
/*******************************************************************
********************************************************************/
-bool spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_fcpn");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth)
-{
-
- prs_debug(ps, depth, desc, "spoolss_io_q_fcpn");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
-********************************************************************/
-
bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
@@ -4398,65 +3814,6 @@ bool spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct
}
/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth)
-{
-
- prs_debug(ps, depth, desc, "spoolss_io_q_getform");
- depth++;
-
- if (!prs_align(ps))
- return False;
- if (!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
- if (!smb_io_unistr2("", &q_u->formname,True,ps,depth))
- return False;
-
- if (!prs_align(ps))
- return False;
-
- if (!prs_uint32("level", ps, depth, &q_u->level))
- return False;
-
- if (!prs_rpcbuffer_p("", ps, depth, &q_u->buffer))
- return False;
-
- if (!prs_align(ps))
- return False;
- if (!prs_uint32("offered", ps, depth, &q_u->offered))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_getform");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!prs_rpcbuffer_p("", ps, depth, &r_u->buffer))
- return False;
-
- if (!prs_align(ps))
- return False;
-
- if (!prs_uint32("size of buffer needed", ps, depth, &r_u->needed))
- return False;
-
- if (!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
Parse a SPOOL_R_ENUMPORTS structure.
********************************************************************/
@@ -6087,172 +5444,6 @@ bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_
}
/*******************************************************************
-********************************************************************/
-
-static bool spoolss_io_addform(const char *desc, FORM *f, uint32 ptr, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_addform");
- depth++;
- if(!prs_align(ps))
- return False;
-
- if (ptr!=0)
- {
- if(!prs_uint32("flags", ps, depth, &f->flags))
- return False;
- if(!prs_uint32("name_ptr", ps, depth, &f->name_ptr))
- return False;
- if(!prs_uint32("size_x", ps, depth, &f->size_x))
- return False;
- if(!prs_uint32("size_y", ps, depth, &f->size_y))
- return False;
- if(!prs_uint32("left", ps, depth, &f->left))
- return False;
- if(!prs_uint32("top", ps, depth, &f->top))
- return False;
- if(!prs_uint32("right", ps, depth, &f->right))
- return False;
- if(!prs_uint32("bottom", ps, depth, &f->bottom))
- return False;
-
- if(!smb_io_unistr2("", &f->name, f->name_ptr, ps, depth))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_q_deleteform");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if(!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
- return False;
- if(!smb_io_unistr2("form name", &q_u->name, True, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_deleteform");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth)
-{
- uint32 useless_ptr=1;
- prs_debug(ps, depth, desc, "spoolss_io_q_addform");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if(!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
- return False;
- if(!prs_uint32("level", ps, depth, &q_u->level))
- return False;
- if(!prs_uint32("level2", ps, depth, &q_u->level2))
- return False;
-
- if (q_u->level==1)
- {
- if(!prs_uint32("useless_ptr", ps, depth, &useless_ptr))
- return False;
- if(!spoolss_io_addform("", &q_u->form, useless_ptr, ps, depth))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_addform");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth)
-{
- uint32 useless_ptr=1;
- prs_debug(ps, depth, desc, "spoolss_io_q_setform");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if(!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
- return False;
- if(!smb_io_unistr2("", &q_u->name, True, ps, depth))
- return False;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("level", ps, depth, &q_u->level))
- return False;
- if(!prs_uint32("level2", ps, depth, &q_u->level2))
- return False;
-
- if (q_u->level==1)
- {
- if(!prs_uint32("useless_ptr", ps, depth, &useless_ptr))
- return False;
- if(!spoolss_io_addform("", &q_u->form, useless_ptr, ps, depth))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_setform");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
Parse a SPOOL_R_GETJOB structure.
********************************************************************/
@@ -6939,60 +6130,6 @@ bool spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u,
* read a structure.
********************************************************************/
-bool make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u,
- POLICY_HND *hnd, char *keyname)
-{
- DEBUG(5,("make_spoolss_q_deleteprinterkey\n"));
-
- memcpy(&q_u->handle, hnd, sizeof(q_u->handle));
- init_unistr2(&q_u->keyname, keyname, UNI_STR_TERMINATE);
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
- ********************************************************************/
-
-bool spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinterkey");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if(!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
- return False;
-
- if(!smb_io_unistr2("", &q_u->keyname, True, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- ********************************************************************/
-
-bool spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterkey");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
- * read a structure.
- ********************************************************************/
-
bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdataex");
@@ -7302,66 +6439,6 @@ bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRIN
* init a structure.
********************************************************************/
-bool make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
- int level, FORM *form)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
- q_u->level = level;
- q_u->level2 = level;
- memcpy(&q_u->form, form, sizeof(FORM));
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
- int level, const char *form_name, FORM *form)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
- q_u->level = level;
- q_u->level2 = level;
- memcpy(&q_u->form, form, sizeof(FORM));
- init_unistr2(&q_u->name, form_name, UNI_STR_TERMINATE);
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle,
- const char *form)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
- init_unistr2(&q_u->name, form, UNI_STR_TERMINATE);
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
- const char *formname, uint32 level,
- RPC_BUFFER *buffer, uint32 offered)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
- q_u->level = level;
- init_unistr2(&q_u->formname, formname, UNI_STR_TERMINATE);
- q_u->buffer=buffer;
- q_u->offered=offered;
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle,
uint32 level, RPC_BUFFER *buffer,
uint32 offered)
@@ -7414,30 +6491,6 @@ bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle,
* init a structure.
********************************************************************/
-bool make_spoolss_q_startpageprinter(SPOOL_Q_STARTPAGEPRINTER *q_u,
- POLICY_HND *handle)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_endpageprinter(SPOOL_Q_ENDPAGEPRINTER *q_u,
- POLICY_HND *handle)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u,
POLICY_HND *handle, uint32 level,
char *docname, char *outputfile,
@@ -7478,60 +6531,6 @@ bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u,
* init a structure.
********************************************************************/
-bool make_spoolss_q_enddocprinter(SPOOL_Q_ENDDOCPRINTER *q_u,
- POLICY_HND *handle)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u,
- POLICY_HND *handle, uint32 data_size,
- char *data)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
- q_u->buffer_size = q_u->buffer_size2 = data_size;
- q_u->buffer = (unsigned char *)data;
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u,
- POLICY_HND *handle, char *valuename)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
- init_unistr2(&q_u->valuename, valuename, UNI_STR_TERMINATE);
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
-bool make_spoolss_q_deleteprinterdataex(SPOOL_Q_DELETEPRINTERDATAEX *q_u,
- POLICY_HND *handle, char *key,
- char *value)
-{
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
- init_unistr2(&q_u->valuename, value, UNI_STR_TERMINATE);
- init_unistr2(&q_u->keyname, key, UNI_STR_TERMINATE);
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
uint32 flags, uint32 options, const char *localmachine,
uint32 printerlocal, SPOOL_NOTIFY_OPTION *option)
diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c
index 57b3be43ad..d8c5c3d453 100644
--- a/source3/rpc_server/srv_eventlog_lib.c
+++ b/source3/rpc_server/srv_eventlog_lib.c
@@ -551,9 +551,11 @@ bool parse_logentry( TALLOC_CTX *mem_ctx, char *line, struct eventlog_Record_tdb
entry->sid_length = rpcstr_push_talloc(mem_ctx,
&dummy,
stop);
+ if (entry->sid_length == (uint32_t)-1) {
+ return false;
+ }
entry->sid = data_blob_talloc(mem_ctx, dummy, entry->sid_length);
- if (entry->sid_length == (uint32_t)-1 ||
- entry->sid.data == NULL) {
+ if (entry->sid.data == NULL) {
return false;
}
} else if ( 0 == strncmp( start, "STR", stop - start ) ) {
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 924226bc4f..09b1f66440 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -61,7 +61,6 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p)
uint32 data_space_available;
uint32 data_len_left;
uint32 data_len;
- prs_struct outgoing_pdu;
NTSTATUS status;
DATA_BLOB auth_blob;
RPC_HDR_AUTH auth_info;
@@ -105,8 +104,8 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p)
return False;
}
- data_space_available = sizeof(p->out_data.current_pdu) - RPC_HEADER_LEN - RPC_HDR_RESP_LEN -
- RPC_HDR_AUTH_LEN - NTLMSSP_SIG_SIZE;
+ data_space_available = RPC_MAX_PDU_FRAG_LEN - RPC_HEADER_LEN
+ - RPC_HDR_RESP_LEN - RPC_HDR_AUTH_LEN - NTLMSSP_SIG_SIZE;
/*
* The amount we send is the minimum of the available
@@ -150,27 +149,27 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p)
* data.
*/
- prs_init_empty( &outgoing_pdu, p->mem_ctx, MARSHALL);
- prs_give_memory( &outgoing_pdu, (char *)p->out_data.current_pdu, sizeof(p->out_data.current_pdu), False);
+ prs_init_empty(&p->out_data.frag, p->mem_ctx, MARSHALL);
/* Store the header in the data stream. */
- if(!smb_io_rpc_hdr("hdr", &p->hdr, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr("hdr", &p->hdr, &p->out_data.frag, 0)) {
DEBUG(0,("create_next_pdu_ntlmssp: failed to marshall RPC_HDR.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
- if(!smb_io_rpc_hdr_resp("resp", &hdr_resp, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr_resp("resp", &hdr_resp, &p->out_data.frag, 0)) {
DEBUG(0,("create_next_pdu_ntlmssp: failed to marshall RPC_HDR_RESP.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
/* Copy the data into the PDU. */
- if(!prs_append_some_prs_data(&outgoing_pdu, &p->out_data.rdata, p->out_data.data_sent_length, data_len)) {
+ if(!prs_append_some_prs_data(&p->out_data.frag, &p->out_data.rdata,
+ p->out_data.data_sent_length, data_len)) {
DEBUG(0,("create_next_pdu_ntlmssp: failed to copy %u bytes of data.\n", (unsigned int)data_len));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
@@ -179,10 +178,11 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p)
char pad[8];
memset(pad, '\0', 8);
- if (!prs_copy_data_in(&outgoing_pdu, pad, ss_padding_len)) {
+ if (!prs_copy_data_in(&p->out_data.frag, pad,
+ ss_padding_len)) {
DEBUG(0,("create_next_pdu_ntlmssp: failed to add %u bytes of pad data.\n",
(unsigned int)ss_padding_len));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
}
@@ -201,9 +201,10 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p)
}
init_rpc_hdr_auth(&auth_info, auth_type, auth_level, ss_padding_len, 1 /* context id. */);
- if(!smb_io_rpc_hdr_auth("hdr_auth", &auth_info, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr_auth("hdr_auth", &auth_info, &p->out_data.frag,
+ 0)) {
DEBUG(0,("create_next_pdu_ntlmssp: failed to marshall RPC_HDR_AUTH.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
@@ -212,43 +213,48 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p)
switch (p->auth.auth_level) {
case PIPE_AUTH_LEVEL_PRIVACY:
/* Data portion is encrypted. */
- status = ntlmssp_seal_packet(a->ntlmssp_state,
- (unsigned char *)prs_data_p(&outgoing_pdu) + RPC_HEADER_LEN + RPC_HDR_RESP_LEN,
- data_len + ss_padding_len,
- (unsigned char *)prs_data_p(&outgoing_pdu),
- (size_t)prs_offset(&outgoing_pdu),
- &auth_blob);
+ status = ntlmssp_seal_packet(
+ a->ntlmssp_state,
+ (uint8_t *)prs_data_p(&p->out_data.frag)
+ + RPC_HEADER_LEN + RPC_HDR_RESP_LEN,
+ data_len + ss_padding_len,
+ (unsigned char *)prs_data_p(&p->out_data.frag),
+ (size_t)prs_offset(&p->out_data.frag),
+ &auth_blob);
if (!NT_STATUS_IS_OK(status)) {
data_blob_free(&auth_blob);
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
break;
case PIPE_AUTH_LEVEL_INTEGRITY:
/* Data is signed. */
- status = ntlmssp_sign_packet(a->ntlmssp_state,
- (unsigned char *)prs_data_p(&outgoing_pdu) + RPC_HEADER_LEN + RPC_HDR_RESP_LEN,
- data_len + ss_padding_len,
- (unsigned char *)prs_data_p(&outgoing_pdu),
- (size_t)prs_offset(&outgoing_pdu),
- &auth_blob);
+ status = ntlmssp_sign_packet(
+ a->ntlmssp_state,
+ (unsigned char *)prs_data_p(&p->out_data.frag)
+ + RPC_HEADER_LEN + RPC_HDR_RESP_LEN,
+ data_len + ss_padding_len,
+ (unsigned char *)prs_data_p(&p->out_data.frag),
+ (size_t)prs_offset(&p->out_data.frag),
+ &auth_blob);
if (!NT_STATUS_IS_OK(status)) {
data_blob_free(&auth_blob);
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
break;
default:
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
/* Append the auth blob. */
- if (!prs_copy_data_in(&outgoing_pdu, (char *)auth_blob.data, NTLMSSP_SIG_SIZE)) {
+ if (!prs_copy_data_in(&p->out_data.frag, (char *)auth_blob.data,
+ NTLMSSP_SIG_SIZE)) {
DEBUG(0,("create_next_pdu_ntlmssp: failed to add %u bytes auth blob.\n",
(unsigned int)NTLMSSP_SIG_SIZE));
data_blob_free(&auth_blob);
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
@@ -259,10 +265,8 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p)
*/
p->out_data.data_sent_length += data_len;
- p->out_data.current_pdu_len = p->hdr.frag_len;
p->out_data.current_pdu_sent = 0;
- prs_mem_free(&outgoing_pdu);
return True;
}
@@ -278,7 +282,6 @@ static bool create_next_pdu_schannel(pipes_struct *p)
uint32 data_len;
uint32 data_space_available;
uint32 data_len_left;
- prs_struct outgoing_pdu;
uint32 data_pos;
/*
@@ -318,8 +321,9 @@ static bool create_next_pdu_schannel(pipes_struct *p)
return False;
}
- data_space_available = sizeof(p->out_data.current_pdu) - RPC_HEADER_LEN - RPC_HDR_RESP_LEN -
- RPC_HDR_AUTH_LEN - RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN;
+ data_space_available = RPC_MAX_PDU_FRAG_LEN - RPC_HEADER_LEN
+ - RPC_HDR_RESP_LEN - RPC_HDR_AUTH_LEN
+ - RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN;
/*
* The amount we send is the minimum of the available
@@ -357,30 +361,30 @@ static bool create_next_pdu_schannel(pipes_struct *p)
* data.
*/
- prs_init_empty( &outgoing_pdu, p->mem_ctx, MARSHALL);
- prs_give_memory( &outgoing_pdu, (char *)p->out_data.current_pdu, sizeof(p->out_data.current_pdu), False);
+ prs_init_empty(&p->out_data.frag, p->mem_ctx, MARSHALL);
/* Store the header in the data stream. */
- if(!smb_io_rpc_hdr("hdr", &p->hdr, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr("hdr", &p->hdr, &p->out_data.frag, 0)) {
DEBUG(0,("create_next_pdu_schannel: failed to marshall RPC_HDR.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
- if(!smb_io_rpc_hdr_resp("resp", &hdr_resp, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr_resp("resp", &hdr_resp, &p->out_data.frag, 0)) {
DEBUG(0,("create_next_pdu_schannel: failed to marshall RPC_HDR_RESP.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
/* Store the current offset. */
- data_pos = prs_offset(&outgoing_pdu);
+ data_pos = prs_offset(&p->out_data.frag);
/* Copy the data into the PDU. */
- if(!prs_append_some_prs_data(&outgoing_pdu, &p->out_data.rdata, p->out_data.data_sent_length, data_len)) {
+ if(!prs_append_some_prs_data(&p->out_data.frag, &p->out_data.rdata,
+ p->out_data.data_sent_length, data_len)) {
DEBUG(0,("create_next_pdu_schannel: failed to copy %u bytes of data.\n", (unsigned int)data_len));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
@@ -388,9 +392,10 @@ static bool create_next_pdu_schannel(pipes_struct *p)
if (ss_padding_len) {
char pad[8];
memset(pad, '\0', 8);
- if (!prs_copy_data_in(&outgoing_pdu, pad, ss_padding_len)) {
+ if (!prs_copy_data_in(&p->out_data.frag, pad,
+ ss_padding_len)) {
DEBUG(0,("create_next_pdu_schannel: failed to add %u bytes of pad data.\n", (unsigned int)ss_padding_len));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
}
@@ -399,11 +404,9 @@ static bool create_next_pdu_schannel(pipes_struct *p)
/*
* Schannel processing.
*/
- char *data;
RPC_HDR_AUTH auth_info;
RPC_AUTH_SCHANNEL_CHK verf;
- data = prs_data_p(&outgoing_pdu) + data_pos;
/* Check it's the type of reply we were expecting to decode */
init_rpc_hdr_auth(&auth_info,
@@ -412,20 +415,21 @@ static bool create_next_pdu_schannel(pipes_struct *p)
RPC_AUTH_LEVEL_PRIVACY : RPC_AUTH_LEVEL_INTEGRITY,
ss_padding_len, 1);
- if(!smb_io_rpc_hdr_auth("hdr_auth", &auth_info, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr_auth("hdr_auth", &auth_info,
+ &p->out_data.frag, 0)) {
DEBUG(0,("create_next_pdu_schannel: failed to marshall RPC_HDR_AUTH.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
schannel_encode(p->auth.a_u.schannel_auth,
- p->auth.auth_level,
- SENDER_IS_ACCEPTOR,
- &verf, data, data_len + ss_padding_len);
+ p->auth.auth_level, SENDER_IS_ACCEPTOR, &verf,
+ prs_data_p(&p->out_data.frag) + data_pos,
+ data_len + ss_padding_len);
if (!smb_io_rpc_auth_schannel_chk("", RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN,
- &verf, &outgoing_pdu, 0)) {
- prs_mem_free(&outgoing_pdu);
+ &verf, &p->out_data.frag, 0)) {
+ prs_mem_free(&p->out_data.frag);
return False;
}
@@ -437,10 +441,8 @@ static bool create_next_pdu_schannel(pipes_struct *p)
*/
p->out_data.data_sent_length += data_len;
- p->out_data.current_pdu_len = p->hdr.frag_len;
p->out_data.current_pdu_sent = 0;
- prs_mem_free(&outgoing_pdu);
return True;
}
@@ -455,7 +457,6 @@ static bool create_next_pdu_noauth(pipes_struct *p)
uint32 data_len;
uint32 data_space_available;
uint32 data_len_left;
- prs_struct outgoing_pdu;
/*
* If we're in the fault state, keep returning fault PDU's until
@@ -494,7 +495,8 @@ static bool create_next_pdu_noauth(pipes_struct *p)
return False;
}
- data_space_available = sizeof(p->out_data.current_pdu) - RPC_HEADER_LEN - RPC_HDR_RESP_LEN;
+ data_space_available = RPC_MAX_PDU_FRAG_LEN - RPC_HEADER_LEN
+ - RPC_HDR_RESP_LEN;
/*
* The amount we send is the minimum of the available
@@ -530,27 +532,27 @@ static bool create_next_pdu_noauth(pipes_struct *p)
* data.
*/
- prs_init_empty( &outgoing_pdu, p->mem_ctx, MARSHALL);
- prs_give_memory( &outgoing_pdu, (char *)p->out_data.current_pdu, sizeof(p->out_data.current_pdu), False);
+ prs_init_empty(&p->out_data.frag, p->mem_ctx, MARSHALL);
/* Store the header in the data stream. */
- if(!smb_io_rpc_hdr("hdr", &p->hdr, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr("hdr", &p->hdr, &p->out_data.frag, 0)) {
DEBUG(0,("create_next_pdu_noath: failed to marshall RPC_HDR.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
- if(!smb_io_rpc_hdr_resp("resp", &hdr_resp, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr_resp("resp", &hdr_resp, &p->out_data.frag, 0)) {
DEBUG(0,("create_next_pdu_noath: failed to marshall RPC_HDR_RESP.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
/* Copy the data into the PDU. */
- if(!prs_append_some_prs_data(&outgoing_pdu, &p->out_data.rdata, p->out_data.data_sent_length, data_len)) {
+ if(!prs_append_some_prs_data(&p->out_data.frag, &p->out_data.rdata,
+ p->out_data.data_sent_length, data_len)) {
DEBUG(0,("create_next_pdu_noauth: failed to copy %u bytes of data.\n", (unsigned int)data_len));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
@@ -559,10 +561,8 @@ static bool create_next_pdu_noauth(pipes_struct *p)
*/
p->out_data.data_sent_length += data_len;
- p->out_data.current_pdu_len = p->hdr.frag_len;
p->out_data.current_pdu_sent = 0;
- prs_mem_free(&outgoing_pdu);
return True;
}
@@ -778,7 +778,6 @@ bool api_pipe_bind_auth3(pipes_struct *p, prs_struct *rpc_in_p)
static bool setup_bind_nak(pipes_struct *p)
{
- prs_struct outgoing_rpc;
RPC_HDR nak_hdr;
uint16 zero = 0;
@@ -791,8 +790,7 @@ static bool setup_bind_nak(pipes_struct *p)
* header and are never sending more than one PDU here.
*/
- prs_init_empty( &outgoing_rpc, p->mem_ctx, MARSHALL);
- prs_give_memory( &outgoing_rpc, (char *)p->out_data.current_pdu, sizeof(p->out_data.current_pdu), False);
+ prs_init_empty(&p->out_data.frag, p->mem_ctx, MARSHALL);
/*
* Initialize a bind_nak header.
@@ -805,9 +803,9 @@ static bool setup_bind_nak(pipes_struct *p)
* Marshall the header into the outgoing PDU.
*/
- if(!smb_io_rpc_hdr("", &nak_hdr, &outgoing_rpc, 0)) {
+ if(!smb_io_rpc_hdr("", &nak_hdr, &p->out_data.frag, 0)) {
DEBUG(0,("setup_bind_nak: marshalling of RPC_HDR failed.\n"));
- prs_mem_free(&outgoing_rpc);
+ prs_mem_free(&p->out_data.frag);
return False;
}
@@ -815,13 +813,12 @@ static bool setup_bind_nak(pipes_struct *p)
* Now add the reject reason.
*/
- if(!prs_uint16("reject code", &outgoing_rpc, 0, &zero)) {
- prs_mem_free(&outgoing_rpc);
+ if(!prs_uint16("reject code", &p->out_data.frag, 0, &zero)) {
+ prs_mem_free(&p->out_data.frag);
return False;
}
p->out_data.data_sent_length = 0;
- p->out_data.current_pdu_len = prs_offset(&outgoing_rpc);
p->out_data.current_pdu_sent = 0;
if (p->auth.auth_data_free_func) {
@@ -840,7 +837,6 @@ static bool setup_bind_nak(pipes_struct *p)
bool setup_fault_pdu(pipes_struct *p, NTSTATUS status)
{
- prs_struct outgoing_pdu;
RPC_HDR fault_hdr;
RPC_HDR_RESP hdr_resp;
RPC_HDR_FAULT fault_resp;
@@ -854,8 +850,7 @@ bool setup_fault_pdu(pipes_struct *p, NTSTATUS status)
* header and are never sending more than one PDU here.
*/
- prs_init_empty( &outgoing_pdu, p->mem_ctx, MARSHALL);
- prs_give_memory( &outgoing_pdu, (char *)p->out_data.current_pdu, sizeof(p->out_data.current_pdu), False);
+ prs_init_empty(&p->out_data.frag, p->mem_ctx, MARSHALL);
/*
* Initialize a fault header.
@@ -877,29 +872,27 @@ bool setup_fault_pdu(pipes_struct *p, NTSTATUS status)
* Marshall the header into the outgoing PDU.
*/
- if(!smb_io_rpc_hdr("", &fault_hdr, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr("", &fault_hdr, &p->out_data.frag, 0)) {
DEBUG(0,("setup_fault_pdu: marshalling of RPC_HDR failed.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
- if(!smb_io_rpc_hdr_resp("resp", &hdr_resp, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr_resp("resp", &hdr_resp, &p->out_data.frag, 0)) {
DEBUG(0,("setup_fault_pdu: failed to marshall RPC_HDR_RESP.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
- if(!smb_io_rpc_hdr_fault("fault", &fault_resp, &outgoing_pdu, 0)) {
+ if(!smb_io_rpc_hdr_fault("fault", &fault_resp, &p->out_data.frag, 0)) {
DEBUG(0,("setup_fault_pdu: failed to marshall RPC_HDR_FAULT.\n"));
- prs_mem_free(&outgoing_pdu);
+ prs_mem_free(&p->out_data.frag);
return False;
}
p->out_data.data_sent_length = 0;
- p->out_data.current_pdu_len = prs_offset(&outgoing_pdu);
p->out_data.current_pdu_sent = 0;
- prs_mem_free(&outgoing_pdu);
return True;
}
@@ -1525,7 +1518,6 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
fstring ack_pipe_name;
prs_struct out_hdr_ba;
prs_struct out_auth;
- prs_struct outgoing_rpc;
int i = 0;
int auth_len = 0;
unsigned int auth_type = RPC_ANONYMOUS_AUTH_TYPE;
@@ -1537,7 +1529,7 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
return setup_bind_nak(p);
}
- prs_init_empty( &outgoing_rpc, p->mem_ctx, MARSHALL);
+ prs_init_empty(&p->out_data.frag, p->mem_ctx, MARSHALL);
/*
* Marshall directly into the outgoing PDU space. We
@@ -1545,8 +1537,6 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
* header and are never sending more than one PDU here.
*/
- prs_give_memory( &outgoing_rpc, (char *)p->out_data.current_pdu, sizeof(p->out_data.current_pdu), False);
-
/*
* Setup the memory to marshall the ba header, and the
* auth footers.
@@ -1554,13 +1544,13 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
if(!prs_init(&out_hdr_ba, 1024, p->mem_ctx, MARSHALL)) {
DEBUG(0,("api_pipe_bind_req: malloc out_hdr_ba failed.\n"));
- prs_mem_free(&outgoing_rpc);
+ prs_mem_free(&p->out_data.frag);
return False;
}
if(!prs_init(&out_auth, 1024, p->mem_ctx, MARSHALL)) {
DEBUG(0,("api_pipe_bind_req: malloc out_auth failed.\n"));
- prs_mem_free(&outgoing_rpc);
+ prs_mem_free(&p->out_data.frag);
prs_mem_free(&out_hdr_ba);
return False;
}
@@ -1606,7 +1596,7 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
if (NT_STATUS_IS_ERR(status)) {
DEBUG(3,("api_pipe_bind_req: Unknown pipe name %s in bind request.\n",
get_pipe_name_from_iface(&hdr_rb.rpc_context[0].abstract)));
- prs_mem_free(&outgoing_rpc);
+ prs_mem_free(&p->out_data.frag);
prs_mem_free(&out_hdr_ba);
prs_mem_free(&out_auth);
@@ -1764,7 +1754,7 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
* Marshall the header into the outgoing PDU.
*/
- if(!smb_io_rpc_hdr("", &p->hdr, &outgoing_rpc, 0)) {
+ if(!smb_io_rpc_hdr("", &p->hdr, &p->out_data.frag, 0)) {
DEBUG(0,("api_pipe_bind_req: marshalling of RPC_HDR failed.\n"));
goto err_exit;
}
@@ -1773,12 +1763,12 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
* Now add the RPC_HDR_BA and any auth needed.
*/
- if(!prs_append_prs_data( &outgoing_rpc, &out_hdr_ba)) {
+ if(!prs_append_prs_data(&p->out_data.frag, &out_hdr_ba)) {
DEBUG(0,("api_pipe_bind_req: append of RPC_HDR_BA failed.\n"));
goto err_exit;
}
- if (auth_len && !prs_append_prs_data( &outgoing_rpc, &out_auth)) {
+ if (auth_len && !prs_append_prs_data( &p->out_data.frag, &out_auth)) {
DEBUG(0,("api_pipe_bind_req: append of auth info failed.\n"));
goto err_exit;
}
@@ -1788,7 +1778,6 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
*/
p->out_data.data_sent_length = 0;
- p->out_data.current_pdu_len = prs_offset(&outgoing_rpc);
p->out_data.current_pdu_sent = 0;
prs_mem_free(&out_hdr_ba);
@@ -1798,7 +1787,7 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
err_exit:
- prs_mem_free(&outgoing_rpc);
+ prs_mem_free(&p->out_data.frag);
prs_mem_free(&out_hdr_ba);
prs_mem_free(&out_auth);
return setup_bind_nak(p);
@@ -1818,10 +1807,9 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
fstring ack_pipe_name;
prs_struct out_hdr_ba;
prs_struct out_auth;
- prs_struct outgoing_rpc;
int auth_len = 0;
- prs_init_empty( &outgoing_rpc, p->mem_ctx, MARSHALL);
+ prs_init_empty(&p->out_data.frag, p->mem_ctx, MARSHALL);
/*
* Marshall directly into the outgoing PDU space. We
@@ -1829,8 +1817,6 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
* header and are never sending more than one PDU here.
*/
- prs_give_memory( &outgoing_rpc, (char *)p->out_data.current_pdu, sizeof(p->out_data.current_pdu), False);
-
/*
* Setup the memory to marshall the ba header, and the
* auth footers.
@@ -1838,13 +1824,13 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
if(!prs_init(&out_hdr_ba, 1024, p->mem_ctx, MARSHALL)) {
DEBUG(0,("api_pipe_alter_context: malloc out_hdr_ba failed.\n"));
- prs_mem_free(&outgoing_rpc);
+ prs_mem_free(&p->out_data.frag);
return False;
}
if(!prs_init(&out_auth, 1024, p->mem_ctx, MARSHALL)) {
DEBUG(0,("api_pipe_alter_context: malloc out_auth failed.\n"));
- prs_mem_free(&outgoing_rpc);
+ prs_mem_free(&p->out_data.frag);
prs_mem_free(&out_hdr_ba);
return False;
}
@@ -1958,7 +1944,7 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
* Marshall the header into the outgoing PDU.
*/
- if(!smb_io_rpc_hdr("", &p->hdr, &outgoing_rpc, 0)) {
+ if(!smb_io_rpc_hdr("", &p->hdr, &p->out_data.frag, 0)) {
DEBUG(0,("api_pipe_alter_context: marshalling of RPC_HDR failed.\n"));
goto err_exit;
}
@@ -1967,12 +1953,12 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
* Now add the RPC_HDR_BA and any auth needed.
*/
- if(!prs_append_prs_data( &outgoing_rpc, &out_hdr_ba)) {
+ if(!prs_append_prs_data(&p->out_data.frag, &out_hdr_ba)) {
DEBUG(0,("api_pipe_alter_context: append of RPC_HDR_BA failed.\n"));
goto err_exit;
}
- if (auth_len && !prs_append_prs_data( &outgoing_rpc, &out_auth)) {
+ if (auth_len && !prs_append_prs_data(&p->out_data.frag, &out_auth)) {
DEBUG(0,("api_pipe_alter_context: append of auth info failed.\n"));
goto err_exit;
}
@@ -1982,7 +1968,6 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
*/
p->out_data.data_sent_length = 0;
- p->out_data.current_pdu_len = prs_offset(&outgoing_rpc);
p->out_data.current_pdu_sent = 0;
prs_mem_free(&out_hdr_ba);
@@ -1992,7 +1977,7 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
err_exit:
- prs_mem_free(&outgoing_rpc);
+ prs_mem_free(&p->out_data.frag);
prs_mem_free(&out_hdr_ba);
prs_mem_free(&out_auth);
return setup_bind_nak(p);
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 4cbe8d67a3..6dfe7a0911 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -65,10 +65,9 @@ static bool pipe_init_outgoing_data(pipes_struct *p)
/* Reset the offset counters. */
o_data->data_sent_length = 0;
- o_data->current_pdu_len = 0;
o_data->current_pdu_sent = 0;
- memset(o_data->current_pdu, '\0', sizeof(o_data->current_pdu));
+ prs_mem_free(&o_data->frag);
/* Free any memory in the current return data buffer. */
prs_mem_free(&o_data->rdata);
@@ -77,7 +76,7 @@ static bool pipe_init_outgoing_data(pipes_struct *p)
* Initialize the outgoing RPC data buffer.
* we will use this as the raw data area for replying to rpc requests.
*/
- if(!prs_init(&o_data->rdata, RPC_MAX_PDU_FRAG_LEN, p->mem_ctx, MARSHALL)) {
+ if(!prs_init(&o_data->rdata, 128, p->mem_ctx, MARSHALL)) {
DEBUG(0,("pipe_init_outgoing_data: malloc fail.\n"));
return False;
}
@@ -128,7 +127,7 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
* change the type to UNMARSALLING before processing the stream.
*/
- if(!prs_init(&p->in_data.data, RPC_MAX_PDU_FRAG_LEN, p->mem_ctx, MARSHALL)) {
+ if(!prs_init(&p->in_data.data, 128, p->mem_ctx, MARSHALL)) {
DEBUG(0,("open_rpc_pipe_p: malloc fail for in_data struct.\n"));
talloc_destroy(p->mem_ctx);
close_policy_by_pipe(p);
@@ -192,6 +191,15 @@ static ssize_t fill_rpc_header(pipes_struct *p, char *data, size_t data_to_copy)
(unsigned int)data_to_copy, (unsigned int)len_needed_to_complete_hdr,
(unsigned int)p->in_data.pdu_received_len ));
+ if (p->in_data.current_in_pdu == NULL) {
+ p->in_data.current_in_pdu = talloc_array(p, uint8_t,
+ RPC_HEADER_LEN);
+ }
+ if (p->in_data.current_in_pdu == NULL) {
+ DEBUG(0, ("talloc failed\n"));
+ return -1;
+ }
+
memcpy((char *)&p->in_data.current_in_pdu[p->in_data.pdu_received_len], data, len_needed_to_complete_hdr);
p->in_data.pdu_received_len += len_needed_to_complete_hdr;
@@ -312,6 +320,14 @@ static ssize_t unmarshall_rpc_header(pipes_struct *p)
prs_mem_free(&rpc_in);
+ p->in_data.current_in_pdu = TALLOC_REALLOC_ARRAY(
+ p, p->in_data.current_in_pdu, uint8_t, p->hdr.frag_len);
+ if (p->in_data.current_in_pdu == NULL) {
+ DEBUG(0, ("talloc failed\n"));
+ set_incoming_fault(p);
+ return -1;
+ }
+
return 0; /* No extra data processed. */
}
@@ -635,6 +651,7 @@ static void process_complete_pdu(pipes_struct *p)
/*
* Reset the lengths. We're ready for a new pdu.
*/
+ TALLOC_FREE(p->in_data.current_in_pdu);
p->in_data.pdu_needed_len = 0;
p->in_data.pdu_received_len = 0;
}
@@ -811,17 +828,24 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_
* PDU.
*/
- if((pdu_remaining = p->out_data.current_pdu_len - p->out_data.current_pdu_sent) > 0) {
+ pdu_remaining = prs_offset(&p->out_data.frag)
+ - p->out_data.current_pdu_sent;
+
+ if (pdu_remaining > 0) {
data_returned = (ssize_t)MIN(n, pdu_remaining);
DEBUG(10,("read_from_pipe: %s: current_pdu_len = %u, "
"current_pdu_sent = %u returning %d bytes.\n",
get_pipe_name_from_iface(&p->syntax),
- (unsigned int)p->out_data.current_pdu_len,
+ (unsigned int)prs_offset(&p->out_data.frag),
(unsigned int)p->out_data.current_pdu_sent,
(int)data_returned));
- memcpy( data, &p->out_data.current_pdu[p->out_data.current_pdu_sent], (size_t)data_returned);
+ memcpy(data,
+ prs_data_p(&p->out_data.frag)
+ + p->out_data.current_pdu_sent,
+ data_returned);
+
p->out_data.current_pdu_sent += (uint32)data_returned;
goto out;
}
@@ -858,14 +882,14 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_
return -1;
}
- data_returned = MIN(n, p->out_data.current_pdu_len);
+ data_returned = MIN(n, prs_offset(&p->out_data.frag));
- memcpy( data, p->out_data.current_pdu, (size_t)data_returned);
+ memcpy( data, prs_data_p(&p->out_data.frag), (size_t)data_returned);
p->out_data.current_pdu_sent += (uint32)data_returned;
out:
+ (*is_data_outstanding) = prs_offset(&p->out_data.frag) > n;
- (*is_data_outstanding) = p->out_data.current_pdu_len > n;
return data_returned;
}
@@ -880,6 +904,7 @@ static int close_internal_rpc_pipe_hnd(struct pipes_struct *p)
return False;
}
+ prs_mem_free(&p->out_data.frag);
prs_mem_free(&p->out_data.rdata);
prs_mem_free(&p->in_data.data);
@@ -1195,11 +1220,12 @@ static void np_write_done(struct async_req *subreq)
{
struct async_req *req = talloc_get_type_abort(
subreq->async.priv, struct async_req);
- NTSTATUS status;
+ int err;
+ ssize_t ret;
- status = sendall_recv(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- async_req_nterror(req, status);
+ ret = sendall_recv(subreq, &err);
+ if (ret < 0) {
+ async_req_nterror(req, map_nt_error_from_unix(err));
return;
}
async_req_done(req);
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 5f616ecd19..0b8cb35a84 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1173,9 +1173,7 @@ NTSTATUS _samr_EnumDomainGroups(pipes_struct *p,
*r->out.sam = samr_array;
*r->out.num_entries = num_groups;
- /* this was missing, IMHO:
*r->out.resume_handle = num_groups + *r->in.resume_handle;
- */
DEBUG(5,("_samr_EnumDomainGroups: %d\n", __LINE__));
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index d3045028bf..bf11bc6914 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -27,6 +27,27 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
+/*******************************************************************
+ ********************************************************************/
+
+static bool proxy_spoolss_call(pipes_struct *p, uint8_t opnum)
+{
+ struct api_struct *fns;
+ int n_fns;
+
+ spoolss_get_pipe_fns(&fns, &n_fns);
+
+ if (opnum >= n_fns) {
+ return false;
+ }
+
+ if (fns[opnum].opnum != opnum) {
+ smb_panic("SPOOLSS function table not sorted");
+ }
+
+ return fns[opnum].fn(p);
+}
+
/********************************************************************
* api_spoolss_open_printer_ex (rarely seen - older call)
********************************************************************/
@@ -126,28 +147,7 @@ static bool api_spoolss_getprinterdata(pipes_struct *p)
static bool api_spoolss_deleteprinterdata(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTERDATA q_u;
- SPOOL_R_DELETEPRINTERDATA r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- /* read the stream and fill the struct */
- if (!spoolss_io_q_deleteprinterdata("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinterdata: unable to unmarshall SPOOL_Q_DELETEPRINTERDATA.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinterdata( p, &q_u, &r_u );
-
- if (!spoolss_io_r_deleteprinterdata("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_deleteprinterdata: unable to marshall SPOOL_R_DELETEPRINTERDATA.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDATA);
}
/********************************************************************
@@ -158,27 +158,7 @@ static bool api_spoolss_deleteprinterdata(pipes_struct *p)
static bool api_spoolss_closeprinter(pipes_struct *p)
{
- SPOOL_Q_CLOSEPRINTER q_u;
- SPOOL_R_CLOSEPRINTER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if (!spoolss_io_q_closeprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_closeprinter: unable to unmarshall SPOOL_Q_CLOSEPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_closeprinter(p, &q_u, &r_u);
-
- if (!spoolss_io_r_closeprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_closeprinter: unable to marshall SPOOL_R_CLOSEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_CLOSEPRINTER);
}
/********************************************************************
@@ -189,27 +169,7 @@ static bool api_spoolss_closeprinter(pipes_struct *p)
static bool api_spoolss_abortprinter(pipes_struct *p)
{
- SPOOL_Q_ABORTPRINTER q_u;
- SPOOL_R_ABORTPRINTER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if (!spoolss_io_q_abortprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_abortprinter: unable to unmarshall SPOOL_Q_ABORTPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_abortprinter(p, &q_u, &r_u);
-
- if (!spoolss_io_r_abortprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_abortprinter: unable to marshall SPOOL_R_ABORTPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_ABORTPRINTER);
}
/********************************************************************
@@ -220,30 +180,9 @@ static bool api_spoolss_abortprinter(pipes_struct *p)
static bool api_spoolss_deleteprinter(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTER q_u;
- SPOOL_R_DELETEPRINTER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if (!spoolss_io_q_deleteprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinter: unable to unmarshall SPOOL_Q_DELETEPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinter(p, &q_u, &r_u);
-
- if (!spoolss_io_r_deleteprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_deleteprinter: unable to marshall SPOOL_R_DELETEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTER);
}
-
/********************************************************************
* api_spoolss_deleteprinterdriver
*
@@ -252,27 +191,7 @@ static bool api_spoolss_deleteprinter(pipes_struct *p)
static bool api_spoolss_deleteprinterdriver(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTERDRIVER q_u;
- SPOOL_R_DELETEPRINTERDRIVER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if (!spoolss_io_q_deleteprinterdriver("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinterdriver: unable to unmarshall SPOOL_Q_DELETEPRINTERDRIVER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinterdriver(p, &q_u, &r_u);
-
- if (!spoolss_io_r_deleteprinterdriver("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_deleteprinter: unable to marshall SPOOL_R_DELETEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDRIVER);
}
@@ -448,27 +367,7 @@ static bool api_spoolss_getprinterdriver2(pipes_struct *p)
static bool api_spoolss_startpageprinter(pipes_struct *p)
{
- SPOOL_Q_STARTPAGEPRINTER q_u;
- SPOOL_R_STARTPAGEPRINTER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_startpageprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_startpageprinter: unable to unmarshall SPOOL_Q_STARTPAGEPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_startpageprinter(p, &q_u, &r_u);
-
- if(!spoolss_io_r_startpageprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_startpageprinter: unable to marshall SPOOL_R_STARTPAGEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_STARTPAGEPRINTER);
}
/********************************************************************
@@ -479,27 +378,7 @@ static bool api_spoolss_startpageprinter(pipes_struct *p)
static bool api_spoolss_endpageprinter(pipes_struct *p)
{
- SPOOL_Q_ENDPAGEPRINTER q_u;
- SPOOL_R_ENDPAGEPRINTER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_endpageprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_endpageprinter: unable to unmarshall SPOOL_Q_ENDPAGEPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_endpageprinter(p, &q_u, &r_u);
-
- if(!spoolss_io_r_endpageprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_endpageprinter: unable to marshall SPOOL_R_ENDPAGEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_ENDPAGEPRINTER);
}
/********************************************************************
@@ -535,27 +414,7 @@ static bool api_spoolss_startdocprinter(pipes_struct *p)
static bool api_spoolss_enddocprinter(pipes_struct *p)
{
- SPOOL_Q_ENDDOCPRINTER q_u;
- SPOOL_R_ENDDOCPRINTER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_enddocprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_enddocprinter: unable to unmarshall SPOOL_Q_ENDDOCPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_enddocprinter(p, &q_u, &r_u);
-
- if(!spoolss_io_r_enddocprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_enddocprinter: unable to marshall SPOOL_R_ENDDOCPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_ENDDOCPRINTER);
}
/********************************************************************
@@ -563,27 +422,7 @@ static bool api_spoolss_enddocprinter(pipes_struct *p)
static bool api_spoolss_writeprinter(pipes_struct *p)
{
- SPOOL_Q_WRITEPRINTER q_u;
- SPOOL_R_WRITEPRINTER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_writeprinter("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_writeprinter: unable to unmarshall SPOOL_Q_WRITEPRINTER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_writeprinter(p, &q_u, &r_u);
-
- if(!spoolss_io_r_writeprinter("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_writeprinter: unable to marshall SPOOL_R_WRITEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_WRITEPRINTER);
}
/****************************************************************************
@@ -620,27 +459,7 @@ static bool api_spoolss_setprinter(pipes_struct *p)
static bool api_spoolss_fcpn(pipes_struct *p)
{
- SPOOL_Q_FCPN q_u;
- SPOOL_R_FCPN r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_fcpn("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_fcpn: unable to unmarshall SPOOL_Q_FCPN.\n"));
- return False;
- }
-
- r_u.status = _spoolss_fcpn(p, &q_u, &r_u);
-
- if(!spoolss_io_r_fcpn("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_fcpn: unable to marshall SPOOL_R_FCPN.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY);
}
/****************************************************************************
@@ -788,27 +607,7 @@ static bool api_spoolss_enumprinterdrivers(pipes_struct *p)
static bool api_spoolss_getform(pipes_struct *p)
{
- SPOOL_Q_GETFORM q_u;
- SPOOL_R_GETFORM r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if (!spoolss_io_q_getform("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_getform: unable to unmarshall SPOOL_Q_GETFORM.\n"));
- return False;
- }
-
- r_u.status = _spoolss_getform(p, &q_u, &r_u);
-
- if (!spoolss_io_r_getform("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_getform: unable to marshall SPOOL_R_GETFORM.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_GETFORM);
}
/****************************************************************************
@@ -1047,27 +846,7 @@ static bool api_spoolss_reset_printer(pipes_struct *p)
****************************************************************************/
static bool api_spoolss_addform(pipes_struct *p)
{
- SPOOL_Q_ADDFORM q_u;
- SPOOL_R_ADDFORM r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_addform("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_addform: unable to unmarshall SPOOL_Q_ADDFORM.\n"));
- return False;
- }
-
- r_u.status = _spoolss_addform(p, &q_u, &r_u);
-
- if(!spoolss_io_r_addform("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_addform: unable to marshall SPOOL_R_ADDFORM.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_ADDFORM);
}
/****************************************************************************
@@ -1075,27 +854,7 @@ static bool api_spoolss_addform(pipes_struct *p)
static bool api_spoolss_deleteform(pipes_struct *p)
{
- SPOOL_Q_DELETEFORM q_u;
- SPOOL_R_DELETEFORM r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_deleteform("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteform: unable to unmarshall SPOOL_Q_DELETEFORM.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteform(p, &q_u, &r_u);
-
- if(!spoolss_io_r_deleteform("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_deleteform: unable to marshall SPOOL_R_DELETEFORM.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEFORM);
}
/****************************************************************************
@@ -1103,27 +862,7 @@ static bool api_spoolss_deleteform(pipes_struct *p)
static bool api_spoolss_setform(pipes_struct *p)
{
- SPOOL_Q_SETFORM q_u;
- SPOOL_R_SETFORM r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_setform("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_setform: unable to unmarshall SPOOL_Q_SETFORM.\n"));
- return False;
- }
-
- r_u.status = _spoolss_setform(p, &q_u, &r_u);
-
- if(!spoolss_io_r_setform("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_setform: unable to marshall SPOOL_R_SETFORM.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_SETFORM);
}
/****************************************************************************
@@ -1420,27 +1159,7 @@ static bool api_spoolss_getprintprocessordirectory(pipes_struct *p)
static bool api_spoolss_deleteprinterdataex(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTERDATAEX q_u;
- SPOOL_R_DELETEPRINTERDATAEX r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_deleteprinterdataex("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinterdataex: unable to unmarshall SPOOL_Q_DELETEPRINTERDATAEX.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinterdataex(p, &q_u, &r_u);
-
- if(!spoolss_io_r_deleteprinterdataex("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_deleteprinterdataex: unable to marshall SPOOL_R_DELETEPRINTERDATAEX.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDATAEX);
}
/****************************************************************************
@@ -1448,27 +1167,7 @@ static bool api_spoolss_deleteprinterdataex(pipes_struct *p)
static bool api_spoolss_deleteprinterkey(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTERKEY q_u;
- SPOOL_R_DELETEPRINTERKEY r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_deleteprinterkey("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinterkey: unable to unmarshall SPOOL_Q_DELETEPRINTERKEY.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinterkey(p, &q_u, &r_u);
-
- if(!spoolss_io_r_deleteprinterkey("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_deleteprinterkey: unable to marshall SPOOL_R_DELETEPRINTERKEY.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERKEY);
}
/****************************************************************************
@@ -1513,27 +1212,7 @@ static bool api_spoolss_addprinterdriverex(pipes_struct *p)
static bool api_spoolss_deleteprinterdriverex(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTERDRIVEREX q_u;
- SPOOL_R_DELETEPRINTERDRIVEREX r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!spoolss_io_q_deleteprinterdriverex("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinterdriverex: unable to unmarshall SPOOL_Q_DELETEPRINTERDRIVEREX.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinterdriverex(p, &q_u, &r_u);
-
- if(!spoolss_io_r_deleteprinterdriverex("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_deleteprinterdriverex: unable to marshall SPOOL_R_DELETEPRINTERDRIVEREX.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDRIVEREX);
}
/****************************************************************************
@@ -1624,35 +1303,13 @@ static bool api_spoolss_xcvdataport(pipes_struct *p)
{"SPOOLSS_XCVDATAPORT", SPOOLSS_XCVDATAPORT, api_spoolss_xcvdataport },
};
-void spoolss_get_pipe_fns( struct api_struct **fns, int *n_fns )
+void spoolss2_get_pipe_fns( struct api_struct **fns, int *n_fns )
{
*fns = api_spoolss_cmds;
*n_fns = sizeof(api_spoolss_cmds) / sizeof(struct api_struct);
}
-static const char * const spoolss_endpoint_strings[] = {
- "ncacn_np:[\\pipe\\spoolss]",
-};
-
-static const struct ndr_interface_string_array spoolss_endpoints = {
- .count = 1,
- .names = spoolss_endpoint_strings
-};
-
-const struct ndr_interface_table ndr_table_spoolss = {
- .name = "spoolss",
- .syntax_id = {
- { 0x12345678, 0x1234, 0xabcd, { 0xef, 0x00 },
- { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab } }, 0x01
- },
- .helpstring = "Spooler SubSystem",
- .num_calls = 0x60,
- .calls = NULL, /* unused in s3 so far */
- .endpoints = &spoolss_endpoints,
- .authservices = NULL /* unused in s3 so far */
-};
-
-NTSTATUS rpc_spoolss_init(void)
+NTSTATUS rpc_spoolss2_init(void)
{
return rpc_srv_register(
SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss",
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index e61d343731..31ab2ca43d 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1913,13 +1913,14 @@ static WERROR _spoolss_enddocprinter_internal(pipes_struct *p, POLICY_HND *handl
return WERR_OK;
}
-/********************************************************************
- * api_spoolss_closeprinter
- ********************************************************************/
+/****************************************************************
+ _spoolss_ClosePrinter
+****************************************************************/
-WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R_CLOSEPRINTER *r_u)
+WERROR _spoolss_ClosePrinter(pipes_struct *p,
+ struct spoolss_ClosePrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
@@ -1934,27 +1935,25 @@ WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R
Previous code just copied the value of the closed
handle. --jerry */
- memset(&r_u->handle, '\0', sizeof(r_u->handle));
+ ZERO_STRUCTP(r->out.handle);
return WERR_OK;
}
-/********************************************************************
- * api_spoolss_deleteprinter
+/****************************************************************
+ _spoolss_DeletePrinter
+****************************************************************/
- ********************************************************************/
-
-WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL_R_DELETEPRINTER *r_u)
+WERROR _spoolss_DeletePrinter(pipes_struct *p,
+ struct spoolss_DeletePrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
WERROR result;
if (Printer && Printer->document_started)
_spoolss_enddocprinter_internal(p, handle); /* print job was not closed */
- memcpy(&r_u->handle, &q_u->handle, sizeof(r_u->handle));
-
result = delete_printer_handle(p, handle);
update_c_setprinter(False);
@@ -1991,14 +1990,15 @@ static int get_version_id (char * arch)
return -1;
}
-/********************************************************************
- * _spoolss_deleteprinterdriver
- ********************************************************************/
+/****************************************************************
+ _spoolss_DeletePrinterDriver
+****************************************************************/
-WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER *q_u, SPOOL_R_DELETEPRINTERDRIVER *r_u)
+WERROR _spoolss_DeletePrinterDriver(pipes_struct *p,
+ struct spoolss_DeletePrinterDriver *r)
{
- fstring driver;
- fstring arch;
+ char *driver;
+ char *arch;
NT_PRINTER_DRIVER_INFO_LEVEL info;
NT_PRINTER_DRIVER_INFO_LEVEL info_win2k;
int version;
@@ -2019,9 +2019,6 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
return WERR_ACCESS_DENIED;
}
- unistr2_to_ascii(driver, &q_u->driver, sizeof(driver));
- unistr2_to_ascii(arch, &q_u->arch, sizeof(arch));
-
/* check that we have a valid driver name first */
if ((version=get_version_id(arch)) == -1)
@@ -2030,6 +2027,9 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
ZERO_STRUCT(info);
ZERO_STRUCT(info_win2k);
+ driver = CONST_DISCARD(char *, r->in.driver);
+ arch = CONST_DISCARD(char *, r->in.architecture);
+
if (!W_ERROR_IS_OK(get_a_printer_driver(&info, 3, driver, arch, version)))
{
/* try for Win2k driver if "Windows NT x86" */
@@ -2087,18 +2087,19 @@ done:
return status;
}
-/********************************************************************
- * spoolss_deleteprinterdriverex
- ********************************************************************/
+/****************************************************************
+ _spoolss_DeletePrinterDriverEx
+****************************************************************/
-WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, SPOOL_R_DELETEPRINTERDRIVEREX *r_u)
+WERROR _spoolss_DeletePrinterDriverEx(pipes_struct *p,
+ struct spoolss_DeletePrinterDriverEx *r)
{
- fstring driver;
- fstring arch;
+ char *driver;
+ char *arch;
NT_PRINTER_DRIVER_INFO_LEVEL info;
NT_PRINTER_DRIVER_INFO_LEVEL info_win2k;
int version;
- uint32 flags = q_u->delete_flags;
+ uint32_t flags = r->in.delete_flags;
bool delete_files;
WERROR status;
WERROR status_win2k = WERR_ACCESS_DENIED;
@@ -2116,8 +2117,8 @@ WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIV
return WERR_ACCESS_DENIED;
}
- unistr2_to_ascii(driver, &q_u->driver, sizeof(driver));
- unistr2_to_ascii(arch, &q_u->arch, sizeof(arch));
+ driver = CONST_DISCARD(char *, r->in.driver);
+ arch = CONST_DISCARD(char *, r->in.architecture);
/* check that we have a valid driver name first */
if ((version=get_version_id(arch)) == -1) {
@@ -2126,7 +2127,7 @@ WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIV
}
if ( flags & DPD_DELETE_SPECIFIC_VERSION )
- version = q_u->version;
+ version = r->in.version;
ZERO_STRUCT(info);
ZERO_STRUCT(info_win2k);
@@ -4562,7 +4563,7 @@ static WERROR enum_all_printers_info_1_network(fstring name, RPC_BUFFER *buffer,
if (is_myname_or_ipaddr(s))
return WERR_CAN_NOT_COMPLETE;
- return enum_all_printers_info_1(PRINTER_ENUM_UNKNOWN_8, buffer, offered, needed, returned);
+ return enum_all_printers_info_1(PRINTER_ENUM_NAME, buffer, offered, needed, returned);
}
/********************************************************************
@@ -5780,17 +5781,21 @@ WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_
return WERR_UNKNOWN_LEVEL;
}
-/****************************************************************************
-****************************************************************************/
-WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, SPOOL_R_STARTPAGEPRINTER *r_u)
+/****************************************************************
+ _spoolss_StartPagePrinter
+****************************************************************/
+
+WERROR _spoolss_StartPagePrinter(pipes_struct *p,
+ struct spoolss_StartPagePrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
if (!Printer) {
- DEBUG(3,("Error in startpageprinter printer handle\n"));
+ DEBUG(3,("_spoolss_StartPagePrinter: "
+ "Error in startpageprinter printer handle\n"));
return WERR_BADFID;
}
@@ -5798,18 +5803,21 @@ WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u,
return WERR_OK;
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_EndPagePrinter
+****************************************************************/
-WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u)
+WERROR _spoolss_EndPagePrinter(pipes_struct *p,
+ struct spoolss_EndPagePrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
int snum;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
if (!Printer) {
- DEBUG(2,("_spoolss_endpageprinter: Invalid handle (%s:%u:%u).\n",OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_EndPagePrinter: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -5884,34 +5892,36 @@ WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, S
return WERR_OK;
}
-/********************************************************************
- * api_spoolss_getprinter
- * called from the spoolss dispatcher
- *
- ********************************************************************/
+/****************************************************************
+ _spoolss_EndDocPrinter
+****************************************************************/
-WERROR _spoolss_enddocprinter(pipes_struct *p, SPOOL_Q_ENDDOCPRINTER *q_u, SPOOL_R_ENDDOCPRINTER *r_u)
+WERROR _spoolss_EndDocPrinter(pipes_struct *p,
+ struct spoolss_EndDocPrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
return _spoolss_enddocprinter_internal(p, handle);
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_WritePrinter
+****************************************************************/
-WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R_WRITEPRINTER *r_u)
+WERROR _spoolss_WritePrinter(pipes_struct *p,
+ struct spoolss_WritePrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
- uint32 buffer_size = q_u->buffer_size;
- uint8 *buffer = q_u->buffer;
- uint32 *buffer_written = &q_u->buffer_size2;
+ POLICY_HND *handle = r->in.handle;
+ uint32 buffer_size = r->in._data_size;
+ uint8 *buffer = r->in.data.data;
+ uint32 *buffer_written = &r->in._data_size;
int snum;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
if (!Printer) {
- DEBUG(2,("_spoolss_writeprinter: Invalid handle (%s:%u:%u)\n",OUR_HANDLE(handle)));
- r_u->buffer_written = q_u->buffer_size2;
+ DEBUG(2,("_spoolss_WritePrinter: Invalid handle (%s:%u:%u)\n",
+ OUR_HANDLE(handle)));
+ *r->out.num_written = r->in._data_size;
return WERR_BADFID;
}
@@ -5921,14 +5931,14 @@ WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R
(*buffer_written) = (uint32)print_job_write(snum, Printer->jobid, (const char *)buffer,
(SMB_OFF_T)-1, (size_t)buffer_size);
if (*buffer_written == (uint32)-1) {
- r_u->buffer_written = 0;
+ *r->out.num_written = 0;
if (errno == ENOSPC)
return WERR_NO_SPOOL_SPACE;
else
return WERR_ACCESS_DENIED;
}
- r_u->buffer_written = q_u->buffer_size2;
+ *r->out.num_written = r->in._data_size;
return WERR_OK;
}
@@ -5978,21 +5988,24 @@ static WERROR control_printer(POLICY_HND *handle, uint32 command,
return errcode;
}
-/********************************************************************
- * api_spoolss_abortprinter
+
+/****************************************************************
+ _spoolss_AbortPrinter
* From MSDN: "Deletes printer's spool file if printer is configured
* for spooling"
- ********************************************************************/
+****************************************************************/
-WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R_ABORTPRINTER *r_u)
+WERROR _spoolss_AbortPrinter(pipes_struct *p,
+ struct spoolss_AbortPrinter *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
int snum;
WERROR errcode = WERR_OK;
if (!Printer) {
- DEBUG(2,("_spoolss_abortprinter: Invalid handle (%s:%u:%u)\n",OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_AbortPrinter: Invalid handle (%s:%u:%u)\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -6559,16 +6572,19 @@ WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SET
}
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_FindClosePrinterNotify
+****************************************************************/
-WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u)
+WERROR _spoolss_FindClosePrinterNotify(pipes_struct *p,
+ struct spoolss_FindClosePrinterNotify *r)
{
- POLICY_HND *handle = &q_u->handle;
+ POLICY_HND *handle = r->in.handle;
Printer_entry *Printer= find_printer_index_by_hnd(p, handle);
if (!Printer) {
- DEBUG(2,("_spoolss_fcpn: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_FindClosePrinterNotify: "
+ "Invalid handle (%s:%u:%u)\n", OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -7237,6 +7253,27 @@ static void fill_form_1(FORM_1 *form, nt_forms_struct *list)
/****************************************************************************
****************************************************************************/
+static WERROR fill_form_info_1(TALLOC_CTX *mem_ctx,
+ struct spoolss_FormInfo1 *form,
+ nt_forms_struct *list)
+{
+ form->form_name = talloc_strdup(mem_ctx, list->name);
+ W_ERROR_HAVE_NO_MEMORY(form->form_name);
+
+ form->flags = list->flag;
+ form->size.width = list->width;
+ form->size.height = list->length;
+ form->area.left = list->left;
+ form->area.top = list->top;
+ form->area.right = list->right;
+ form->area.bottom = list->bottom;
+
+ return WERR_OK;
+}
+
+/****************************************************************************
+****************************************************************************/
+
WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u)
{
uint32 level = q_u->level;
@@ -7346,41 +7383,35 @@ WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMF
}
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_GetForm
+****************************************************************/
-WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *r_u)
+WERROR _spoolss_GetForm(pipes_struct *p,
+ struct spoolss_GetForm *r)
{
- uint32 level = q_u->level;
- UNISTR2 *uni_formname = &q_u->formname;
- RPC_BUFFER *buffer = NULL;
- uint32 offered = q_u->offered;
- uint32 *needed = &r_u->needed;
+ uint32 level = r->in.level;
+ uint32 offered = r->in.offered;
+ uint32 *needed = r->out.needed;
nt_forms_struct *list=NULL;
nt_forms_struct builtin_form;
bool foundBuiltin;
- FORM_1 form_1;
- fstring form_name;
- int buffer_size=0;
+ union spoolss_FormInfo info;
+ struct spoolss_FormInfo1 form_1;
int numofforms=0, i=0;
/* that's an [in out] buffer */
- if (!q_u->buffer && (offered!=0)) {
+ if (!r->in.buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
- rpcbuf_move(q_u->buffer, &r_u->buffer);
- buffer = r_u->buffer;
-
- unistr2_to_ascii(form_name, uni_formname, sizeof(form_name));
-
- DEBUG(4,("_spoolss_getform\n"));
+ DEBUG(4,("_spoolss_GetForm\n"));
DEBUGADD(5,("Offered buffer size [%d]\n", offered));
DEBUGADD(5,("Info level [%d]\n", level));
- foundBuiltin = get_a_builtin_ntform(uni_formname,&builtin_form);
+ foundBuiltin = get_a_builtin_ntform_by_string(r->in.form_name, &builtin_form);
if (!foundBuiltin) {
numofforms = get_ntforms(&list);
DEBUGADD(5,("Number of forms [%d]\n", numofforms));
@@ -7392,17 +7423,19 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *
switch (level) {
case 1:
if (foundBuiltin) {
- fill_form_1(&form_1, &builtin_form);
+ fill_form_info_1(p->mem_ctx, &form_1, &builtin_form);
} else {
/* Check if the requested name is in the list of form structures */
for (i=0; i<numofforms; i++) {
- DEBUG(4,("_spoolss_getform: checking form %s (want %s)\n", list[i].name, form_name));
+ DEBUG(4,("_spoolss_GetForm: checking form %s (want %s)\n",
+ list[i].name, r->in.form_name));
- if (strequal(form_name, list[i].name)) {
- DEBUGADD(6,("Found form %s number [%d]\n", form_name, i));
- fill_form_1(&form_1, &list[i]);
+ if (strequal(r->in.form_name, list[i].name)) {
+ DEBUGADD(6,("Found form %s number [%d]\n",
+ r->in.form_name, i));
+ fill_form_info_1(p->mem_ctx, &form_1, &list[i]);
break;
}
}
@@ -7414,17 +7447,20 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *
}
/* check the required size. */
- *needed=spoolss_size_form_1(&form_1);
+ info.info1 = form_1;
- if (*needed > offered)
+ *needed = ndr_size_spoolss_FormInfo(&info, 1, NULL, 0);
+
+ if (*needed > offered) {
+ r->out.info = NULL;
return WERR_INSUFFICIENT_BUFFER;
+ }
- if (!rpcbuf_alloc_size(buffer, buffer_size))
- return WERR_NOMEM;
+ r->out.info->info1 = form_1;
/* fill the buffer with the form structures */
- DEBUGADD(6,("adding form %s [%d] to buffer\n", form_name, i));
- smb_io_form_1("", buffer, &form_1, 0);
+ DEBUGADD(6,("adding form %s [%d] to buffer\n",
+ r->in.form_name, i));
return WERR_OK;
@@ -7882,7 +7918,7 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u,
* server. Right now, we just need to send ourselves a message
* to update each printer bound to this driver. --jerry
*/
-
+
if (!srv_spoolss_drv_upgrade_printer(driver_name)) {
DEBUG(0,("_spoolss_addprinterdriver: Failed to send message about upgrading driver [%s]!\n",
driver_name));
@@ -8389,26 +8425,24 @@ WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R
return WERR_OK;
}
+/****************************************************************
+ _spoolss_DeletePrinterData
+****************************************************************/
-/****************************************************************************
-****************************************************************************/
-
-WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u)
+WERROR _spoolss_DeletePrinterData(pipes_struct *p,
+ struct spoolss_DeletePrinterData *r)
{
- POLICY_HND *handle = &q_u->handle;
- UNISTR2 *value = &q_u->valuename;
-
+ POLICY_HND *handle = r->in.handle;
NT_PRINTER_INFO_LEVEL *printer = NULL;
int snum=0;
WERROR status = WERR_OK;
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
- char *valuename = NULL;
- TALLOC_CTX *ctx = p->mem_ctx;
- DEBUG(5,("spoolss_deleteprinterdata\n"));
+ DEBUG(5,("_spoolss_DeletePrinterData\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_deleteprinterdata: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_DeletePrinterData: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -8416,7 +8450,8 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_
return WERR_BADFID;
if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
- DEBUG(3, ("_spoolss_deleteprinterdata: printer properties change denied by handle\n"));
+ DEBUG(3, ("_spoolss_DeletePrinterData: "
+ "printer properties change denied by handle\n"));
return WERR_ACCESS_DENIED;
}
@@ -8424,30 +8459,31 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_
if (!W_ERROR_IS_OK(status))
return status;
- valuename = unistr2_to_ascii_talloc(ctx, value);
- if (!valuename) {
+ if (!r->in.value_name) {
free_a_printer(&printer, 2);
return WERR_NOMEM;
}
- status = delete_printer_dataex( printer, SPOOL_PRINTERDATA_KEY, valuename );
+ status = delete_printer_dataex( printer, SPOOL_PRINTERDATA_KEY,
+ r->in.value_name );
if ( W_ERROR_IS_OK(status) )
mod_a_printer( printer, 2 );
free_a_printer(&printer, 2);
- TALLOC_FREE(valuename);
return status;
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_AddForm
+****************************************************************/
-WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u)
+WERROR _spoolss_AddForm(pipes_struct *p,
+ struct spoolss_AddForm *r)
{
- POLICY_HND *handle = &q_u->handle;
- FORM *form = &q_u->form;
+ POLICY_HND *handle = r->in.handle;
+ struct spoolss_AddFormInfo1 *form = r->in.info.info1;
nt_forms_struct tmpForm;
int snum;
WERROR status = WERR_OK;
@@ -8457,10 +8493,11 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
nt_forms_struct *list=NULL;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
- DEBUG(5,("spoolss_addform\n"));
+ DEBUG(5,("_spoolss_AddForm\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_addform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_AddForm: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -8485,7 +8522,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
/* can't add if builtin */
- if (get_a_builtin_ntform(&form->name,&tmpForm)) {
+ if (get_a_builtin_ntform_by_string(form->form_name, &tmpForm)) {
status = WERR_FILE_EXISTS;
goto done;
}
@@ -8514,13 +8551,15 @@ done:
return status;
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_DeleteForm
+****************************************************************/
-WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u)
+WERROR _spoolss_DeleteForm(pipes_struct *p,
+ struct spoolss_DeleteForm *r)
{
- POLICY_HND *handle = &q_u->handle;
- UNISTR2 *form_name = &q_u->name;
+ POLICY_HND *handle = r->in.handle;
+ const char *form_name = r->in.form_name;
nt_forms_struct tmpForm;
int count=0;
nt_forms_struct *list=NULL;
@@ -8529,10 +8568,11 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
WERROR status = WERR_OK;
NT_PRINTER_INFO_LEVEL *printer = NULL;
- DEBUG(5,("spoolss_deleteform\n"));
+ DEBUG(5,("_spoolss_DeleteForm\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_deleteform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_DeleteForm: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -8549,14 +8589,14 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
}
if ( !(Printer->access_granted & (PRINTER_ACCESS_ADMINISTER|SERVER_ACCESS_ADMINISTER)) ) {
- DEBUG(2,("_spoolss_deleteform: denied by handle permissions.\n"));
+ DEBUG(2,("_spoolss_DeleteForm: denied by handle permissions.\n"));
status = WERR_ACCESS_DENIED;
goto done;
}
/* can't delete if builtin */
- if (get_a_builtin_ntform(form_name,&tmpForm)) {
+ if (get_a_builtin_ntform_by_string(form_name,&tmpForm)) {
status = WERR_INVALID_PARAM;
goto done;
}
@@ -8581,13 +8621,15 @@ done:
return status;
}
-/****************************************************************************
-****************************************************************************/
+/****************************************************************
+ _spoolss_SetForm
+****************************************************************/
-WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u)
+WERROR _spoolss_SetForm(pipes_struct *p,
+ struct spoolss_SetForm *r)
{
- POLICY_HND *handle = &q_u->handle;
- FORM *form = &q_u->form;
+ POLICY_HND *handle = r->in.handle;
+ struct spoolss_AddFormInfo1 *form = r->in.info.info1;
nt_forms_struct tmpForm;
int snum;
WERROR status = WERR_OK;
@@ -8597,10 +8639,11 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
nt_forms_struct *list=NULL;
Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
- DEBUG(5,("spoolss_setform\n"));
+ DEBUG(5,("_spoolss_SetForm\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_setform: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_SetForm: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -8617,13 +8660,13 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
}
if ( !(Printer->access_granted & (PRINTER_ACCESS_ADMINISTER|SERVER_ACCESS_ADMINISTER)) ) {
- DEBUG(2,("_spoolss_setform: denied by handle permissions\n"));
+ DEBUG(2,("_spoolss_SetForm: denied by handle permissions\n"));
status = WERR_ACCESS_DENIED;
goto done;
}
/* can't set if builtin */
- if (get_a_builtin_ntform(&form->name,&tmpForm)) {
+ if (get_a_builtin_ntform_by_string(form->form_name, &tmpForm)) {
status = WERR_INVALID_PARAM;
goto done;
}
@@ -9325,29 +9368,24 @@ WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u,
return status;
}
+/****************************************************************
+ _spoolss_DeletePrinterDataEx
+****************************************************************/
-/********************************************************************
- * spoolss_deleteprinterdataex
- ********************************************************************/
-
-WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX *q_u, SPOOL_R_DELETEPRINTERDATAEX *r_u)
+WERROR _spoolss_DeletePrinterDataEx(pipes_struct *p,
+ struct spoolss_DeletePrinterDataEx *r)
{
- POLICY_HND *handle = &q_u->handle;
- UNISTR2 *value = &q_u->valuename;
- UNISTR2 *key = &q_u->keyname;
-
+ POLICY_HND *handle = r->in.handle;
NT_PRINTER_INFO_LEVEL *printer = NULL;
int snum=0;
WERROR status = WERR_OK;
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
- char *valuename = NULL;
- char *keyname = NULL;
- TALLOC_CTX *ctx = p->mem_ctx;
- DEBUG(5,("spoolss_deleteprinterdataex\n"));
+ DEBUG(5,("_spoolss_DeletePrinterDataEx\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_deleteprinterdata: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_DeletePrinterDataEx: "
+ "Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
return WERR_BADFID;
}
@@ -9355,13 +9393,12 @@ WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX
return WERR_BADFID;
if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
- DEBUG(3, ("_spoolss_deleteprinterdataex: printer properties change denied by handle\n"));
+ DEBUG(3, ("_spoolss_DeletePrinterDataEx: "
+ "printer properties change denied by handle\n"));
return WERR_ACCESS_DENIED;
}
- valuename = unistr2_to_ascii_talloc(ctx, value);
- keyname = unistr2_to_ascii_talloc(ctx, key);
- if (!valuename || !keyname) {
+ if (!r->in.value_name || !r->in.key_name) {
return WERR_NOMEM;
}
@@ -9369,7 +9406,7 @@ WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX
if (!W_ERROR_IS_OK(status))
return status;
- status = delete_printer_dataex( printer, keyname, valuename );
+ status = delete_printer_dataex( printer, r->in.key_name, r->in.value_name );
if ( W_ERROR_IS_OK(status) )
mod_a_printer( printer, 2 );
@@ -9451,36 +9488,38 @@ done:
return status;
}
-/********************************************************************
- * spoolss_deleteprinterkey
- ********************************************************************/
+/****************************************************************
+ _spoolss_DeletePrinterKey
+****************************************************************/
-WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u, SPOOL_R_DELETEPRINTERKEY *r_u)
+WERROR _spoolss_DeletePrinterKey(pipes_struct *p,
+ struct spoolss_DeletePrinterKey *r)
{
- POLICY_HND *handle = &q_u->handle;
- Printer_entry *Printer = find_printer_index_by_hnd(p, &q_u->handle);
- fstring key;
+ POLICY_HND *handle = r->in.handle;
+ Printer_entry *Printer = find_printer_index_by_hnd(p, handle);
NT_PRINTER_INFO_LEVEL *printer = NULL;
int snum=0;
WERROR status;
- DEBUG(5,("spoolss_deleteprinterkey\n"));
+ DEBUG(5,("_spoolss_DeletePrinterKey\n"));
if (!Printer) {
- DEBUG(2,("_spoolss_deleteprinterkey: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
+ DEBUG(2,("_spoolss_DeletePrinterKey: Invalid handle (%s:%u:%u).\n",
+ OUR_HANDLE(handle)));
return WERR_BADFID;
}
/* if keyname == NULL, return error */
- if ( !q_u->keyname.buffer )
+ if ( !r->in.key_name )
return WERR_INVALID_PARAM;
if (!get_printer_snum(p, handle, &snum, NULL))
return WERR_BADFID;
if (Printer->access_granted != PRINTER_ACCESS_ADMINISTER) {
- DEBUG(3, ("_spoolss_deleteprinterkey: printer properties change denied by handle\n"));
+ DEBUG(3, ("_spoolss_DeletePrinterKey: "
+ "printer properties change denied by handle\n"));
return WERR_ACCESS_DENIED;
}
@@ -9490,9 +9529,7 @@ WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u,
/* delete the key and all subneys */
- unistr2_to_ascii(key, &q_u->keyname, sizeof(key));
-
- status = delete_all_printer_data( printer->info_2, key );
+ status = delete_all_printer_data( printer->info_2, r->in.key_name );
if ( W_ERROR_IS_OK(status) )
status = mod_a_printer(printer, 2);
@@ -9941,3 +9978,872 @@ WERROR _spoolss_xcvdataport(pipes_struct *p, SPOOL_Q_XCVDATAPORT *q_u, SPOOL_R_X
return WERR_INVALID_PRINT_MONITOR;
}
+/****************************************************************
+ _spoolss_EnumPrinters
+****************************************************************/
+
+WERROR _spoolss_EnumPrinters(pipes_struct *p,
+ struct spoolss_EnumPrinters *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_OpenPrinter
+****************************************************************/
+
+WERROR _spoolss_OpenPrinter(pipes_struct *p,
+ struct spoolss_OpenPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_SetJob
+****************************************************************/
+
+WERROR _spoolss_SetJob(pipes_struct *p,
+ struct spoolss_SetJob *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_GetJob
+****************************************************************/
+
+WERROR _spoolss_GetJob(pipes_struct *p,
+ struct spoolss_GetJob *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumJobs
+****************************************************************/
+
+WERROR _spoolss_EnumJobs(pipes_struct *p,
+ struct spoolss_EnumJobs *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPrinter
+****************************************************************/
+
+WERROR _spoolss_AddPrinter(pipes_struct *p,
+ struct spoolss_AddPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_SetPrinter
+****************************************************************/
+
+WERROR _spoolss_SetPrinter(pipes_struct *p,
+ struct spoolss_SetPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_GetPrinter
+****************************************************************/
+
+WERROR _spoolss_GetPrinter(pipes_struct *p,
+ struct spoolss_GetPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPrinterDriver
+****************************************************************/
+
+WERROR _spoolss_AddPrinterDriver(pipes_struct *p,
+ struct spoolss_AddPrinterDriver *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumPrinterDrivers
+****************************************************************/
+
+WERROR _spoolss_EnumPrinterDrivers(pipes_struct *p,
+ struct spoolss_EnumPrinterDrivers *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_GetPrinterDriver
+****************************************************************/
+
+WERROR _spoolss_GetPrinterDriver(pipes_struct *p,
+ struct spoolss_GetPrinterDriver *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_GetPrinterDriverDirectory
+****************************************************************/
+
+WERROR _spoolss_GetPrinterDriverDirectory(pipes_struct *p,
+ struct spoolss_GetPrinterDriverDirectory *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPrintProcessor
+****************************************************************/
+
+WERROR _spoolss_AddPrintProcessor(pipes_struct *p,
+ struct spoolss_AddPrintProcessor *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumPrintProcessors
+****************************************************************/
+
+WERROR _spoolss_EnumPrintProcessors(pipes_struct *p,
+ struct spoolss_EnumPrintProcessors *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_GetPrintProcessorDirectory
+****************************************************************/
+
+WERROR _spoolss_GetPrintProcessorDirectory(pipes_struct *p,
+ struct spoolss_GetPrintProcessorDirectory *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_StartDocPrinter
+****************************************************************/
+
+WERROR _spoolss_StartDocPrinter(pipes_struct *p,
+ struct spoolss_StartDocPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_ReadPrinter
+****************************************************************/
+
+WERROR _spoolss_ReadPrinter(pipes_struct *p,
+ struct spoolss_ReadPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddJob
+****************************************************************/
+
+WERROR _spoolss_AddJob(pipes_struct *p,
+ struct spoolss_AddJob *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_ScheduleJob
+****************************************************************/
+
+WERROR _spoolss_ScheduleJob(pipes_struct *p,
+ struct spoolss_ScheduleJob *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_GetPrinterData
+****************************************************************/
+
+WERROR _spoolss_GetPrinterData(pipes_struct *p,
+ struct spoolss_GetPrinterData *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_SetPrinterData
+****************************************************************/
+
+WERROR _spoolss_SetPrinterData(pipes_struct *p,
+ struct spoolss_SetPrinterData *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_WaitForPrinterChange
+****************************************************************/
+
+WERROR _spoolss_WaitForPrinterChange(pipes_struct *p,
+ struct spoolss_WaitForPrinterChange *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumForms
+****************************************************************/
+
+WERROR _spoolss_EnumForms(pipes_struct *p,
+ struct spoolss_EnumForms *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumPorts
+****************************************************************/
+
+WERROR _spoolss_EnumPorts(pipes_struct *p,
+ struct spoolss_EnumPorts *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumMonitors
+****************************************************************/
+
+WERROR _spoolss_EnumMonitors(pipes_struct *p,
+ struct spoolss_EnumMonitors *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPort
+****************************************************************/
+
+WERROR _spoolss_AddPort(pipes_struct *p,
+ struct spoolss_AddPort *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_ConfigurePort
+****************************************************************/
+
+WERROR _spoolss_ConfigurePort(pipes_struct *p,
+ struct spoolss_ConfigurePort *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_DeletePort
+****************************************************************/
+
+WERROR _spoolss_DeletePort(pipes_struct *p,
+ struct spoolss_DeletePort *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_CreatePrinterIC
+****************************************************************/
+
+WERROR _spoolss_CreatePrinterIC(pipes_struct *p,
+ struct spoolss_CreatePrinterIC *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_PlayGDIScriptOnPrinterIC
+****************************************************************/
+
+WERROR _spoolss_PlayGDIScriptOnPrinterIC(pipes_struct *p,
+ struct spoolss_PlayGDIScriptOnPrinterIC *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_DeletePrinterIC
+****************************************************************/
+
+WERROR _spoolss_DeletePrinterIC(pipes_struct *p,
+ struct spoolss_DeletePrinterIC *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPrinterConnection
+****************************************************************/
+
+WERROR _spoolss_AddPrinterConnection(pipes_struct *p,
+ struct spoolss_AddPrinterConnection *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_DeletePrinterConnection
+****************************************************************/
+
+WERROR _spoolss_DeletePrinterConnection(pipes_struct *p,
+ struct spoolss_DeletePrinterConnection *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_PrinterMessageBox
+****************************************************************/
+
+WERROR _spoolss_PrinterMessageBox(pipes_struct *p,
+ struct spoolss_PrinterMessageBox *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddMonitor
+****************************************************************/
+
+WERROR _spoolss_AddMonitor(pipes_struct *p,
+ struct spoolss_AddMonitor *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_DeleteMonitor
+****************************************************************/
+
+WERROR _spoolss_DeleteMonitor(pipes_struct *p,
+ struct spoolss_DeleteMonitor *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_DeletePrintProcessor
+****************************************************************/
+
+WERROR _spoolss_DeletePrintProcessor(pipes_struct *p,
+ struct spoolss_DeletePrintProcessor *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPrintProvidor
+****************************************************************/
+
+WERROR _spoolss_AddPrintProvidor(pipes_struct *p,
+ struct spoolss_AddPrintProvidor *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_DeletePrintProvidor
+****************************************************************/
+
+WERROR _spoolss_DeletePrintProvidor(pipes_struct *p,
+ struct spoolss_DeletePrintProvidor *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumPrintProcDataTypes
+****************************************************************/
+
+WERROR _spoolss_EnumPrintProcDataTypes(pipes_struct *p,
+ struct spoolss_EnumPrintProcDataTypes *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_ResetPrinter
+****************************************************************/
+
+WERROR _spoolss_ResetPrinter(pipes_struct *p,
+ struct spoolss_ResetPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_GetPrinterDriver2
+****************************************************************/
+
+WERROR _spoolss_GetPrinterDriver2(pipes_struct *p,
+ struct spoolss_GetPrinterDriver2 *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_FindFirstPrinterChangeNotification
+****************************************************************/
+
+WERROR _spoolss_FindFirstPrinterChangeNotification(pipes_struct *p,
+ struct spoolss_FindFirstPrinterChangeNotification *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_FindNextPrinterChangeNotification
+****************************************************************/
+
+WERROR _spoolss_FindNextPrinterChangeNotification(pipes_struct *p,
+ struct spoolss_FindNextPrinterChangeNotification *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_RouterFindFirstPrinterChangeNotificationOld
+****************************************************************/
+
+WERROR _spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct *p,
+ struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_ReplyOpenPrinter
+****************************************************************/
+
+WERROR _spoolss_ReplyOpenPrinter(pipes_struct *p,
+ struct spoolss_ReplyOpenPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_RouterReplyPrinter
+****************************************************************/
+
+WERROR _spoolss_RouterReplyPrinter(pipes_struct *p,
+ struct spoolss_RouterReplyPrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_ReplyClosePrinter
+****************************************************************/
+
+WERROR _spoolss_ReplyClosePrinter(pipes_struct *p,
+ struct spoolss_ReplyClosePrinter *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPortEx
+****************************************************************/
+
+WERROR _spoolss_AddPortEx(pipes_struct *p,
+ struct spoolss_AddPortEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_RouterFindFirstPrinterChangeNotification
+****************************************************************/
+
+WERROR _spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p,
+ struct spoolss_RouterFindFirstPrinterChangeNotification *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_SpoolerInit
+****************************************************************/
+
+WERROR _spoolss_SpoolerInit(pipes_struct *p,
+ struct spoolss_SpoolerInit *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_ResetPrinterEx
+****************************************************************/
+
+WERROR _spoolss_ResetPrinterEx(pipes_struct *p,
+ struct spoolss_ResetPrinterEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_RemoteFindFirstPrinterChangeNotifyEx
+****************************************************************/
+
+WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p,
+ struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_RouterRefreshPrinterChangeNotification
+****************************************************************/
+
+WERROR _spoolss_RouterRefreshPrinterChangeNotification(pipes_struct *p,
+ struct spoolss_RouterRefreshPrinterChangeNotification *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_RemoteFindNextPrinterChangeNotifyEx
+****************************************************************/
+
+WERROR _spoolss_RemoteFindNextPrinterChangeNotifyEx(pipes_struct *p,
+ struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_44
+****************************************************************/
+
+WERROR _spoolss_44(pipes_struct *p,
+ struct spoolss_44 *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_OpenPrinterEx
+****************************************************************/
+
+WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
+ struct spoolss_OpenPrinterEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPrinterEx
+****************************************************************/
+
+WERROR _spoolss_AddPrinterEx(pipes_struct *p,
+ struct spoolss_AddPrinterEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_47
+****************************************************************/
+
+WERROR _spoolss_47(pipes_struct *p,
+ struct spoolss_47 *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumPrinterData
+****************************************************************/
+
+WERROR _spoolss_EnumPrinterData(pipes_struct *p,
+ struct spoolss_EnumPrinterData *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_4a
+****************************************************************/
+
+WERROR _spoolss_4a(pipes_struct *p,
+ struct spoolss_4a *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_4b
+****************************************************************/
+
+WERROR _spoolss_4b(pipes_struct *p,
+ struct spoolss_4b *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_4c
+****************************************************************/
+
+WERROR _spoolss_4c(pipes_struct *p,
+ struct spoolss_4c *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_SetPrinterDataEx
+****************************************************************/
+
+WERROR _spoolss_SetPrinterDataEx(pipes_struct *p,
+ struct spoolss_SetPrinterDataEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_GetPrinterDataEx
+****************************************************************/
+
+WERROR _spoolss_GetPrinterDataEx(pipes_struct *p,
+ struct spoolss_GetPrinterDataEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumPrinterDataEx
+****************************************************************/
+
+WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
+ struct spoolss_EnumPrinterDataEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_EnumPrinterKey
+****************************************************************/
+
+WERROR _spoolss_EnumPrinterKey(pipes_struct *p,
+ struct spoolss_EnumPrinterKey *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_53
+****************************************************************/
+
+WERROR _spoolss_53(pipes_struct *p,
+ struct spoolss_53 *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_55
+****************************************************************/
+
+WERROR _spoolss_55(pipes_struct *p,
+ struct spoolss_55 *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_56
+****************************************************************/
+
+WERROR _spoolss_56(pipes_struct *p,
+ struct spoolss_56 *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_57
+****************************************************************/
+
+WERROR _spoolss_57(pipes_struct *p,
+ struct spoolss_57 *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_XcvData
+****************************************************************/
+
+WERROR _spoolss_XcvData(pipes_struct *p,
+ struct spoolss_XcvData *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_AddPrinterDriverEx
+****************************************************************/
+
+WERROR _spoolss_AddPrinterDriverEx(pipes_struct *p,
+ struct spoolss_AddPrinterDriverEx *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_5a
+****************************************************************/
+
+WERROR _spoolss_5a(pipes_struct *p,
+ struct spoolss_5a *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_5b
+****************************************************************/
+
+WERROR _spoolss_5b(pipes_struct *p,
+ struct spoolss_5b *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_5c
+****************************************************************/
+
+WERROR _spoolss_5c(pipes_struct *p,
+ struct spoolss_5c *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_5d
+****************************************************************/
+
+WERROR _spoolss_5d(pipes_struct *p,
+ struct spoolss_5d *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_5e
+****************************************************************/
+
+WERROR _spoolss_5e(pipes_struct *p,
+ struct spoolss_5e *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_5f
+****************************************************************/
+
+WERROR _spoolss_5f(pipes_struct *p,
+ struct spoolss_5f *r)
+{
+ p->rng_fault_state = true;
+ return WERR_NOT_SUPPORTED;
+}
+
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 073f92d45c..056236f22d 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2328,6 +2328,8 @@ WERROR _srvsvc_NetDiskEnum(pipes_struct *p,
/*allow one struct srvsvc_NetDiskInfo0 for null terminator*/
+ r->out.info->count = 0;
+
for(i = 0; i < MAX_SERVER_DISK_ENTRIES -1 && (disk_name = next_server_disk_enum(&resume)); i++) {
r->out.info->count++;
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index ecd0f36217..4b35f57900 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -6,17 +6,17 @@
Copyright (C) Tim Potter 2000
Copyright (C) Andrew Tridgell 1992-1999
Copyright (C) Luke Kenneth Casson Leighton 1996-1999
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,11 +29,11 @@ struct table_node {
const char *short_archi;
int version;
};
-
+
/* The version int is used by getdrivers. Note that
all architecture strings that support mutliple
versions must be grouped together since enumdrivers
- uses this property to prevent issuing multiple
+ uses this property to prevent issuing multiple
enumdriver calls for the same arch */
@@ -92,7 +92,7 @@ static const char *cmd_spoolss_get_short_archi(const char *long_archi)
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_open_printer_ex(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_open_printer_ex(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -100,12 +100,12 @@ static WERROR cmd_spoolss_open_printer_ex(struct rpc_pipe_client *cli,
fstring printername;
fstring servername, user;
POLICY_HND hnd;
-
+
if (argc != 2) {
printf("Usage: %s <printername>\n", argv[0]);
return WERR_OK;
}
-
+
if (!cli)
return WERR_GENERAL_FAILURE;
@@ -116,16 +116,16 @@ static WERROR cmd_spoolss_open_printer_ex(struct rpc_pipe_client *cli,
/* Open the printer handle */
- werror = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
- "", PRINTER_ALL_ACCESS,
+ werror = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
+ "", PRINTER_ALL_ACCESS,
servername, user, &hnd);
if (W_ERROR_IS_OK(werror)) {
printf("Printer %s opened successfully\n", printername);
- werror = rpccli_spoolss_close_printer(cli, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &hnd, &werror);
if (!W_ERROR_IS_OK(werror)) {
- printf("Error closing printer handle! (%s)\n",
+ printf("Error closing printer handle! (%s)\n",
get_dos_error_msg(werror));
}
}
@@ -148,23 +148,23 @@ static void display_print_info_0(PRINTER_INFO_0 *i0)
rpcstr_pull(name, i0->printername.buffer, sizeof(name), -1, STR_TERMINATE);
rpcstr_pull(servername, i0->servername.buffer, sizeof(servername), -1,STR_TERMINATE);
-
+
printf("\tprintername:[%s]\n", name);
printf("\tservername:[%s]\n", servername);
printf("\tcjobs:[0x%x]\n", i0->cjobs);
printf("\ttotal_jobs:[0x%x]\n", i0->total_jobs);
-
- printf("\t:date: [%d]-[%d]-[%d] (%d)\n", i0->year, i0->month,
+
+ printf("\t:date: [%d]-[%d]-[%d] (%d)\n", i0->year, i0->month,
i0->day, i0->dayofweek);
- printf("\t:time: [%d]-[%d]-[%d]-[%d]\n", i0->hour, i0->minute,
+ printf("\t:time: [%d]-[%d]-[%d]-[%d]\n", i0->hour, i0->minute,
i0->second, i0->milliseconds);
-
+
printf("\tglobal_counter:[0x%x]\n", i0->global_counter);
printf("\ttotal_pages:[0x%x]\n", i0->total_pages);
-
+
printf("\tmajorversion:[0x%x]\n", i0->major_version);
printf("\tbuildversion:[0x%x]\n", i0->build_version);
-
+
printf("\tunknown7:[0x%x]\n", i0->unknown7);
printf("\tunknown8:[0x%x]\n", i0->unknown8);
printf("\tunknown9:[0x%x]\n", i0->unknown9);
@@ -231,7 +231,7 @@ static void display_print_info_2(PRINTER_INFO_2 *i2)
fstring printprocessor = "";
fstring datatype = "";
fstring parameters = "";
-
+
rpcstr_pull(servername, i2->servername.buffer,sizeof(servername), -1, STR_TERMINATE);
rpcstr_pull(printername, i2->printername.buffer,sizeof(printername), -1, STR_TERMINATE);
rpcstr_pull(sharename, i2->sharename.buffer,sizeof(sharename), -1, STR_TERMINATE);
@@ -264,7 +264,7 @@ static void display_print_info_2(PRINTER_INFO_2 *i2)
printf("\tcjobs:[0x%x]\n", i2->cjobs);
printf("\taverageppm:[0x%x]\n", i2->averageppm);
- if (i2->secdesc)
+ if (i2->secdesc)
display_sec_desc(i2->secdesc);
printf("\n");
@@ -295,7 +295,7 @@ static void display_print_info_7(PRINTER_INFO_7 *i7)
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_enum_printers(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_enum_printers(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -305,7 +305,7 @@ static WERROR cmd_spoolss_enum_printers(struct rpc_pipe_client *cli,
uint32 i = 0, num_printers;
fstring name;
- if (argc > 3)
+ if (argc > 3)
{
printf("Usage: %s [level] [name]\n", argv[0]);
return WERR_OK;
@@ -323,7 +323,7 @@ static WERROR cmd_spoolss_enum_printers(struct rpc_pipe_client *cli,
ZERO_STRUCT(ctr);
- result = rpccli_spoolss_enum_printers(cli, mem_ctx, name, PRINTER_ENUM_LOCAL,
+ result = rpccli_spoolss_enum_printers(cli, mem_ctx, name, PRINTER_ENUM_LOCAL,
info_level, &num_printers, &ctr);
if (W_ERROR_IS_OK(result)) {
@@ -332,7 +332,7 @@ static WERROR cmd_spoolss_enum_printers(struct rpc_pipe_client *cli,
printf ("No printers returned.\n");
goto done;
}
-
+
for (i = 0; i < num_printers; i++) {
switch(info_level) {
case 0:
@@ -364,7 +364,7 @@ static WERROR cmd_spoolss_enum_printers(struct rpc_pipe_client *cli,
static void display_port_info_1(PORT_INFO_1 *i1)
{
fstring buffer;
-
+
rpcstr_pull(buffer, i1->port_name.buffer, sizeof(buffer), -1, STR_TERMINATE);
printf("\tPort Name:\t[%s]\n", buffer);
}
@@ -375,7 +375,7 @@ static void display_port_info_1(PORT_INFO_1 *i1)
static void display_port_info_2(PORT_INFO_2 *i2)
{
fstring buffer;
-
+
rpcstr_pull(buffer, i2->port_name.buffer, sizeof(buffer), -1, STR_TERMINATE);
printf("\tPort Name:\t[%s]\n", buffer);
rpcstr_pull(buffer, i2->monitor_name.buffer, sizeof(buffer), -1, STR_TERMINATE);
@@ -416,20 +416,20 @@ static void display_port_info_2(PORT_INFO_2 *i2)
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_enum_ports(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_enum_ports(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
WERROR result;
uint32 info_level = 1;
PORT_INFO_CTR ctr;
uint32 returned;
-
+
if (argc > 2) {
printf("Usage: %s [level]\n", argv[0]);
return WERR_OK;
}
-
+
if (argc == 2)
info_level = atoi(argv[1]);
@@ -456,7 +456,7 @@ static WERROR cmd_spoolss_enum_ports(struct rpc_pipe_client *cli,
}
}
}
-
+
return result;
}
@@ -494,10 +494,10 @@ static WERROR cmd_spoolss_setprinter(struct rpc_pipe_client *cli,
fstrcpy(user, cli->auth->user_name);
/* get a printer handle */
- result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
+ result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
PRINTER_ALL_ACCESS, servername,
user, &pol);
-
+
if (!W_ERROR_IS_OK(result))
goto done;
@@ -521,7 +521,7 @@ static WERROR cmd_spoolss_setprinter(struct rpc_pipe_client *cli,
done:
if (opened_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
return result;
}
@@ -560,10 +560,10 @@ static WERROR cmd_spoolss_setprintername(struct rpc_pipe_client *cli,
fstrcpy(user, cli->auth->user_name);
/* get a printer handle */
- result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
+ result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
PRINTER_ALL_ACCESS, servername,
user, &pol);
-
+
if (!W_ERROR_IS_OK(result))
goto done;
@@ -586,7 +586,7 @@ static WERROR cmd_spoolss_setprintername(struct rpc_pipe_client *cli,
done:
if (opened_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
return result;
}
@@ -621,16 +621,16 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli,
strupper_m(servername);
slprintf(printername, sizeof(printername)-1, "%s\\%s", servername, argv[1]);
fstrcpy(user, cli->auth->user_name);
-
+
/* get a printer handle */
- result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
- "", MAXIMUM_ALLOWED_ACCESS,
+ result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
+ "", MAXIMUM_ALLOWED_ACCESS,
servername, user, &pol);
if (!W_ERROR_IS_OK(result))
goto done;
-
+
opened_hnd = True;
/* Get printer info */
@@ -643,7 +643,7 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli,
/* Display printer info */
switch (info_level) {
- case 0:
+ case 0:
display_print_info_0(ctr.printers_0);
break;
case 1:
@@ -663,9 +663,9 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli,
break;
}
- done:
- if (opened_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+ done:
+ if (opened_hnd)
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
return result;
}
@@ -728,7 +728,7 @@ static void display_reg_value(REGISTRY_VALUE value)
default:
printf("%s: unknown type %d\n", value.valuename, value.type);
}
-
+
}
/****************************************************************************
@@ -761,19 +761,19 @@ static WERROR cmd_spoolss_getprinterdata(struct rpc_pipe_client *cli,
if (strncmp(argv[1], ".", sizeof(".")) == 0)
fstrcpy(printername, servername);
else
- slprintf(printername, sizeof(servername)-1, "%s\\%s",
+ slprintf(printername, sizeof(servername)-1, "%s\\%s",
servername, argv[1]);
fstrcpy(user, cli->auth->user_name);
-
+
/* get a printer handle */
- result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
- "", MAXIMUM_ALLOWED_ACCESS,
+ result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
+ "", MAXIMUM_ALLOWED_ACCESS,
servername, user, &pol);
if (!W_ERROR_IS_OK(result))
goto done;
-
+
opened_hnd = True;
/* Get printer info */
@@ -787,11 +787,11 @@ static WERROR cmd_spoolss_getprinterdata(struct rpc_pipe_client *cli,
fstrcpy(value.valuename, valuename);
display_reg_value(value);
-
- done:
- if (opened_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+
+ done:
+ if (opened_hnd)
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
return result;
}
@@ -813,7 +813,7 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli,
REGISTRY_VALUE value;
if (argc != 4) {
- printf("Usage: %s <printername> <keyname> <valuename>\n",
+ printf("Usage: %s <printername> <keyname> <valuename>\n",
argv[0]);
printf("<printername> of . queries print server\n");
return WERR_OK;
@@ -828,24 +828,24 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli,
if (strncmp(argv[1], ".", sizeof(".")) == 0)
fstrcpy(printername, servername);
else
- slprintf(printername, sizeof(printername)-1, "%s\\%s",
+ slprintf(printername, sizeof(printername)-1, "%s\\%s",
servername, argv[1]);
fstrcpy(user, cli->auth->user_name);
-
+
/* get a printer handle */
- result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
- "", MAXIMUM_ALLOWED_ACCESS,
+ result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
+ "", MAXIMUM_ALLOWED_ACCESS,
servername, user, &pol);
if (!W_ERROR_IS_OK(result))
goto done;
-
+
opened_hnd = True;
/* Get printer info */
- result = rpccli_spoolss_getprinterdataex(cli, mem_ctx, &pol, keyname,
+ result = rpccli_spoolss_getprinterdataex(cli, mem_ctx, &pol, keyname,
valuename, &value);
if (!W_ERROR_IS_OK(result))
@@ -855,11 +855,11 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli,
fstrcpy(value.valuename, valuename);
display_reg_value(value);
-
- done:
- if (opened_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+
+ done:
+ if (opened_hnd)
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
return result;
}
@@ -877,7 +877,7 @@ static void display_print_driver_1(DRIVER_INFO_1 *i1)
printf ("Printer Driver Info 1:\n");
printf ("\tDriver Name: [%s]\n\n", name);
-
+
return;
}
@@ -925,10 +925,10 @@ static void display_print_driver_3(DRIVER_INFO_3 *i1)
fstring dependentfiles = "";
fstring monitorname = "";
fstring defaultdatatype = "";
-
+
int length=0;
bool valid = True;
-
+
if (i1 == NULL)
return;
@@ -953,9 +953,9 @@ static void display_print_driver_3(DRIVER_INFO_3 *i1)
while (valid)
{
rpcstr_pull(dependentfiles, i1->dependentfiles+length, sizeof(dependentfiles), -1, STR_TERMINATE);
-
+
length+=strlen(dependentfiles)+1;
-
+
if (strlen(dependentfiles) > 0)
{
printf ("\tDependentfiles: [%s]\n", dependentfiles);
@@ -965,19 +965,19 @@ static void display_print_driver_3(DRIVER_INFO_3 *i1)
valid = False;
}
}
-
+
printf ("\n");
printf ("\tMonitorname: [%s]\n", monitorname);
printf ("\tDefaultdatatype: [%s]\n\n", defaultdatatype);
- return;
+ return;
}
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_getdriver(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_getdriver(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -986,13 +986,13 @@ static WERROR cmd_spoolss_getdriver(struct rpc_pipe_client *cli,
uint32 info_level = 3;
bool opened_hnd = False;
PRINTER_DRIVER_CTR ctr;
- fstring printername,
- servername,
+ fstring printername,
+ servername,
user;
uint32 i;
bool success = False;
- if ((argc == 1) || (argc > 3))
+ if ((argc == 1) || (argc > 3))
{
printf("Usage: %s <printername> [level]\n", argv[0]);
return WERR_OK;
@@ -1008,7 +1008,7 @@ static WERROR cmd_spoolss_getdriver(struct rpc_pipe_client *cli,
/* Open a printer handle */
- werror = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
+ werror = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
PRINTER_ACCESS_USE,
servername, user, &pol);
@@ -1023,17 +1023,17 @@ static WERROR cmd_spoolss_getdriver(struct rpc_pipe_client *cli,
for (i=0; archi_table[i].long_archi!=NULL; i++) {
- werror = rpccli_spoolss_getprinterdriver( cli, mem_ctx, &pol, info_level,
+ werror = rpccli_spoolss_getprinterdriver( cli, mem_ctx, &pol, info_level,
archi_table[i].long_archi, archi_table[i].version,
&ctr);
if (!W_ERROR_IS_OK(werror))
continue;
-
+
/* need at least one success */
-
+
success = True;
-
+
printf ("\n[%s]\n", archi_table[i].long_archi);
switch (info_level) {
@@ -1051,22 +1051,22 @@ static WERROR cmd_spoolss_getdriver(struct rpc_pipe_client *cli,
break;
}
}
-
+
/* Cleanup */
if (opened_hnd)
- rpccli_spoolss_close_printer (cli, mem_ctx, &pol);
-
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
+
if ( success )
werror = WERR_OK;
-
+
return werror;
}
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_enum_drivers(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_enum_drivers(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -1093,11 +1093,11 @@ static WERROR cmd_spoolss_enum_drivers(struct rpc_pipe_client *cli,
continue;
werror = rpccli_spoolss_enumprinterdrivers(
- cli, mem_ctx, info_level,
+ cli, mem_ctx, info_level,
archi_table[i].long_archi, &returned, &ctr);
if (W_ERROR_V(werror) == W_ERROR_V(WERR_INVALID_ENVIRONMENT)) {
- printf ("Server does not support environment [%s]\n",
+ printf ("Server does not support environment [%s]\n",
archi_table[i].long_archi);
werror = WERR_OK;
continue;
@@ -1105,17 +1105,17 @@ static WERROR cmd_spoolss_enum_drivers(struct rpc_pipe_client *cli,
if (returned == 0)
continue;
-
+
if (!W_ERROR_IS_OK(werror)) {
printf ("Error getting driver for environment [%s] - %d\n",
archi_table[i].long_archi, W_ERROR_V(werror));
continue;
}
-
+
printf ("\n[%s]\n", archi_table[i].long_archi);
- switch (info_level)
+ switch (info_level)
{
-
+
case 1:
for (j=0; j < returned; j++) {
display_print_driver_1 (&ctr.info1[j]);
@@ -1136,7 +1136,7 @@ static WERROR cmd_spoolss_enum_drivers(struct rpc_pipe_client *cli,
return WERR_UNKNOWN_LEVEL;
}
}
-
+
return werror;
}
@@ -1148,16 +1148,16 @@ static void display_printdriverdir_1(DRIVER_DIRECTORY_1 *i1)
fstring name;
if (i1 == NULL)
return;
-
+
rpcstr_pull(name, i1->name.buffer, sizeof(name), -1, STR_TERMINATE);
-
+
printf ("\tDirectory Name:[%s]\n", name);
}
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_getdriverdir(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_getdriverdir(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -1194,8 +1194,8 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch)
{
int i;
-
- for (i=0; archi_table[i].long_archi != NULL; i++)
+
+ for (i=0; archi_table[i].long_archi != NULL; i++)
{
if (strcmp(arch, archi_table[i].short_archi) == 0)
{
@@ -1204,12 +1204,12 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch)
break;
}
}
-
+
if (archi_table[i].long_archi == NULL)
{
DEBUG(0, ("set_drv_info_3_env: Unknown arch [%s]\n", arch));
}
-
+
return;
}
@@ -1218,7 +1218,7 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch)
wrapper for strtok to get the next parameter from a delimited list.
Needed to handle the empty parameter string denoted by "NULL"
*************************************************************************/
-
+
static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest,
char **saveptr)
{
@@ -1235,19 +1235,19 @@ static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest,
ptr = NULL;
if (dest != NULL)
- init_unistr(dest, ptr);
+ init_unistr(dest, ptr);
return ptr;
}
/********************************************************************************
- fill in the members of a DRIVER_INFO_3 struct using a character
+ fill in the members of a DRIVER_INFO_3 struct using a character
string in the form of
<Long Printer Name>:<Driver File Name>:<Data File Name>:\
<Config File Name>:<Help File Name>:<Language Monitor Name>:\
- <Default Data Type>:<Comma Separated list of Files>
+ <Default Data Type>:<Comma Separated list of Files>
*******************************************************************************/
-static bool init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info,
+static bool init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info,
char *args )
{
char *str, *str2;
@@ -1299,7 +1299,7 @@ static bool init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info,
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_addprinterdriver(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_addprinterdriver(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -1322,7 +1322,7 @@ static WERROR cmd_spoolss_addprinterdriver(struct rpc_pipe_client *cli,
return WERR_OK;
}
-
+
/* Fill in the DRIVER_INFO_3 struct */
ZERO_STRUCT(info3);
if (!(arch = cmd_spoolss_get_short_archi(argv[1])))
@@ -1353,7 +1353,7 @@ static WERROR cmd_spoolss_addprinterdriver(struct rpc_pipe_client *cli,
result = rpccli_spoolss_addprinterdriver (cli, mem_ctx, level, &ctr);
if (W_ERROR_IS_OK(result)) {
- rpcstr_pull(driver_name, info3.name.buffer,
+ rpcstr_pull(driver_name, info3.name.buffer,
sizeof(driver_name), -1, STR_TERMINATE);
printf ("Printer Driver %s successfully installed.\n",
driver_name);
@@ -1366,7 +1366,7 @@ static WERROR cmd_spoolss_addprinterdriver(struct rpc_pipe_client *cli,
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -1375,20 +1375,20 @@ static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
PRINTER_INFO_CTR ctr;
PRINTER_INFO_2 info2;
fstring servername;
-
+
/* parse the command arguments */
if (argc != 5)
{
printf ("Usage: %s <name> <shared name> <driver> <port>\n", argv[0]);
return WERR_OK;
}
-
+
slprintf(servername, sizeof(servername)-1, "\\\\%s", cli->desthost);
strupper_m(servername);
/* Fill in the DRIVER_INFO_2 struct */
ZERO_STRUCT(info2);
-
+
init_unistr( &info2.printername, argv[1]);
init_unistr( &info2.sharename, argv[2]);
init_unistr( &info2.drivername, argv[3]);
@@ -1403,9 +1403,9 @@ static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
info2.defaultpriority = 0;
info2.starttime = 0;
info2.untiltime = 0;
-
- /* These three fields must not be used by AddPrinter()
- as defined in the MS Platform SDK documentation..
+
+ /* These three fields must not be used by AddPrinter()
+ as defined in the MS Platform SDK documentation..
--jerry
info2.status = 0;
info2.cjobs = 0;
@@ -1424,7 +1424,7 @@ static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_setdriver(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_setdriver(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -1437,7 +1437,7 @@ static WERROR cmd_spoolss_setdriver(struct rpc_pipe_client *cli,
fstring servername,
printername,
user;
-
+
/* parse the command arguments */
if (argc != 3)
{
@@ -1452,7 +1452,7 @@ static WERROR cmd_spoolss_setdriver(struct rpc_pipe_client *cli,
/* Get a printer handle */
- result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
+ result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
PRINTER_ALL_ACCESS,
servername, user, &pol);
@@ -1490,7 +1490,7 @@ done:
/* Cleanup */
if (opened_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
return result;
}
@@ -1499,17 +1499,19 @@ done:
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
WERROR result, ret = WERR_UNKNOWN_PRINTER_DRIVER;
-
+ NTSTATUS status;
+
int i;
int vers = -1;
-
+
const char *arch = NULL;
-
+ uint32_t delete_flags = 0;
+
/* parse the command arguments */
if (argc < 2 || argc > 4) {
printf ("Usage: %s <driver> [arch] [version]\n", argv[0]);
@@ -1520,36 +1522,44 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
arch = argv[2];
if (argc == 4)
vers = atoi (argv[3]);
-
-
+
+ if (vers >= 0) {
+ delete_flags |= DPD_DELETE_SPECIFIC_VERSION;
+ }
+
/* delete the driver for all architectures */
for (i=0; archi_table[i].long_archi; i++) {
- if (arch && !strequal( archi_table[i].long_archi, arch))
+ if (arch && !strequal( archi_table[i].long_archi, arch))
continue;
if (vers >= 0 && archi_table[i].version != vers)
continue;
/* make the call to remove the driver */
- result = rpccli_spoolss_deleteprinterdriverex(
- cli, mem_ctx, archi_table[i].long_archi, argv[1], archi_table[i].version);
-
- if ( !W_ERROR_IS_OK(result) )
+ status = rpccli_spoolss_DeletePrinterDriverEx(cli, mem_ctx,
+ cli->srv_name_slash,
+ archi_table[i].long_archi,
+ argv[1],
+ delete_flags,
+ archi_table[i].version,
+ &result);
+
+ if ( !W_ERROR_IS_OK(result) )
{
if ( !W_ERROR_EQUAL(result, WERR_UNKNOWN_PRINTER_DRIVER) ) {
- printf ("Failed to remove driver %s for arch [%s] (version: %d): %s\n",
+ printf ("Failed to remove driver %s for arch [%s] (version: %d): %s\n",
argv[1], archi_table[i].long_archi, archi_table[i].version, win_errstr(result));
}
- }
- else
+ }
+ else
{
- printf ("Driver %s and files removed for arch [%s] (version: %d).\n", argv[1],
+ printf ("Driver %s and files removed for arch [%s] (version: %d).\n", argv[1],
archi_table[i].long_archi, archi_table[i].version);
ret = WERR_OK;
}
}
-
+
return ret;
}
@@ -1557,14 +1567,15 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
WERROR result = WERR_OK;
+ NTSTATUS status;
fstring servername;
int i;
-
+
/* parse the command arguments */
if (argc != 2) {
printf ("Usage: %s <driver>\n", argv[0]);
@@ -1577,35 +1588,40 @@ static WERROR cmd_spoolss_deletedriver(struct rpc_pipe_client *cli,
/* delete the driver for all architectures */
for (i=0; archi_table[i].long_archi; i++) {
/* make the call to remove the driver */
- result = rpccli_spoolss_deleteprinterdriver(
- cli, mem_ctx, archi_table[i].long_archi, argv[1]);
-
+ status = rpccli_spoolss_DeletePrinterDriver(cli, mem_ctx,
+ servername,
+ archi_table[i].long_archi,
+ argv[1],
+ &result);
+ if (!NT_STATUS_IS_OK(status)) {
+ return result;
+ }
if ( !W_ERROR_IS_OK(result) ) {
if ( !W_ERROR_EQUAL(result, WERR_UNKNOWN_PRINTER_DRIVER) ) {
- printf ("Failed to remove driver %s for arch [%s] - error 0x%x!\n",
- argv[1], archi_table[i].long_archi,
+ printf ("Failed to remove driver %s for arch [%s] - error 0x%x!\n",
+ argv[1], archi_table[i].long_archi,
W_ERROR_V(result));
}
} else {
- printf ("Driver %s removed for arch [%s].\n", argv[1],
+ printf ("Driver %s removed for arch [%s].\n", argv[1],
archi_table[i].long_archi);
}
}
-
+
return result;
}
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_getprintprocdir(struct rpc_pipe_client *cli,
+static WERROR cmd_spoolss_getprintprocdir(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
WERROR result;
char *servername = NULL, *environment = NULL;
fstring procdir;
-
+
/* parse the command arguments */
if (argc > 2) {
printf ("Usage: %s [environment]\n", argv[0]);
@@ -1616,7 +1632,7 @@ static WERROR cmd_spoolss_getprintprocdir(struct rpc_pipe_client *cli,
return WERR_NOMEM;
strupper_m(servername);
- if (asprintf(&environment, "%s", (argc == 2) ? argv[1] :
+ if (asprintf(&environment, "%s", (argc == 2) ? argv[1] :
PRINTER_DRIVER_ARCHITECTURE) < 0) {
SAFE_FREE(servername);
return WERR_NOMEM;
@@ -1642,17 +1658,19 @@ static WERROR cmd_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
{
POLICY_HND handle;
WERROR werror;
+ NTSTATUS status;
char *servername = NULL, *printername = NULL;
- FORM form;
bool got_handle = False;
-
+ union spoolss_AddFormInfo info;
+ struct spoolss_AddFormInfo1 info1;
+
/* Parse the command arguments */
if (argc != 3) {
printf ("Usage: %s <printer> <formname>\n", argv[0]);
return WERR_OK;
}
-
+
/* Get a printer handle */
if (asprintf(&servername, "\\\\%s", cli->desthost) == -1) {
@@ -1664,8 +1682,8 @@ static WERROR cmd_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
return WERR_NOMEM;
}
- werror = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
- PRINTER_ALL_ACCESS,
+ werror = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
+ PRINTER_ALL_ACCESS,
servername, cli->auth->user_name,
&handle);
@@ -1676,23 +1694,29 @@ static WERROR cmd_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
/* Dummy up some values for the form data */
- form.flags = FORM_USER;
- form.size_x = form.size_y = 100;
- form.left = 0;
- form.top = 10;
- form.right = 20;
- form.bottom = 30;
+ info1.flags = FORM_USER;
+ info1.form_name = argv[2];
+ info1.size.width = 100;
+ info1.size.height = 100;
+ info1.area.left = 0;
+ info1.area.top = 10;
+ info1.area.right = 20;
+ info1.area.bottom = 30;
- init_unistr2(&form.name, argv[2], UNI_STR_TERMINATE);
+ info.info1 = &info1;
/* Add the form */
- werror = rpccli_spoolss_addform(cli, mem_ctx, &handle, 1, &form);
+ status = rpccli_spoolss_AddForm(cli, mem_ctx,
+ &handle,
+ 1,
+ info,
+ &werror);
done:
if (got_handle)
- rpccli_spoolss_close_printer(cli, mem_ctx, &handle);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
SAFE_FREE(servername);
SAFE_FREE(printername);
@@ -1708,17 +1732,19 @@ static WERROR cmd_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
{
POLICY_HND handle;
WERROR werror;
+ NTSTATUS status;
char *servername = NULL, *printername = NULL;
- FORM form;
bool got_handle = False;
-
+ union spoolss_AddFormInfo info;
+ struct spoolss_AddFormInfo1 info1;
+
/* Parse the command arguments */
if (argc != 3) {
printf ("Usage: %s <printer> <formname>\n", argv[0]);
return WERR_OK;
}
-
+
/* Get a printer handle */
if (asprintf(&servername, "\\\\%s", cli->desthost)) {
@@ -1731,7 +1757,7 @@ static WERROR cmd_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
}
werror = rpccli_spoolss_open_printer_ex(
- cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
servername, cli->auth->user_name, &handle);
if (!W_ERROR_IS_OK(werror))
@@ -1741,22 +1767,29 @@ static WERROR cmd_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
/* Dummy up some values for the form data */
- form.flags = FORM_PRINTER;
- form.size_x = form.size_y = 100;
- form.left = 0;
- form.top = 1000;
- form.right = 2000;
- form.bottom = 3000;
+ info1.flags = FORM_PRINTER;
+ info1.size.width = 100;
+ info1.size.height = 100;
+ info1.area.left = 0;
+ info1.area.top = 1000;
+ info1.area.right = 2000;
+ info1.area.bottom = 3000;
+ info1.form_name = argv[2];
- init_unistr2(&form.name, argv[2], UNI_STR_TERMINATE);
+ info.info1 = &info1;
/* Set the form */
- werror = rpccli_spoolss_setform(cli, mem_ctx, &handle, 1, argv[2], &form);
+ status = rpccli_spoolss_SetForm(cli, mem_ctx,
+ &handle,
+ argv[2],
+ 1,
+ info,
+ &werror);
done:
if (got_handle)
- rpccli_spoolss_close_printer(cli, mem_ctx, &handle);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
SAFE_FREE(servername);
SAFE_FREE(printername);
@@ -1795,45 +1828,64 @@ static void display_form(FORM_1 *form)
printf("%s\n" \
"\tflag: %s (%d)\n" \
"\twidth: %d, length: %d\n" \
- "\tleft: %d, right: %d, top: %d, bottom: %d\n\n",
+ "\tleft: %d, right: %d, top: %d, bottom: %d\n\n",
form_name, get_form_flag(form->flag), form->flag,
- form->width, form->length,
- form->left, form->right,
+ form->width, form->length,
+ form->left, form->right,
form->top, form->bottom);
}
/****************************************************************************
****************************************************************************/
+static void display_form_info1(struct spoolss_FormInfo1 *r)
+{
+ printf("%s\n" \
+ "\tflag: %s (%d)\n" \
+ "\twidth: %d, length: %d\n" \
+ "\tleft: %d, right: %d, top: %d, bottom: %d\n\n",
+ r->form_name, get_form_flag(r->flags), r->flags,
+ r->size.width, r->size.height,
+ r->area.left, r->area.right,
+ r->area.top, r->area.bottom);
+}
+
+/****************************************************************************
+****************************************************************************/
+
static WERROR cmd_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
POLICY_HND handle;
WERROR werror;
+ NTSTATUS status;
char *servername = NULL, *printername = NULL;
- FORM_1 form;
bool got_handle = False;
-
+ DATA_BLOB buffer;
+ uint32_t offered = 0;
+ union spoolss_FormInfo info;
+ uint32_t needed;
+
/* Parse the command arguments */
if (argc != 3) {
printf ("Usage: %s <printer> <formname>\n", argv[0]);
return WERR_OK;
}
-
+
/* Get a printer handle */
if (asprintf(&servername, "\\\\%s", cli->desthost) == -1) {
return WERR_NOMEM;
}
strupper_m(servername);
- if (asprintf(&printername, "%s\\%s", servername, argv[1])) {
+ if (asprintf(&printername, "%s\\%s", servername, argv[1]) == -1) {
SAFE_FREE(servername);
return WERR_NOMEM;
}
werror = rpccli_spoolss_open_printer_ex(
- cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
servername, cli->auth->user_name, &handle);
if (!W_ERROR_IS_OK(werror))
@@ -1843,16 +1895,37 @@ static WERROR cmd_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
/* Get the form */
- werror = rpccli_spoolss_getform(cli, mem_ctx, &handle, argv[2], 1, &form);
-
- if (!W_ERROR_IS_OK(werror))
- goto done;
-
- display_form(&form);
+ status = rpccli_spoolss_GetForm(cli, mem_ctx,
+ &handle,
+ argv[2],
+ 1,
+ NULL,
+ offered,
+ &info,
+ &needed,
+ &werror);
+ if (W_ERROR_EQUAL(werror, WERR_INSUFFICIENT_BUFFER)) {
+ buffer = data_blob_talloc(mem_ctx, NULL, needed);
+ offered = needed;
+ status = rpccli_spoolss_GetForm(cli, mem_ctx,
+ &handle,
+ argv[2],
+ 1,
+ &buffer,
+ offered,
+ &info,
+ &needed,
+ &werror);
+ }
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return werror;
+ }
+ display_form_info1(&info.info1);
done:
if (got_handle)
- rpccli_spoolss_close_printer(cli, mem_ctx, &handle);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
SAFE_FREE(servername);
SAFE_FREE(printername);
@@ -1863,22 +1936,23 @@ static WERROR cmd_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_deleteform(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_deleteform(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
POLICY_HND handle;
WERROR werror;
+ NTSTATUS status;
char *servername = NULL, *printername = NULL;
bool got_handle = False;
-
+
/* Parse the command arguments */
if (argc != 3) {
printf ("Usage: %s <printer> <formname>\n", argv[0]);
return WERR_OK;
}
-
+
/* Get a printer handle */
if (asprintf(&servername, "\\\\%s", cli->desthost) == -1) {
@@ -1891,7 +1965,7 @@ static WERROR cmd_spoolss_deleteform(struct rpc_pipe_client *cli,
}
werror = rpccli_spoolss_open_printer_ex(
- cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
servername, cli->auth->user_name, &handle);
if (!W_ERROR_IS_OK(werror))
@@ -1901,11 +1975,17 @@ static WERROR cmd_spoolss_deleteform(struct rpc_pipe_client *cli,
/* Delete the form */
- werror = rpccli_spoolss_deleteform(cli, mem_ctx, &handle, argv[2]);
+ status = rpccli_spoolss_DeleteForm(cli, mem_ctx,
+ &handle,
+ argv[2],
+ &werror);
+ if (!NT_STATUS_IS_OK(status)) {
+ return ntstatus_to_werror(status);
+ }
done:
if (got_handle)
- rpccli_spoolss_close_printer(cli, mem_ctx, &handle);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
SAFE_FREE(servername);
SAFE_FREE(printername);
@@ -1916,8 +1996,8 @@ static WERROR cmd_spoolss_deleteform(struct rpc_pipe_client *cli,
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_enum_forms(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_enum_forms(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
POLICY_HND handle;
@@ -1926,14 +2006,14 @@ static WERROR cmd_spoolss_enum_forms(struct rpc_pipe_client *cli,
bool got_handle = False;
uint32 num_forms, level = 1, i;
FORM_1 *forms;
-
+
/* Parse the command arguments */
if (argc != 2) {
printf ("Usage: %s <printer>\n", argv[0]);
return WERR_OK;
}
-
+
/* Get a printer handle */
if (asprintf(&servername, "\\\\%s", cli->desthost) == -1) {
@@ -1946,7 +2026,7 @@ static WERROR cmd_spoolss_enum_forms(struct rpc_pipe_client *cli,
}
werror = rpccli_spoolss_open_printer_ex(
- cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
servername, cli->auth->user_name, &handle);
if (!W_ERROR_IS_OK(werror))
@@ -1971,7 +2051,7 @@ static WERROR cmd_spoolss_enum_forms(struct rpc_pipe_client *cli,
done:
if (got_handle)
- rpccli_spoolss_close_printer(cli, mem_ctx, &handle);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &handle, NULL);
SAFE_FREE(servername);
SAFE_FREE(printername);
@@ -2035,7 +2115,7 @@ static WERROR cmd_spoolss_setprinterdata(struct rpc_pipe_client *cli,
/* get a printer handle */
result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername, "",
- MAXIMUM_ALLOWED_ACCESS, servername,
+ MAXIMUM_ALLOWED_ACCESS, servername,
user, &pol);
if (!W_ERROR_IS_OK(result))
goto done;
@@ -2048,12 +2128,12 @@ static WERROR cmd_spoolss_setprinterdata(struct rpc_pipe_client *cli,
if (!W_ERROR_IS_OK(result))
goto done;
-
+
printf("%s\n", current_timestring(tmp_ctx, True));
printf("\tchange_id (before set)\t:[0x%x]\n", info.change_id);
/* Set the printer data */
-
+
fstrcpy(value.valuename, argv[3]);
switch (value.type) {
@@ -2123,18 +2203,18 @@ static WERROR cmd_spoolss_setprinterdata(struct rpc_pipe_client *cli,
}
result = rpccli_spoolss_setprinterdata(cli, mem_ctx, &pol, &value);
-
+
if (!W_ERROR_IS_OK(result)) {
printf ("Unable to set [%s=%s]!\n", argv[3], argv[4]);
goto done;
}
printf("\tSetPrinterData succeeded [%s: %s]\n", argv[3], argv[4]);
-
+
result = rpccli_spoolss_getprinter(cli, mem_ctx, &pol, 0, &ctr);
if (!W_ERROR_IS_OK(result))
goto done;
-
+
printf("%s\n", current_timestring(tmp_ctx, True));
printf("\tchange_id (after set)\t:[0x%x]\n", info.change_id);
@@ -2142,7 +2222,7 @@ done:
/* cleanup */
TALLOC_FREE(tmp_ctx);
if (opened_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &pol);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &pol, NULL);
return result;
}
@@ -2192,8 +2272,8 @@ static void display_job_info_2(JOB_INFO_2 *job)
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_enum_jobs(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_enum_jobs(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
WERROR result;
@@ -2257,10 +2337,10 @@ static WERROR cmd_spoolss_enum_jobs(struct rpc_pipe_client *cli,
break;
}
}
-
+
done:
if (got_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &hnd, NULL);
return result;
}
@@ -2268,8 +2348,8 @@ done:
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_enum_data( struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_enum_data( struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
WERROR result;
@@ -2305,7 +2385,7 @@ static WERROR cmd_spoolss_enum_data( struct rpc_pipe_client *cli,
if (!W_ERROR_IS_OK(result))
goto done;
-
+
got_hnd = True;
/* Enumerate data */
@@ -2326,7 +2406,7 @@ static WERROR cmd_spoolss_enum_data( struct rpc_pipe_client *cli,
done:
if (got_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &hnd, NULL);
return result;
}
@@ -2334,8 +2414,8 @@ done:
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_enum_data_ex( struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_enum_data_ex( struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
WERROR result;
@@ -2370,18 +2450,18 @@ static WERROR cmd_spoolss_enum_data_ex( struct rpc_pipe_client *cli,
return WERR_NOMEM;
}
- result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
- "", MAXIMUM_ALLOWED_ACCESS,
+ result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
+ "", MAXIMUM_ALLOWED_ACCESS,
servername, user, &hnd);
if (!W_ERROR_IS_OK(result))
goto done;
-
+
got_hnd = True;
/* Enumerate subkeys */
- if ( !(ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) )
+ if ( !(ctr = TALLOC_ZERO_P( mem_ctx, REGVAL_CTR )) )
return WERR_NOMEM;
result = rpccli_spoolss_enumprinterdataex(cli, mem_ctx, &hnd, keyname, ctr);
@@ -2397,7 +2477,7 @@ static WERROR cmd_spoolss_enum_data_ex( struct rpc_pipe_client *cli,
done:
if (got_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &hnd, NULL);
return result;
}
@@ -2405,8 +2485,8 @@ done:
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_enum_printerkey( struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_enum_printerkey( struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
WERROR result;
@@ -2444,13 +2524,13 @@ static WERROR cmd_spoolss_enum_printerkey( struct rpc_pipe_client *cli,
}
- result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
- "", MAXIMUM_ALLOWED_ACCESS,
+ result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
+ "", MAXIMUM_ALLOWED_ACCESS,
servername, user, &hnd);
if (!W_ERROR_IS_OK(result))
goto done;
-
+
got_hnd = True;
/* Enumerate subkeys */
@@ -2477,7 +2557,7 @@ done:
SAFE_FREE(keylist);
if (got_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &hnd, NULL);
return result;
}
@@ -2485,8 +2565,8 @@ done:
/****************************************************************************
****************************************************************************/
-static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
fstring servername, printername;
@@ -2511,7 +2591,7 @@ static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
strupper_m(printername);
result = rpccli_spoolss_open_printer_ex(
- cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
+ cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS,
servername, cli->auth->user_name, &hnd);
if (!W_ERROR_IS_OK(result)) {
@@ -2560,9 +2640,9 @@ static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
goto done;
}
-done:
+done:
if (got_hnd)
- rpccli_spoolss_close_printer(cli, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(cli, mem_ctx, &hnd, NULL);
return result;
}
@@ -2630,7 +2710,7 @@ static bool compare_printer_secdesc( struct rpc_pipe_client *cli1, POLICY_HND *h
goto done;
}
printf("ok\n");
-
+
printf("++ ");
@@ -2639,24 +2719,24 @@ static bool compare_printer_secdesc( struct rpc_pipe_client *cli1, POLICY_HND *h
result = False;
goto done;
}
-
+
sd1 = ctr1.printers_3->secdesc;
sd2 = ctr2.printers_3->secdesc;
-
+
if ( (sd1 != sd2) && ( !sd1 || !sd2 ) ) {
printf("NULL secdesc!\n");
result = False;
goto done;
}
-
+
if (!sec_desc_equal( sd1, sd2 ) ) {
printf("Security Descriptors *not* equal!\n");
result = False;
goto done;
}
-
+
printf("Security descriptors match\n");
-
+
done:
talloc_destroy(mem_ctx);
return result;
@@ -2668,8 +2748,8 @@ done:
extern struct user_auth_info *rpcclient_auth_info;
-static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int argc,
+static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx, int argc,
const char **argv)
{
fstring printername, servername1, servername2;
@@ -2695,7 +2775,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
/* first get the connection to the remote server */
- nt_status = cli_full_connection(&cli_server2, global_myname(), servername2,
+ nt_status = cli_full_connection(&cli_server2, global_myname(), servername2,
NULL, 0,
"IPC$", "IPC",
get_cmdline_auth_info_username(rpcclient_auth_info),
@@ -2725,7 +2805,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
return WERR_NOMEM;
}
printf("Opening %s...", printername_path);
- werror = rpccli_spoolss_open_printer_ex( cli, mem_ctx, printername_path,
+ werror = rpccli_spoolss_open_printer_ex( cli, mem_ctx, printername_path,
"", PRINTER_ALL_ACCESS, servername1, cli_server1->user_name, &hPrinter1);
if ( !W_ERROR_IS_OK(werror) ) {
printf("failed (%s)\n", win_errstr(werror));
@@ -2741,7 +2821,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
return WERR_NOMEM;
}
printf("Opening %s...", printername_path);
- werror = rpccli_spoolss_open_printer_ex( cli2, mem_ctx, printername_path,
+ werror = rpccli_spoolss_open_printer_ex( cli2, mem_ctx, printername_path,
"", PRINTER_ALL_ACCESS, servername2, cli_server2->user_name, &hPrinter2 );
if ( !W_ERROR_IS_OK(werror) ) {
printf("failed (%s)\n", win_errstr(werror));
@@ -2760,8 +2840,8 @@ done:
/* cleanup */
printf("Closing printers...");
- rpccli_spoolss_close_printer( cli, mem_ctx, &hPrinter1 );
- rpccli_spoolss_close_printer( cli2, mem_ctx, &hPrinter2 );
+ rpccli_spoolss_ClosePrinter( cli, mem_ctx, &hPrinter1, NULL );
+ rpccli_spoolss_ClosePrinter( cli2, mem_ctx, &hPrinter2, NULL );
printf("ok\n");
/* close the second remote connection */
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 4807e62436..f4df58df92 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2037,10 +2037,11 @@ static bool api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
char *str2 = skip_string(param,tpscnt,str1);
char *p = skip_string(param,tpscnt,str2);
- struct pdb_search *search;
- struct samr_displayentry *entries;
-
- int num_entries;
+ uint32_t num_groups;
+ uint32_t resume_handle;
+ struct rpc_pipe_client *samr_pipe;
+ struct policy_handle samr_handle, domain_handle;
+ NTSTATUS status;
if (!str1 || !str2 || !p) {
return False;
@@ -2062,14 +2063,31 @@ static bool api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
return False;
}
- /* get list of domain groups SID_DOMAIN_GRP=2 */
- become_root();
- search = pdb_search_groups();
- unbecome_root();
+ status = rpc_pipe_open_internal(
+ talloc_tos(), &ndr_table_samr.syntax_id, rpc_samr_dispatch,
+ conn->server_info, &samr_pipe);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("api_RNetUserEnum: Could not connect to samr: %s\n",
+ nt_errstr(status)));
+ return false;
+ }
- if (search == NULL) {
- DEBUG(3,("api_RNetGroupEnum:failed to get group list"));
- return False;
+ status = rpccli_samr_Connect2(samr_pipe, talloc_tos(), global_myname(),
+ SAMR_ACCESS_OPEN_DOMAIN, &samr_handle);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("api_RNetUserEnum: samr_Connect2 failed: %s\n",
+ nt_errstr(status)));
+ return false;
+ }
+
+ status = rpccli_samr_OpenDomain(samr_pipe, talloc_tos(), &samr_handle,
+ SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS,
+ get_global_sam_sid(), &domain_handle);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("api_RNetUserEnum: samr_OpenDomain failed: %s\n",
+ nt_errstr(status)));
+ rpccli_samr_Close(samr_pipe, talloc_tos(), &samr_handle);
+ return false;
}
resume_context = get_safe_SVAL(param,tpscnt,p,0,-1);
@@ -2077,11 +2095,6 @@ static bool api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
DEBUG(10,("api_RNetGroupEnum:resume context: %d, client buffer size: "
"%d\n", resume_context, cli_buf_size));
- become_root();
- num_entries = pdb_search_entries(search, resume_context, 0xffffffff,
- &entries);
- unbecome_root();
-
*rdata_len = cli_buf_size;
*rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
@@ -2090,25 +2103,63 @@ static bool api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
p = *rdata;
- for(i=0; i<num_entries; i++) {
- fstring name;
- fstrcpy(name, entries[i].account_name);
- if( ((PTR_DIFF(p,*rdata)+21) <= *rdata_len) ) {
+ errflags = NERR_Success;
+ num_groups = 0;
+ resume_handle = 0;
+
+ while (true) {
+ struct samr_SamArray *sam_entries;
+ uint32_t num_entries;
+
+ status = rpccli_samr_EnumDomainGroups(samr_pipe, talloc_tos(),
+ &domain_handle,
+ &resume_handle,
+ &sam_entries, 1,
+ &num_entries);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(10, ("rpccli_samr_EnumDomainGroups returned "
+ "%s\n", nt_errstr(status)));
+ break;
+ }
+
+ if (num_entries == 0) {
+ DEBUG(10, ("rpccli_samr_EnumDomainGroups returned "
+ "no entries -- done\n"));
+ break;
+ }
+
+ for(i=0; i<num_entries; i++) {
+ const char *name;
+
+ name = sam_entries->entries[i].name.string;
+
+ if( ((PTR_DIFF(p,*rdata)+21) > *rdata_len) ) {
+ /* set overflow error */
+ DEBUG(3,("overflow on entry %d group %s\n", i,
+ name));
+ errflags=234;
+ break;
+ }
+
/* truncate the name at 21 chars. */
- memcpy(p, name, 21);
+ memset(p, 0, 21);
+ strlcpy(p, name, 21);
DEBUG(10,("adding entry %d group %s\n", i, p));
p += 21;
- p += 5; /* Both NT4 and W2k3SP1 do padding here.
- No idea why... */
- } else {
- /* set overflow error */
- DEBUG(3,("overflow on entry %d group %s\n", i, name));
- errflags=234;
+ p += 5; /* Both NT4 and W2k3SP1 do padding here. No
+ * idea why... */
+ num_groups += 1;
+ }
+
+ if (errflags != NERR_Success) {
break;
}
+
+ TALLOC_FREE(sam_entries);
}
- pdb_search_destroy(search);
+ rpccli_samr_Close(samr_pipe, talloc_tos(), &domain_handle);
+ rpccli_samr_Close(samr_pipe, talloc_tos(), &samr_handle);
*rdata_len = PTR_DIFF(p,*rdata);
@@ -2119,8 +2170,8 @@ static bool api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
}
SSVAL(*rparam, 0, errflags);
SSVAL(*rparam, 2, 0); /* converter word */
- SSVAL(*rparam, 4, i); /* is this right?? */
- SSVAL(*rparam, 6, resume_context+num_entries); /* is this right?? */
+ SSVAL(*rparam, 4, num_groups); /* is this right?? */
+ SSVAL(*rparam, 6, resume_context+num_groups); /* is this right?? */
return(True);
}
@@ -2353,6 +2404,7 @@ static bool api_RNetUserEnum(connection_struct *conn, uint16 vuid,
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("api_RNetUserEnum: samr_OpenDomain failed: %s\n",
nt_errstr(status)));
+ rpccli_samr_Close(samr_pipe, talloc_tos(), &samr_handle);
return false;
}
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 7ea6e39fcb..e9b581efe8 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -4209,10 +4209,14 @@ bool set_unix_posix_default_acl(connection_struct *conn, const char *fname, SMB_
{
SMB_ACL_T def_acl = NULL;
- if (num_def_acls && !S_ISDIR(psbuf->st_mode)) {
- DEBUG(5,("set_unix_posix_default_acl: Can't set default ACL on non-directory file %s\n", fname ));
- errno = EISDIR;
- return False;
+ if (!S_ISDIR(psbuf->st_mode)) {
+ if (num_def_acls) {
+ DEBUG(5,("set_unix_posix_default_acl: Can't set default ACL on non-directory file %s\n", fname ));
+ errno = EISDIR;
+ return False;
+ } else {
+ return True;
+ }
}
if (!num_def_acls) {
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index c9fc1fbb6a..8539e04bd5 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1623,6 +1623,7 @@ void chain_reply(struct smb_request *req)
exit_server_cleanly("chain_reply: srv_send_smb "
"failed.");
}
+ TALLOC_FREE(req);
return;
}
@@ -1737,6 +1738,7 @@ void chain_reply(struct smb_request *req)
IS_CONN_ENCRYPTED(req->conn)||req->encrypted)) {
exit_server_cleanly("construct_reply: srv_send_smb failed.");
}
+ TALLOC_FREE(req);
}
/****************************************************************************
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 1210a36a39..9cf41d88c7 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "wbc_async.h"
extern char *optarg;
extern int optind;
@@ -5497,14 +5498,14 @@ static bool run_local_memcache(int dummy)
static void wbclient_done(struct async_req *req)
{
- NTSTATUS status;
+ wbcErr wbc_err;
struct winbindd_response *wb_resp;
int *i = (int *)req->async.priv;
- status = wb_trans_recv(req, req, &wb_resp);
+ wbc_err = wb_trans_recv(req, req, &wb_resp);
TALLOC_FREE(req);
*i += 1;
- d_printf("wb_trans_recv %d returned %s\n", *i, nt_errstr(status));
+ d_printf("wb_trans_recv %d returned %s\n", *i, wbcErrorString(wbc_err));
}
static bool run_local_wbclient(int dummy)
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 31e87ca804..0c2cd24fb2 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -576,12 +576,6 @@ static int net_conf_addshare(struct net_context *c,
goto done;
}
- if (getpwnam(sharename)) {
- d_fprintf(stderr, "ERROR: share name %s is already a valid "
- "system user name.\n", sharename);
- goto done;
- }
-
if (strequal(sharename, GLOBAL_NAME)) {
d_fprintf(stderr,
"ERROR: 'global' is not a valid share name.\n");
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index c750e46b67..ad9be05798 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -1006,11 +1006,11 @@ static bool get_printer_info(struct rpc_pipe_client *pipe_hnd,
return false;
if (!net_spoolss_getprinter(pipe_hnd, mem_ctx, &hnd, level, ctr)) {
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd, NULL);
return false;
}
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd, NULL);
*num_printers = 1;
@@ -1242,7 +1242,7 @@ static NTSTATUS rpc_printer_publish_internals_args(struct rpc_pipe_client *pipe_
done:
if (got_hnd)
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd, NULL);
return nt_status;
}
@@ -1383,7 +1383,7 @@ NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
done:
if (got_hnd)
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd, NULL);
return nt_status;
}
@@ -1522,12 +1522,12 @@ NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
/* close printer handles here */
if (got_hnd_src) {
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
got_hnd_src = false;
}
if (got_hnd_dst) {
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
got_hnd_dst = false;
}
@@ -1538,11 +1538,11 @@ NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
done:
if (got_hnd_src) {
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
}
if (got_hnd_dst) {
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
}
if (cli_dst) {
@@ -1668,8 +1668,10 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
for (f = 0; f < num_forms; f++) {
- FORM form;
+ union spoolss_AddFormInfo info;
+ struct spoolss_AddFormInfo1 info1;
fstring form_name;
+ NTSTATUS status;
/* only migrate FORM_PRINTER types, according to jerry
FORM_BUILTIN-types are hard-coded in samba */
@@ -1685,20 +1687,24 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
f, form_name, forms[f].flag);
/* is there a more elegant way to do that ? */
- form.flags = FORM_PRINTER;
- form.size_x = forms[f].width;
- form.size_y = forms[f].length;
- form.left = forms[f].left;
- form.top = forms[f].top;
- form.right = forms[f].right;
- form.bottom = forms[f].bottom;
+ info1.flags = FORM_PRINTER;
+ info1.size.width = forms[f].width;
+ info1.size.height = forms[f].length;
+ info1.area.left = forms[f].left;
+ info1.area.top = forms[f].top;
+ info1.area.right = forms[f].right;
+ info1.area.bottom = forms[f].bottom;
+ info1.form_name = form_name;
- init_unistr2(&form.name, form_name, UNI_STR_TERMINATE);
+ info.info1 = &info1;
/* FIXME: there might be something wrong with samba's
builtin-forms */
- result = rpccli_spoolss_addform(pipe_hnd_dst, mem_ctx,
- &hnd_dst, 1, &form);
+ status = rpccli_spoolss_AddForm(pipe_hnd_dst, mem_ctx,
+ &hnd_dst,
+ 1,
+ info,
+ &result);
if (!W_ERROR_IS_OK(result)) {
d_printf("\tAddForm form %d: [%s] refused.\n",
f, form_name);
@@ -1711,12 +1717,12 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
/* close printer handles here */
if (got_hnd_src) {
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
got_hnd_src = false;
}
if (got_hnd_dst) {
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
got_hnd_dst = false;
}
}
@@ -1726,10 +1732,10 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
done:
if (got_hnd_src)
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
if (got_hnd_dst)
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
if (cli_dst) {
cli_shutdown(cli_dst);
@@ -1933,13 +1939,13 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
/* close dst */
if (got_hnd_dst) {
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
got_hnd_dst = false;
}
/* close src */
if (got_hnd_src) {
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
got_hnd_src = false;
}
}
@@ -1949,10 +1955,10 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
done:
if (got_hnd_src)
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
if (got_hnd_dst)
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
if (cli_dst) {
cli_shutdown(cli_dst);
@@ -2067,7 +2073,7 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
DEBUG(1,("printer already exists: %s\n", sharename));
/* close printer handle here - dst only, not got src yet. */
if (got_hnd_dst) {
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
got_hnd_dst = false;
}
continue;
@@ -2103,12 +2109,12 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
/* close printer handles here */
if (got_hnd_src) {
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
got_hnd_src = false;
}
if (got_hnd_dst) {
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
got_hnd_dst = false;
}
}
@@ -2117,10 +2123,10 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
done:
if (got_hnd_src)
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
if (got_hnd_dst)
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
if (cli_dst) {
cli_shutdown(cli_dst);
@@ -2486,12 +2492,12 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
/* close printer handles here */
if (got_hnd_src) {
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
got_hnd_src = false;
}
if (got_hnd_dst) {
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
got_hnd_dst = false;
}
@@ -2505,10 +2511,10 @@ done:
SAFE_FREE(unc_name);
if (got_hnd_src)
- rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
+ rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd_src, NULL);
if (got_hnd_dst)
- rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
+ rpccli_spoolss_ClosePrinter(pipe_hnd_dst, mem_ctx, &hnd_dst, NULL);
if (cli_dst) {
cli_shutdown(cli_dst);
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index 481ac1b9ad..3a64979f33 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -203,29 +203,21 @@ static bool idmap_tdb_upgrade(struct db_context *db)
return True;
}
-static NTSTATUS idmap_tdb_open_db(TALLOC_CTX *memctx,
- bool check_config,
- struct db_context **dbctx)
+static NTSTATUS idmap_tdb_load_ranges(void)
{
- NTSTATUS ret;
- TALLOC_CTX *ctx;
- char *tdbfile = NULL;
- struct db_context *db = NULL;
- int32_t version;
uid_t low_uid = 0;
uid_t high_uid = 0;
gid_t low_gid = 0;
gid_t high_gid = 0;
- bool config_error = false;
- /* load ranges */
- if (!lp_idmap_uid(&low_uid, &high_uid)
- || !lp_idmap_gid(&low_gid, &high_gid)) {
- DEBUG(1, ("idmap uid or idmap gid missing\n"));
- config_error = true;
- if (check_config) {
- return NT_STATUS_UNSUCCESSFUL;
- }
+ if (!lp_idmap_uid(&low_uid, &high_uid)) {
+ DEBUG(1, ("idmap uid missing\n"));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ if (!lp_idmap_gid(&low_gid, &high_gid)) {
+ DEBUG(1, ("idmap gid missing\n"));
+ return NT_STATUS_UNSUCCESSFUL;
}
idmap_tdb_state.low_uid = low_uid;
@@ -235,29 +227,41 @@ static NTSTATUS idmap_tdb_open_db(TALLOC_CTX *memctx,
if (idmap_tdb_state.high_uid <= idmap_tdb_state.low_uid) {
DEBUG(1, ("idmap uid range missing or invalid\n"));
- config_error = true;
- if (check_config) {
- return NT_STATUS_UNSUCCESSFUL;
- }
+ return NT_STATUS_UNSUCCESSFUL;
}
if (idmap_tdb_state.high_gid <= idmap_tdb_state.low_gid) {
DEBUG(1, ("idmap gid range missing or invalid\n"));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ return NT_STATUS_OK;
+}
+
+static NTSTATUS idmap_tdb_open_db(TALLOC_CTX *memctx,
+ bool check_config,
+ struct db_context **dbctx)
+{
+ NTSTATUS ret;
+ TALLOC_CTX *ctx;
+ char *tdbfile = NULL;
+ struct db_context *db = NULL;
+ int32_t version;
+ bool config_error = false;
+
+ ret = idmap_tdb_load_ranges();
+ if (!NT_STATUS_IS_OK(ret)) {
config_error = true;
if (check_config) {
- return NT_STATUS_UNSUCCESSFUL;
+ return ret;
}
}
/* use our own context here */
- ctx = talloc_new(memctx);
- if (!ctx) {
- DEBUG(0, ("Out of memory!\n"));
- return NT_STATUS_NO_MEMORY;
- }
+ ctx = talloc_stackframe();
/* use the old database if present */
- tdbfile = talloc_strdup(ctx, state_path("winbindd_idmap.tdb"));
+ tdbfile = state_path("winbindd_idmap.tdb");
if (!tdbfile) {
DEBUG(0, ("Out of memory!\n"));
ret = NT_STATUS_NO_MEMORY;
@@ -402,6 +406,7 @@ static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid)
const char *hwmtype;
uint32_t high_hwm;
uint32_t hwm;
+ int res;
/* Get current high water mark */
switch (xid->type) {
@@ -423,7 +428,14 @@ static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid)
return NT_STATUS_INVALID_PARAMETER;
}
+ res = idmap_alloc_db->transaction_start(idmap_alloc_db);
+ if (res != 0) {
+ DEBUG(1, (__location__ " Failed to start transaction.\n"));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
if ((hwm = dbwrap_fetch_int32(idmap_alloc_db, hwmkey)) == -1) {
+ idmap_alloc_db->transaction_cancel(idmap_alloc_db);
return NT_STATUS_INTERNAL_DB_ERROR;
}
@@ -431,6 +443,7 @@ static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid)
if (hwm > high_hwm) {
DEBUG(1, ("Fatal Error: %s range full!! (max: %lu)\n",
hwmtype, (unsigned long)high_hwm));
+ idmap_alloc_db->transaction_cancel(idmap_alloc_db);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -438,6 +451,7 @@ static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid)
ret = dbwrap_change_uint32_atomic(idmap_alloc_db, hwmkey, &hwm, 1);
if (ret != 0) {
DEBUG(0, ("Fatal error while fetching a new %s value\n!", hwmtype));
+ idmap_alloc_db->transaction_cancel(idmap_alloc_db);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -445,9 +459,16 @@ static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid)
if (hwm > high_hwm) {
DEBUG(1, ("Fatal Error: %s range full!! (max: %lu)\n",
hwmtype, (unsigned long)high_hwm));
+ idmap_alloc_db->transaction_cancel(idmap_alloc_db);
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ res = idmap_alloc_db->transaction_commit(idmap_alloc_db);
+ if (res != 0) {
+ DEBUG(1, (__location__ " Failed to commit transaction.\n"));
return NT_STATUS_UNSUCCESSFUL;
}
-
+
xid->id = hwm;
DEBUG(10,("New %s = %d\n", hwmtype, hwm));
@@ -694,10 +715,10 @@ static NTSTATUS idmap_tdb_sid_to_id(struct idmap_tdb_context *ctx, struct id_map
TDB_DATA data;
char *keystr;
unsigned long rec_id = 0;
- fstring tmp;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
- if ((keystr = talloc_asprintf(
- ctx, "%s", sid_to_fstring(tmp, map->sid))) == NULL) {
+ keystr = sid_string_talloc(tmp_ctx, map->sid);
+ if (keystr == NULL) {
DEBUG(0, ("Out of memory!\n"));
ret = NT_STATUS_NO_MEMORY;
goto done;
@@ -706,7 +727,7 @@ static NTSTATUS idmap_tdb_sid_to_id(struct idmap_tdb_context *ctx, struct id_map
DEBUG(10,("Fetching record %s\n", keystr));
/* Check if sid is present in database */
- data = dbwrap_fetch_bystring(ctx->db, NULL, keystr);
+ data = dbwrap_fetch_bystring(ctx->db, tmp_ctx, keystr);
if (!data.dptr) {
DEBUG(10,("Record %s not found\n", keystr));
ret = NT_STATUS_NONE_MAPPED;
@@ -730,8 +751,6 @@ static NTSTATUS idmap_tdb_sid_to_id(struct idmap_tdb_context *ctx, struct id_map
DEBUG(2, ("Found INVALID record %s -> %s\n", keystr, (const char *)data.dptr));
ret = NT_STATUS_INTERNAL_DB_ERROR;
}
-
- TALLOC_FREE(data.dptr);
/* apply filters before returning result */
if ((ctx->filter_low_id && (map->xid.id < ctx->filter_low_id)) ||
@@ -742,7 +761,7 @@ static NTSTATUS idmap_tdb_sid_to_id(struct idmap_tdb_context *ctx, struct id_map
}
done:
- talloc_free(keystr);
+ talloc_free(tmp_ctx);
return ret;
}
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index 8bde963c60..fb90dd097e 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -54,6 +54,43 @@ static struct db_context *idmap_tdb2;
static NTSTATUS idmap_tdb2_alloc_load(void);
+static NTSTATUS idmap_tdb2_load_ranges(void)
+{
+ uid_t low_uid = 0;
+ uid_t high_uid = 0;
+ gid_t low_gid = 0;
+ gid_t high_gid = 0;
+
+ if (!lp_idmap_uid(&low_uid, &high_uid)) {
+ DEBUG(1, ("idmap uid missing\n"));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ if (!lp_idmap_gid(&low_gid, &high_gid)) {
+ DEBUG(1, ("idmap gid missing\n"));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ idmap_tdb2_state.low_uid = low_uid;
+ idmap_tdb2_state.high_uid = high_uid;
+ idmap_tdb2_state.low_gid = low_gid;
+ idmap_tdb2_state.high_gid = high_gid;
+
+ if (idmap_tdb2_state.high_uid <= idmap_tdb2_state.low_uid) {
+ DEBUG(1, ("idmap uid range missing or invalid\n"));
+ DEBUGADD(1, ("idmap will be unable to map foreign SIDs\n"));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ if (idmap_tdb2_state.high_gid <= idmap_tdb2_state.low_gid) {
+ DEBUG(1, ("idmap gid range missing or invalid\n"));
+ DEBUGADD(1, ("idmap will be unable to map foreign SIDs\n"));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ return NT_STATUS_OK;
+}
+
/*
open the permanent tdb
*/
@@ -94,10 +131,7 @@ static NTSTATUS idmap_tdb2_open_db(void)
*/
static NTSTATUS idmap_tdb2_alloc_load(void)
{
- uid_t low_uid = 0;
- uid_t high_uid = 0;
- gid_t low_gid = 0;
- gid_t high_gid = 0;
+ NTSTATUS status;
uint32 low_id;
/* see if a idmap script is configured */
@@ -111,27 +145,15 @@ static NTSTATUS idmap_tdb2_alloc_load(void)
/* load ranges */
- /* Create high water marks for group and user id */
- if (!lp_idmap_uid(&low_uid, &high_uid)
- || !lp_idmap_gid(&low_gid, &high_gid)) {
- DEBUG(1, ("idmap uid or idmap gid missing\n"));
- return NT_STATUS_UNSUCCESSFUL;
+ status = idmap_tdb2_load_ranges();
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
- idmap_tdb2_state.low_uid = low_uid;
- idmap_tdb2_state.high_uid = high_uid;
- idmap_tdb2_state.low_gid = low_gid;
- idmap_tdb2_state.high_gid = high_gid;
-
- if (idmap_tdb2_state.high_uid <= idmap_tdb2_state.low_uid) {
- DEBUG(1, ("idmap uid range missing or invalid\n"));
- DEBUGADD(1, ("idmap will be unable to map foreign SIDs\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
+ /* Create high water marks for group and user id */
- if (((low_id = dbwrap_fetch_int32(idmap_tdb2,
- HWM_USER)) == -1) ||
- (low_id < idmap_tdb2_state.low_uid)) {
+ low_id = dbwrap_fetch_int32(idmap_tdb2, HWM_USER);
+ if ((low_id == -1) || (low_id < idmap_tdb2_state.low_uid)) {
if (!NT_STATUS_IS_OK(dbwrap_trans_store_int32(
idmap_tdb2, HWM_USER,
idmap_tdb2_state.low_uid))) {
@@ -141,15 +163,8 @@ static NTSTATUS idmap_tdb2_alloc_load(void)
}
}
- if (idmap_tdb2_state.high_gid <= idmap_tdb2_state.low_gid) {
- DEBUG(1, ("idmap gid range missing or invalid\n"));
- DEBUGADD(1, ("idmap will be unable to map foreign SIDs\n"));
- return NT_STATUS_UNSUCCESSFUL;
- }
-
- if (((low_id = dbwrap_fetch_int32(idmap_tdb2,
- HWM_GROUP)) == -1) ||
- (low_id < idmap_tdb2_state.low_gid)) {
+ low_id = dbwrap_fetch_int32(idmap_tdb2, HWM_GROUP);
+ if ((low_id == -1) || (low_id < idmap_tdb2_state.low_gid)) {
if (!NT_STATUS_IS_OK(dbwrap_trans_store_int32(
idmap_tdb2, HWM_GROUP,
idmap_tdb2_state.low_gid))) {
@@ -557,12 +572,13 @@ static NTSTATUS idmap_tdb2_sid_to_id(struct idmap_tdb2_context *ctx, struct id_m
TDB_DATA data;
char *keystr;
unsigned long rec_id = 0;
- NTSTATUS status;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
- status = idmap_tdb2_open_db();
- NT_STATUS_NOT_OK_RETURN(status);
+ ret = idmap_tdb2_open_db();
+ NT_STATUS_NOT_OK_RETURN(ret);
- if ((keystr = sid_string_talloc(ctx, map->sid)) == NULL) {
+ keystr = sid_string_talloc(tmp_ctx, map->sid);
+ if (keystr == NULL) {
DEBUG(0, ("Out of memory!\n"));
ret = NT_STATUS_NO_MEMORY;
goto done;
@@ -571,7 +587,7 @@ static NTSTATUS idmap_tdb2_sid_to_id(struct idmap_tdb2_context *ctx, struct id_m
DEBUG(10,("Fetching record %s\n", keystr));
/* Check if sid is present in database */
- data = dbwrap_fetch_bystring(idmap_tdb2, keystr, keystr);
+ data = dbwrap_fetch_bystring(idmap_tdb2, tmp_ctx, keystr);
if (!data.dptr) {
fstring idstr;
@@ -626,7 +642,7 @@ static NTSTATUS idmap_tdb2_sid_to_id(struct idmap_tdb2_context *ctx, struct id_m
}
done:
- talloc_free(keystr);
+ talloc_free(tmp_ctx);
return ret;
}
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index 977ee9c6b1..c302dd1d62 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -67,27 +67,6 @@ bool winbindd_setup_sig_term_handler(bool parent);
bool winbindd_setup_sig_hup_handler(const char *lfile);
int main(int argc, char **argv, char **envp);
-/* The following definitions come from winbindd/winbindd_reqtrans.c */
-
-struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
- int fd, size_t max_extra_data);
-NTSTATUS wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
- struct winbindd_request **preq);
-struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev, int fd,
- struct winbindd_request *wb_req);
-NTSTATUS wb_req_write_recv(struct async_req *req);
-
-struct async_req *wb_resp_read_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev, int fd);
-NTSTATUS wb_resp_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
- struct winbindd_response **presp);
-struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev, int fd,
- struct winbindd_response *wb_resp);
-NTSTATUS wb_resp_write_recv(struct async_req *req);
-
/* The following definitions come from winbindd/winbindd_ads.c */
diff --git a/source3/winbindd/winbindd_user.c b/source3/winbindd/winbindd_user.c
index 62fd4d7f07..8b481f972c 100644
--- a/source3/winbindd/winbindd_user.c
+++ b/source3/winbindd/winbindd_user.c
@@ -80,11 +80,12 @@ static bool winbindd_fill_pwent(TALLOC_CTX *ctx, char *dom_name, char *user_name
if (!pw || !dom_name || !user_name)
return False;
- domain = find_domain_from_name_noinit(dom_name);
+ domain = find_domain_from_name(dom_name);
if (domain == NULL) {
- DEBUG(5,("winbindd_fill_pwent: Failed to find domain for %s. "
- "Disabling name alias support\n", dom_name));
+ DEBUG(5,("winbindd_fill_pwent: Failed to find domain for %s.\n",
+ dom_name));
nt_status = NT_STATUS_NO_SUCH_DOMAIN;
+ return false;
}
/* Resolve the uid number */