summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-09-27 22:50:48 +0000
committerGerald Carter <jerry@samba.org>2007-09-27 22:50:48 +0000
commit1a6570fce8f96fca00f557ecb0d9b14528b1faf9 (patch)
treefced4d31f98c2f0c876fe3c5e9cf3976b063bea4
parent39c8e7b8485f7f0e14d79aced523711ea9f4e55e (diff)
downloadsamba-1a6570fce8f96fca00f557ecb0d9b14528b1faf9.tar.gz
samba-1a6570fce8f96fca00f557ecb0d9b14528b1faf9.tar.xz
samba-1a6570fce8f96fca00f557ecb0d9b14528b1faf9.zip
r25387: Sync with 3.2.0 svn tree
-rw-r--r--README.Coding20
-rw-r--r--examples/LDAP/README26
-rwxr-xr-xexamples/LDAP/ol-schema-migrate.pl384
-rw-r--r--examples/LDAP/samba.schema21
-rw-r--r--examples/libmsrpc/cacusermgr/Makefile22
-rw-r--r--examples/libmsrpc/cacusermgr/cacusermgr.c343
-rw-r--r--examples/libmsrpc/cacusermgr/cacusermgr.h64
-rw-r--r--examples/libmsrpc/cacusermgr/mgr_group.c209
-rw-r--r--examples/libmsrpc/cacusermgr/mgr_user.c415
-rw-r--r--examples/libmsrpc/cacusermgr/util.c342
-rw-r--r--examples/libmsrpc/test/Makefile99
-rw-r--r--examples/libmsrpc/test/README8
-rw-r--r--examples/libmsrpc/test/lsa/ear.c261
-rw-r--r--examples/libmsrpc/test/lsa/lsaenum.c96
-rw-r--r--examples/libmsrpc/test/lsa/lsaenumprivs.c79
-rw-r--r--examples/libmsrpc/test/lsa/lsapol.c87
-rw-r--r--examples/libmsrpc/test/lsa/lsapriv.c113
-rw-r--r--examples/libmsrpc/test/lsa/lsaq.c245
-rw-r--r--examples/libmsrpc/test/lsa/lsatrust.c151
-rw-r--r--examples/libmsrpc/test/reg/regdelete.c102
-rw-r--r--examples/libmsrpc/test/reg/regkey.c76
-rw-r--r--examples/libmsrpc/test/reg/regkeycreate.c115
-rw-r--r--examples/libmsrpc/test/reg/regkeyenum.c99
-rw-r--r--examples/libmsrpc/test/reg/regopen.c66
-rw-r--r--examples/libmsrpc/test/reg/regopenkey.c69
-rw-r--r--examples/libmsrpc/test/reg/regqueryval.c79
-rw-r--r--examples/libmsrpc/test/reg/regsetval.c59
-rw-r--r--examples/libmsrpc/test/reg/regvalenum.c103
-rw-r--r--examples/libmsrpc/test/reg/security.c74
-rw-r--r--examples/libmsrpc/test/reg/shutdown.c68
-rw-r--r--examples/libmsrpc/test/sam/adduser.c92
-rw-r--r--examples/libmsrpc/test/sam/disable.c63
-rw-r--r--examples/libmsrpc/test/sam/dominfo.c55
-rw-r--r--examples/libmsrpc/test/sam/enable.c64
-rw-r--r--examples/libmsrpc/test/sam/samenum.c117
-rw-r--r--examples/libmsrpc/test/sam/samgroup.c480
-rw-r--r--examples/libmsrpc/test/sam/samlookup.c140
-rw-r--r--examples/libmsrpc/test/sam/samuser.c294
-rw-r--r--examples/libmsrpc/test/smbc_test/smbc.c87
-rw-r--r--examples/libmsrpc/test/svcctl/svc.c303
-rw-r--r--examples/libmsrpc/test/test_util.c408
-rw-r--r--examples/libmsrpc/test/test_util.h31
-rw-r--r--source/Makefile.in68
-rw-r--r--source/VERSION2
-rw-r--r--source/client/client.c4
-rw-r--r--source/configure.in88
-rw-r--r--source/groupdb/mapping.c16
-rw-r--r--source/include/gpo.h6
-rw-r--r--source/include/includes.h6
-rw-r--r--source/include/mangle.h15
-rw-r--r--source/include/msdfs.h14
-rw-r--r--source/include/ntdomain.h2
-rw-r--r--source/include/smb_macros.h3
-rw-r--r--source/include/smbldap.h1
-rw-r--r--source/lib/adt_tree.c52
-rw-r--r--source/lib/charcnv.c251
-rw-r--r--source/lib/ctdbd_conn.c2
-rw-r--r--source/lib/events.c5
-rw-r--r--source/lib/fault.c8
-rw-r--r--source/lib/module.c47
-rw-r--r--source/lib/ms_fnmatch.c43
-rw-r--r--source/lib/replace/dlfcn.m42
-rw-r--r--source/lib/replace/libreplace.m412
-rw-r--r--source/lib/replace/replace.h77
-rw-r--r--source/lib/replace/system/network.h8
-rw-r--r--source/lib/replace/test/testsuite.c2
-rw-r--r--source/lib/smbrun.c28
-rw-r--r--source/lib/system.c176
-rw-r--r--source/lib/talloc/configure.ac2
-rw-r--r--source/lib/talloc/talloc.c239
-rw-r--r--source/lib/talloc/talloc.h24
-rw-r--r--source/lib/talloc/talloc_guide.txt19
-rw-r--r--source/lib/talloc/testsuite.c48
-rw-r--r--source/lib/util.c16
-rw-r--r--source/lib/util_str.c241
-rw-r--r--source/lib/util_unistr.c4
-rw-r--r--source/libaddns/dnsgss.c24
-rw-r--r--source/libads/kerberos_verify.c10
-rw-r--r--source/libads/ldap_schema.c4
-rw-r--r--source/libads/sasl.c65
-rw-r--r--source/libads/util.c1
-rw-r--r--source/libgpo/gpo_fetch.c2
-rw-r--r--source/libgpo/gpo_util.c6
-rw-r--r--source/librpc/gen_ndr/ndr_dfs.c274
-rw-r--r--source/librpc/gen_ndr/ndr_echo.c124
-rw-r--r--source/librpc/gen_ndr/ndr_epmapper.c198
-rw-r--r--source/librpc/gen_ndr/ndr_eventlog.c160
-rw-r--r--source/librpc/gen_ndr/ndr_initshutdown.c34
-rw-r--r--source/librpc/gen_ndr/ndr_lsa.c720
-rw-r--r--source/librpc/gen_ndr/ndr_netlogon.c534
-rw-r--r--source/librpc/gen_ndr/ndr_notify.c4
-rw-r--r--source/librpc/gen_ndr/ndr_srvsvc.c860
-rw-r--r--source/librpc/gen_ndr/ndr_svcctl.c288
-rw-r--r--source/librpc/gen_ndr/ndr_unixinfo.c46
-rw-r--r--source/librpc/gen_ndr/ndr_winreg.c258
-rw-r--r--source/librpc/gen_ndr/ndr_wkssvc.c294
-rw-r--r--source/libsmb/clispnego.c14
-rw-r--r--source/libsmb/ntlmssp_parse.c3
-rw-r--r--source/modules/vfs_catia.c2
-rw-r--r--source/nmbd/nmbd_processlogon.c131
-rw-r--r--source/nsswitch/pam_winbind.c1221
-rw-r--r--source/nsswitch/smb_krb5_locator.c9
-rw-r--r--source/nsswitch/wb_common.c101
-rw-r--r--source/nsswitch/wbinfo.c5
-rw-r--r--source/nsswitch/winbind_client.h20
-rw-r--r--source/nsswitch/winbind_nss.h3
-rw-r--r--source/nsswitch/winbind_nss_aix.c22
-rw-r--r--source/nsswitch/winbind_nss_config.h55
-rw-r--r--source/nsswitch/winbind_nss_irix.c22
-rw-r--r--source/nsswitch/winbind_nss_linux.c80
-rw-r--r--source/nsswitch/winbind_nss_linux.h4
-rw-r--r--source/nsswitch/winbind_nss_solaris.c6
-rw-r--r--source/nsswitch/winbind_struct_protocol.h (renamed from source/nsswitch/winbindd_nss.h)131
-rw-r--r--source/param/loadparm.c4
-rw-r--r--source/passdb/pdb_ldap.c322
-rw-r--r--source/printing/nt_printing.c60
-rw-r--r--source/registry/reg_api.c41
-rw-r--r--source/registry/reg_frontend_hilvl.c9
-rw-r--r--source/registry/reg_objects.c137
-rw-r--r--source/registry/reg_smbconf.c219
-rw-r--r--source/rpc_client/cli_lsarpc.c333
-rw-r--r--source/rpc_client/cli_reg.c4
-rw-r--r--source/rpc_client/cli_samr.c8
-rw-r--r--source/rpc_parse/parse_spoolss.c54
-rw-r--r--source/rpc_server/srv_dfs_nt.c211
-rw-r--r--source/rpc_server/srv_lsa_hnd.c2
-rw-r--r--source/rpc_server/srv_pipe_hnd.c6
-rw-r--r--source/rpc_server/srv_samr_nt.c10
-rw-r--r--source/rpc_server/srv_spoolss_nt.c54
-rw-r--r--source/rpc_server/srv_srvsvc_nt.c18
-rw-r--r--source/rpcclient/cmd_lsarpc.c10
-rw-r--r--source/rpcclient/cmd_netlogon.c8
-rw-r--r--source/rpcclient/cmd_samr.c60
-rw-r--r--source/rpcclient/cmd_srvsvc.c10
-rwxr-xr-xsource/script/count_80_col.pl16
-rwxr-xr-xsource/script/format_indent.sh12
-rw-r--r--source/script/mkproto.awk2
-rwxr-xr-xsource/script/strip_trail_ws.pl18
-rwxr-xr-xsource/script/tests/test_posix_s3.sh1
-rw-r--r--source/smbd/close.c112
-rw-r--r--source/smbd/dfree.c14
-rw-r--r--source/smbd/dir.c177
-rw-r--r--source/smbd/filename.c195
-rw-r--r--source/smbd/ipc.c12
-rw-r--r--source/smbd/lanman.c137
-rw-r--r--source/smbd/mangle.c67
-rw-r--r--source/smbd/mangle_hash.c201
-rw-r--r--source/smbd/mangle_hash2.c135
-rw-r--r--source/smbd/mangle_map.c211
-rw-r--r--source/smbd/msdfs.c870
-rw-r--r--source/smbd/nttrans.c515
-rw-r--r--source/smbd/open.c40
-rw-r--r--source/smbd/oplock_irix.c17
-rw-r--r--source/smbd/pipes.c16
-rw-r--r--source/smbd/posix_acls.c64
-rw-r--r--source/smbd/quotas.c3
-rw-r--r--source/smbd/reply.c1195
-rw-r--r--source/smbd/sec_ctx.c7
-rw-r--r--source/smbd/service.c22
-rw-r--r--source/smbd/sesssetup.c2
-rw-r--r--source/smbd/statcache.c128
-rw-r--r--source/smbd/trans2.c649
-rw-r--r--source/smbd/vfs.c110
-rw-r--r--source/utils/net.c24
-rw-r--r--source/utils/net_ads.c375
-rw-r--r--source/utils/net_rap.c54
-rw-r--r--source/utils/net_rpc.c39
-rw-r--r--source/utils/net_rpc_join.c38
-rw-r--r--source/utils/net_rpc_registry.c3
-rw-r--r--source/utils/net_rpc_samsync.c34
-rw-r--r--source/utils/net_rpc_shell.c7
-rw-r--r--source/utils/ntlm_auth.c20
-rw-r--r--source/utils/smbcontrol.c4
-rw-r--r--source/winbindd/idmap.c (renamed from source/nsswitch/idmap.c)7
-rw-r--r--source/winbindd/idmap_ad.c (renamed from source/nsswitch/idmap_ad.c)16
-rw-r--r--source/winbindd/idmap_cache.c (renamed from source/nsswitch/idmap_cache.c)0
-rw-r--r--source/winbindd/idmap_ldap.c (renamed from source/nsswitch/idmap_ldap.c)8
-rw-r--r--source/winbindd/idmap_nss.c (renamed from source/nsswitch/idmap_nss.c)0
-rw-r--r--source/winbindd/idmap_passdb.c (renamed from source/nsswitch/idmap_passdb.c)0
-rw-r--r--source/winbindd/idmap_rid.c (renamed from source/nsswitch/idmap_rid.c)0
-rw-r--r--source/winbindd/idmap_tdb.c (renamed from source/nsswitch/idmap_tdb.c)0
-rw-r--r--source/winbindd/idmap_util.c (renamed from source/nsswitch/idmap_util.c)0
-rw-r--r--source/winbindd/nss_info.c (renamed from source/nsswitch/nss_info.c)0
-rw-r--r--source/winbindd/nss_info_template.c (renamed from source/nsswitch/nss_info_template.c)0
-rw-r--r--source/winbindd/winbindd.c (renamed from source/nsswitch/winbindd.c)2
-rw-r--r--source/winbindd/winbindd.h (renamed from source/nsswitch/winbindd.h)8
-rw-r--r--source/winbindd/winbindd_ads.c (renamed from source/nsswitch/winbindd_ads.c)14
-rw-r--r--source/winbindd/winbindd_async.c (renamed from source/nsswitch/winbindd_async.c)0
-rw-r--r--source/winbindd/winbindd_cache.c (renamed from source/nsswitch/winbindd_cache.c)0
-rw-r--r--source/winbindd/winbindd_ccache_access.c (renamed from source/nsswitch/winbindd_ccache_access.c)0
-rw-r--r--source/winbindd/winbindd_cm.c (renamed from source/nsswitch/winbindd_cm.c)14
-rw-r--r--source/winbindd/winbindd_cred_cache.c (renamed from source/nsswitch/winbindd_cred_cache.c)0
-rw-r--r--source/winbindd/winbindd_creds.c (renamed from source/nsswitch/winbindd_creds.c)0
-rw-r--r--source/winbindd/winbindd_dual.c (renamed from source/nsswitch/winbindd_dual.c)11
-rw-r--r--source/winbindd/winbindd_group.c (renamed from source/nsswitch/winbindd_group.c)0
-rw-r--r--source/winbindd/winbindd_misc.c (renamed from source/nsswitch/winbindd_misc.c)33
-rw-r--r--source/winbindd/winbindd_pam.c (renamed from source/nsswitch/winbindd_pam.c)72
-rw-r--r--source/winbindd/winbindd_passdb.c (renamed from source/nsswitch/winbindd_passdb.c)0
-rw-r--r--source/winbindd/winbindd_reconnect.c (renamed from source/nsswitch/winbindd_reconnect.c)0
-rw-r--r--source/winbindd/winbindd_rpc.c (renamed from source/nsswitch/winbindd_rpc.c)4
-rw-r--r--source/winbindd/winbindd_sid.c (renamed from source/nsswitch/winbindd_sid.c)0
-rw-r--r--source/winbindd/winbindd_user.c (renamed from source/nsswitch/winbindd_user.c)0
-rw-r--r--source/winbindd/winbindd_util.c (renamed from source/nsswitch/winbindd_util.c)51
-rw-r--r--source/winbindd/winbindd_wins.c (renamed from source/nsswitch/winbindd_wins.c)0
204 files changed, 8734 insertions, 11927 deletions
diff --git a/README.Coding b/README.Coding
index 73ceb5028cf..fd52dbe890d 100644
--- a/README.Coding
+++ b/README.Coding
@@ -79,6 +79,11 @@ displaying trailing whitespace:
" Show tabs, trailing whitespace, and continued lines visually
set list listchars=tab:»·,trail:·,extends:…
+ " highlight overly long lines same as TODOs.
+ set textwidth=80
+ autocmd BufNewFile,BufRead *.c,*.h exec 'match Todo /\%>' . &textwidth . 'v.\+/'
+
+
=========================
FAQ & Statement Reference
=========================
@@ -214,3 +219,18 @@ or
if (!x) {
fprintf(stderr, "Unable to alloc memory!\n");
}
+
+
+Primitive Data Types
+--------------------
+
+Samba has large amounts of historical code which makes use of data types
+commonly supported by the C99 standard. However, at the time such types
+as boolean and exact width integers did not exist and Samba developers
+were forced to provide their own. Now that these types are guaranteed to
+be available either as part of the compiler C99 support or from lib/replace/,
+new code should adhere to the following conventions:
+
+ * Booleans are of type "bool" (not BOOL)
+ * Boolean values are "true" and "false" (not True or False)
+ * Exact width integers are of type [u]int[8|16|32|64]_t
diff --git a/examples/LDAP/README b/examples/LDAP/README
index aa3207fd1f9..9fbabc977cf 100644
--- a/examples/LDAP/README
+++ b/examples/LDAP/README
@@ -17,22 +17,22 @@ and add an include for it in the /etc/openldap/slapd.conf file.
Note that samba.schema relies upon the uid and uidNumber attributes
from the RFC2307 schema (i.e. nis.schema)
-If you choose to import /etc/passwd, nis, or nisplus tables
-into ldap, you can use migration tools provided by PADL Software
-which are located at
+If you choose to import /etc/passwd, nis, or nisplus tables
+into ldap, you can use migration tools provided by PADL Software
+which are located at
http://www.padl.com/tools.html
It is not a requirement that a user's /etc/passwd account
is stored in LDAP for the samba.schema file to work (although
-the whole point of storing smbpasswd in LDAP is to have a
+the whole point of storing smbpasswd in LDAP is to have a
single location for user accounts, right?)
The padl tools will leave you with LDIF files which you can import
into OpenLDAP. Before you can import them, you need to include
nis.schema and cosine.schema in your slapd.conf file.
-You must restart the LDAP server for these new included schema files
+You must restart the LDAP server for these new included schema files
to become active.
SunOne/Netscape DS
@@ -48,15 +48,25 @@ Novell eDirectory
The schema file has not been updated for the sambaSamAccount
objectclass.
+Fedora Directory Server /
+RedHat Directory Server /
+Netscape Directory Server
+-------------------------
+
+An *updated* schema file has been provided, plus a very useful script from
+Mike Jackson and Alyseo is available.
+ol-schema-migrate.pl can be used to migrate OpenLDAP schema files to FDS
+schema ldif files, it can also be used to validate the schema files to
+make sure no duplicate OIDs or malformed entries are found.
smbldap-tools/
--------------
-The smbldap-tools have been removed from the samba svn
-tree. The latest version will continue to be included
+The smbldap-tools have been removed from the samba svn
+tree. The latest version will continue to be included
in Samba releases.
-The smbldap-tools package can be downloaded individually from
+The smbldap-tools package can be downloaded individually from
http://samba.idealx.org/dist/
!==
diff --git a/examples/LDAP/ol-schema-migrate.pl b/examples/LDAP/ol-schema-migrate.pl
new file mode 100755
index 00000000000..12392cb4cd0
--- /dev/null
+++ b/examples/LDAP/ol-schema-migrate.pl
@@ -0,0 +1,384 @@
+#!/usr/bin/perl -w
+#
+# Convert OpenLDAP schema files into Fedora DS format with RFC2252 compliant printing
+#
+# First Release : Mike Jackson <mj@sci.fi> 14 June 2005
+# http://www.netauth.com/~jacksonm/ldap/ol-schema-migrate.pl
+# Professional LDAP consulting for large and small projects
+#
+# - 6 Dec 2005
+# - objectclass element ordering
+#
+# Second Release : Alyseo <info@alyseo.com> 05 Februrary 2006
+# Francois Billard <francois@alyseo.com>
+# Yacine Kheddache <yacine@alyseo.com>
+# http://www.alyseo.com/
+#
+# - 05 Februrary 2006
+# - parsing improvement to accept non-RFC compliant schemas (like ISPMAN)
+# - adding RFC element : Usage, No-user-modification, collective keywords
+# - 08 Februrary 2006
+# - adding help & usage
+# - now this script can also beautify your schemas: "-b"
+# - count attributes and objects class: "-c"
+# - display items that can not be converted (empty OID...): "-d"
+# - 15 February 2006
+# - adding workaround for Fedora DS bug 181465:
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=181465
+# - adding duplicated OID check: "-d"
+# Useful to manually correct nasty schemas like:
+# https://sourceforge.net/tracker/?func=detail&atid=108390&aid=1429276&group_id=8390
+# - 13 September 2007
+# Based on Samba Team GPL Compliance Officer request, license has been updated from
+# GPL to GPLv3+
+#
+# - Fedora DS bug you need to correct by hand :
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=179956
+#
+# GPLv3+ license
+#
+
+my $optionCount = 0;
+my $optionPrint = 0;
+my $optionBadEntries = 0;
+my $optionHelp = 0;
+my $filename = "" ;
+
+foreach (@ARGV) {
+ $optionHelp = 1 if ( /^-h$/);
+ $optionCount = 1 if ( /^-c$/);
+ $optionPrint = 1 if ( /^-b$/);
+ $optionBadEntries = 1 if ( /^-d$/);
+ $filename = $_ if ( ! /^-b$/ && ! /^-c$/ && ! /^-d$/);
+}
+
+die "Usage : ol-schema-migrate-v2.pl [ -c ] [ -b ] [ -d ] schema\n" .
+ " -c\tcount attribute and object class\n" .
+ " -b\tconvert and beautify your schema\n" .
+ " -d\tdisplay unrecognized elements, find empty and duplicated OID\n" .
+ " -h\tthis help\n" if ($filename eq "" || ($optionHelp || (!$optionCount && !$optionPrint && !$optionBadEntries)));
+
+if($optionCount) {
+ print "Schema verification counters:\n";
+ my $ldapdata = &getSourceFile($filename);
+ print "".(defined($ldapdata->{attributes}) ? @{$ldapdata->{attributes}} : 0) . " attributes\n";
+ print "".(defined($ldapdata->{objectclass}) ? @{$ldapdata->{objectclass}} : 0) . " object classes\n\n"
+}
+
+if($optionPrint) {
+ my $ldapdata = &getSourceFile($filename);
+ &printit($ldapdata);
+}
+
+if($optionBadEntries) {
+ print "Display unrecognized entries:\n";
+ my $ldapdata = &getSourceFile($filename);
+ my $errorsAttr = 0;
+ my $errorsObjc = 0;
+ my $errorsDup = 0;
+ my $emptyOid = 0;
+ my %dup;
+
+ foreach (@{$ldapdata->{attributes}}) {
+ my $attr = $_;
+
+ push @{$dup{$attr->{OID}}{attr}}, {NAME => $attr->{NAME}, LINENUMBER => $attr->{LINENUMBER}};
+
+ $attr->{DATA} =~ s/\n/ /g;
+ $attr->{DATA} =~ s/\r//g;
+ $attr->{DATA} =~ s/attribute[t|T]ypes?:?\s*\(//;
+ $attr->{DATA} =~ s/\Q$attr->{OID}// if(defined $attr->{OID});
+ $attr->{DATA} =~ s/NAME\s*\Q$attr->{NAME}// if(defined $attr->{NAME});
+ $attr->{DATA} =~ s/DESC\s*'\Q$attr->{DESC}'// if(defined $attr->{DESC});
+ $attr->{DATA} =~ s/$attr->{OBSOLETE}// if(defined $attr->{OBSOLETE});
+ $attr->{DATA} =~ s/SUP\s*\Q$attr->{SUP}// if(defined $attr->{SUP});
+ $attr->{DATA} =~ s/EQUALITY\s*\Q$attr->{EQUALITY}// if(defined $attr->{EQUALITY});
+ $attr->{DATA} =~ s/ORDERING\s*\Q$attr->{ORDERING}// if(defined $attr->{ORDERING});
+ $attr->{DATA} =~ s/SUBSTR\s*\Q$attr->{SUBSTR}// if(defined $attr->{SUBSTR});
+ $attr->{DATA} =~ s/SYNTAX\s*\Q$attr->{SYNTAX}// if(defined $attr->{SYNTAX});
+ $attr->{DATA} =~ s/SINGLE-VALUE// if(defined $attr->{SINGLEVALUE});
+ $attr->{DATA} =~ s/NO-USER-MODIFICATION// if(defined $attr->{NOUSERMOD});
+ $attr->{DATA} =~ s/COLLECTIVE// if(defined $attr->{COLLECTIVE});
+ $attr->{DATA} =~ s/USAGE\s*\Q$attr->{USAGE}// if(defined $attr->{USAGE});
+ $attr->{DATA} =~ s/\)\s$//;
+ $attr->{DATA} =~ s/^\s+(\S)/\n$1/ ;
+ $attr->{DATA} =~ s/(\S)\s+$/$1\n/;
+ do {
+ $errorsAttr ++;
+ do { $emptyOid ++;
+ print "Warning : no OID for attributes element at line $attr->{LINENUMBER} \n";
+ } if( !defined($attr->{OID}));
+ print "### Unknow element embedded in ATTRIBUTE at line $attr->{LINENUMBER} :\n$attr->{DATA}\n"
+ } if($attr->{DATA} =~ /\w/);
+ }
+
+ foreach (@{$ldapdata->{objectclass}}) {
+ my $objc = $_;
+ push @{$dup{$objc->{OID}}{objc}} , {NAME => $objc->{NAME}, LINENUMBER => $objc->{LINENUMBER}};
+ $objc->{DATA} =~ s/\n/ /g;
+ $objc->{DATA} =~ s/\r//g;
+ $objc->{DATA} =~ s/^object[c|C]lasse?s?:?\s*\(?//;
+ $objc->{DATA} =~ s/\Q$objc->{OID}// if(defined $objc->{OID});
+ $objc->{DATA} =~ s/NAME\s*\Q$objc->{NAME}\E// if(defined $objc->{NAME});
+ $objc->{DATA} =~ s/DESC\s*'\Q$objc->{DESC}\E'// if(defined $objc->{DESC});
+ $objc->{DATA} =~ s/OBSOLETE// if(defined $objc->{OBSOLETE});
+ $objc->{DATA} =~ s/SUP\s*\Q$objc->{SUP}// if(defined $objc->{SUP});
+ $objc->{DATA} =~ s/\Q$objc->{TYPE}// if(defined $objc->{TYPE});
+ $objc->{DATA} =~ s/MUST\s*\Q$objc->{MUST}\E\s*// if(defined $objc->{MUST});
+ $objc->{DATA} =~ s/MUST\s*\(?\s*\Q$objc->{MUST}\E\s*\)?// if(defined $objc->{MUST});
+ $objc->{DATA} =~ s/MAY\s*\Q$objc->{MAY}\E// if(defined $objc->{MAY});
+ $objc->{DATA} =~ s/\)\s$//;
+ $objc->{DATA} =~ s/^\s+(\S)/\n$1/ ;
+ $objc->{DATA} =~ s/(\S)\s+$/$1\n/;
+
+ do {
+ print "#" x 80 ."\n";
+ $errorsObjc ++;
+ do { $emptyOid++ ;
+ print "Warning : no OID for object class element at line $objc->{LINENUMBER} \n";
+ } if( $objc->{OID} eq "");
+ print "### Unknow element embedded in OBJECT CLASS at line $objc->{LINENUMBER} :\n$objc->{DATA}\n"
+ } if($objc->{DATA} =~ /\w/);
+ }
+
+ my $nbDup = 0;
+ foreach (keys %dup) {
+ my $sumOid = 0;
+ $sumOid += @{$dup{$_}{attr}} if(defined (@{$dup{$_}{attr}}));
+ $sumOid += @{$dup{$_}{objc}} if(defined (@{$dup{$_}{objc}}));
+ if( $sumOid > 1 && $_ ne "") {
+ $nbDup ++;
+ print "#" x 80 ."\n";
+ print "Duplicate OID founds : $_\n";
+ foreach (@{$dup{$_}{attr}}) {
+
+ print "Attribute : $_->{NAME} (line : $_->{LINENUMBER})\n";
+ }
+ foreach (@{$dup{$_}{objc}}) {
+ print "Object class : $_->{NAME} (line : $_->{LINENUMBER})\n";
+ }
+
+ }
+ }
+
+ print "\n$errorsAttr errors detected in ATTRIBUTES list\n";
+ print "$errorsObjc errors detected in OBJECT CLASS list\n";
+ print "$nbDup duplicate OID founds\n";
+ print "$emptyOid empty OID fields founds\n\n";
+
+}
+
+
+sub printit {
+ my $ldapdata = shift;
+ &printSeparator;
+ print "dn: cn=schema\n";
+ &printSeparator;
+
+ # print elements in RFC2252 order
+
+ foreach (@{$ldapdata->{attributes}}) {
+ my $attr = $_;
+ print "attributeTypes: (\n";
+ print " $attr->{OID}\n";
+ print " NAME $attr->{NAME}\n";
+ print " DESC '$attr->{DESC}'\n" if(defined $attr->{DESC});
+ print " OBSOLETE\n" if(defined $attr->{OBSOLETE});
+ print " SUP $attr->{SUP}\n" if(defined $attr->{SUP});
+ print " EQUALITY $attr->{EQUALITY}\n" if(defined $attr->{EQUALITY});
+ print " ORDERING $attr->{ORDERING}\n" if(defined $attr->{ORDERING});
+ print " SUBSTR $attr->{SUBSTR}\n" if(defined $attr->{SUBSTR});
+ print " SYNTAX $attr->{SYNTAX}\n" if(defined $attr->{SYNTAX});
+ print " SINGLE-VALUE\n" if(defined $attr->{SINGLEVALUE});
+ print " NO-USER-MODIFICATION\n" if(defined $attr->{NOUSERMOD});
+ print " COLLECTIVE\n" if(defined $attr->{COLLECTIVE});
+ print " USAGE $attr->{USAGE}\n" if(defined $attr->{USAGE});
+ print " )\n";
+ &printSeparator;
+ }
+
+ foreach (@{$ldapdata->{objectclass}}) {
+ my $objc = $_;
+ # next 3 lines : Fedora DS space sensitive bug workaround
+ $objc->{SUP} =~ s/^\(\s*(.*?)\s*\)$/\( $1 \)/ if (defined $objc->{SUP});
+ $objc->{MUST} =~ s/^\(\s*(.*?)\s*\)$/\( $1 \)/ if (defined $objc->{MUST});
+ $objc->{MAY} =~ s/^\(\s*(.*?)\s*\)$/\( $1 \)/ if (defined $objc->{MAY});
+
+ print "objectClasses: (\n";
+ print " $objc->{OID}\n";
+ print " NAME $objc->{NAME}\n";
+ print " DESC '$objc->{DESC}'\n" if(defined $objc->{DESC});
+ print " OBSOLETE\n" if(defined $objc->{OBSOLETE});
+ print " SUP $objc->{SUP}\n" if(defined $objc->{SUP});
+ print " $objc->{TYPE}\n" if(defined $objc->{TYPE});
+ print " MUST $objc->{MUST}\n" if(defined $objc->{MUST});
+ print " MAY $objc->{MAY}\n" if(defined $objc->{MAY});
+ print " )\n";
+ &printSeparator;
+ }
+}
+
+sub printSeparator {
+ print "#\n";
+ print "#" x 80 . "\n";
+ print "#\n";
+}
+
+sub getSourceFile {
+ my @data = &getFile(shift);
+ my %result;
+ my $result = \%result;
+ my @allattrs;
+ my @allattrsLineNumber;
+ my @allobjc;
+ my @allobjcLineNumber;
+ my $at = 0;
+ my $oc = 0;
+ my $at_string;
+ my $oc_string;
+ my $idx = 0;
+ my $beginParenthesis = 0;
+ my $endParenthesis = 0;
+ my $lineNumber = 0;
+ for(@data) {
+ $lineNumber++;
+ next if (/^\s*\#/); # skip comments
+
+ if($at) {
+ s/ +/ /; # remove embedded tabs
+ s/\t/ /; # remove multiple spaces after the $ sign
+
+ $at_string .= $_;
+ $beginParenthesis = 0; # Use best matching elements
+ $endParenthesis = 0;
+ for(my $i=0;$ i < length($at_string); $i++) {
+ $beginParenthesis++ if(substr ($at_string,$i,1) eq "(");
+ $endParenthesis++ if(substr ($at_string,$i,1) eq ")");
+ }
+ if($beginParenthesis == $endParenthesis) {
+ push @allattrs, $at_string;
+ $at = 0;
+ $at_string = "";
+ $endParenthesis = 0;
+ $beginParenthesis = 0;
+ }
+ }
+
+ if (/^attribute[t|T]ype/) {
+ my $line = $_;
+ push @allattrsLineNumber, $lineNumber; # keep starting line number
+ for(my $i=0;$ i < length($line); $i++) {
+ $beginParenthesis++ if(substr ($line, $i, 1) eq "(");
+ $endParenthesis++ if(substr ($line, $i, 1) eq ")");
+ }
+ if($beginParenthesis == $endParenthesis && $beginParenthesis != 0) {
+ push @allattrs, $line;
+ $endParenthesis = 0;
+ $beginParenthesis = 0;
+ } else {
+ $at_string = $line;
+ $at = 1;
+ }
+ }
+
+ #####################################
+
+ if($oc) {
+ s/ +/ /;
+ s/\t/ /;
+
+ $oc_string .= $_;
+ $endParenthesis = 0; # best methode to accept an elements :
+ $beginParenthesis = 0; # left parenthesis sum == right parenthesis sum, so we are sure to
+ for(my $i=0;$ i < length($oc_string); $i++) { # have an element.
+ $beginParenthesis++ if(substr ($oc_string, $i, 1) eq "(");
+ $endParenthesis++ if(substr ($oc_string, $i, 1) eq ")");
+ }
+ if($beginParenthesis == $endParenthesis) {
+ push @allobjc, $oc_string;
+ $oc = 0;
+ $oc_string = "";
+ $endParenthesis = 0;
+ $beginParenthesis = 0;
+ }
+ }
+
+ if (/^object[c|C]lass/) {
+ my $line = $_;
+ push @allobjcLineNumber, $lineNumber; # keep starting line number
+ for(my $i=0;$ i < length($line); $i++) {
+ $beginParenthesis++ if(substr ($line, $i, 1) eq "(");
+ $endParenthesis++ if(substr ($line, $i, 1) eq ")");
+ }
+ if($beginParenthesis == $endParenthesis && $beginParenthesis != 0) {
+ push @allobjc, $line;
+ $endParenthesis = 0;
+ $beginParenthesis = 0;
+ } else {
+ $oc_string = $line;
+ $oc = 1;
+ }
+ }
+ }
+
+ # Parsing attribute elements
+
+ for(@allattrs) {
+ s/\n/ /g;
+ s/\r//g;
+ s/ +/ /g;
+ s/\t/ /g;
+ $result->{attributes}->[$idx]->{DATA} = $_ if($optionBadEntries); # keep original data
+ $result->{attributes}->[$idx]->{LINENUMBER} = $allattrsLineNumber[$idx];
+ $result->{attributes}->[$idx]->{OID} = $1 if (m/^attribute[t|T]ypes?:?\s*\(?\s*([\.\d]*?)\s+/);
+ $result->{attributes}->[$idx]->{NAME} = $1 if (m/NAME\s+('.*?')\s*/ || m/NAME\s+(\(.*?\))/);
+ $result->{attributes}->[$idx]->{DESC} = $1 if (m/DESC\s+'(.*?)'\s*/);
+ $result->{attributes}->[$idx]->{OBSOLETE} = "OBSOLETE" if (m/OBSOLETE/);
+ $result->{attributes}->[$idx]->{SUP} = $1 if (m/SUP\s+(.*?)\s/);
+ $result->{attributes}->[$idx]->{EQUALITY} = $1 if (m/EQUALITY\s+(.*?)\s/);
+ $result->{attributes}->[$idx]->{ORDERING} = $1 if (m/ORDERING\s+(.*?)\s/);
+ $result->{attributes}->[$idx]->{SUBSTR} = $1 if (m/SUBSTR\s+(.*?)\s/);
+ $result->{attributes}->[$idx]->{SYNTAX} = $1 if (m/SYNTAX\s+(.*?)(\s|\))/);
+ $result->{attributes}->[$idx]->{SINGLEVALUE} = "SINGLE-VALUE" if (m/SINGLE-VALUE/);
+ $result->{attributes}->[$idx]->{COLLECTIVE} = "COLLECTIVE" if (m/COLLECTIVE/);
+ $result->{attributes}->[$idx]->{USAGE} = $1 if (m/USAGE\s+(.*?)\s/);
+ $result->{attributes}->[$idx]->{NOUSERMOD} = "NO-USER-MODIFICATION" if (m/NO-USER-MODIFICATION/);
+ $idx ++;
+ }
+
+ $idx = 0;
+
+ # Parsing object class elements
+
+ for(@allobjc) {
+ s/\n/ /g;
+ s/\r//g;
+ s/ +/ /g;
+ s/\t/ /g;
+ $result->{objectclass}->[$idx]->{DATA} = $_ if($optionBadEntries); # keep original data
+ $result->{objectclass}->[$idx]->{LINENUMBER} = $allobjcLineNumber[$idx];
+ $result->{objectclass}->[$idx]->{OID} = $1 if (m/^object[c|C]lasse?s?:?\s*\(?\s*([\.\d]*?)\s+/);
+ $result->{objectclass}->[$idx]->{NAME} = $1 if (m/NAME\s+('.*?')\s*/ || m/NAME\s+(\(.*?\))/);
+ $result->{objectclass}->[$idx]->{DESC} = $1 if (m/DESC\s+'(.*?)'\s*/);
+ $result->{objectclass}->[$idx]->{OBSOLETE} = "OBSOLETE" if (m/OBSOLETE/);
+ $result->{objectclass}->[$idx]->{SUP} = $1 if (m/SUP\s+([^()]+?)\s/ || m/SUP\s+(\(.+?\))\s/);
+ $result->{objectclass}->[$idx]->{TYPE} = $1 if (m/((?:STRUCTURAL)|(?:AUXILIARY)|(?:ABSTRACT))/);
+ $result->{objectclass}->[$idx]->{MUST} = $1 if (m/MUST\s+(\w+)\)?/ || m/MUST\s+(\(.*?\))(\s|\))/s);
+ $result->{objectclass}->[$idx]->{MAY} = $1 if (m/MAY\s+(\w+)\)?/ || m/MAY\s+(\(.*?\))(\s|\))/s);
+
+ $idx++;
+ }
+
+ return $result;
+}
+
+sub getFile {
+ my @data;
+ my $file = shift;
+ die "File not found : $file\n" if(! -e $file);
+ open FH, $file;
+ @data = <FH>;
+ close FH;
+ @data;
+}
+
diff --git a/examples/LDAP/samba.schema b/examples/LDAP/samba.schema
index 549a7088623..8f82dddeb38 100644
--- a/examples/LDAP/samba.schema
+++ b/examples/LDAP/samba.schema
@@ -457,6 +457,17 @@ attributetype ( 1.3.6.1.4.1.7165.2.1.67 NAME 'sambaRefuseMachinePwdChange'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
+#
+attributetype ( 1.3.6.1.4.1.7165.2.1.68 NAME 'sambaClearTextPassword'
+ DESC 'Clear text password (used for trusted domain passwords)'
+ EQUALITY octetStringMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )
+
+#
+attributetype ( 1.3.6.1.4.1.7165.2.1.69 NAME 'sambaPreviousClearTextPassword'
+ DESC 'Previous clear text password (used for trusted domain passwords)'
+ EQUALITY octetStringMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )
@@ -501,6 +512,16 @@ objectclass ( 1.3.6.1.4.1.7165.2.2.14 NAME 'sambaTrustPassword' SUP top STRUCTUR
MAY ( sambaSID $ sambaPwdLastSet ))
##
+## Trust password for trusted domains
+## (to be stored beneath the trusting sambaDomain object in the DIT)
+##
+objectclass ( 1.3.6.1.4.1.7165.2.2.15 NAME 'sambaTrustedDomainPassword' SUP top STRUCTURAL
+ DESC 'Samba Trusted Domain Password'
+ MUST ( sambaDomainName $ sambaSID $
+ sambaClearTextPassword $ sambaPwdLastSet )
+ MAY ( sambaPreviousClearTextPassword ))
+
+##
## Whole-of-domain info
##
objectclass ( 1.3.6.1.4.1.7165.2.2.5 NAME 'sambaDomain' SUP top STRUCTURAL
diff --git a/examples/libmsrpc/cacusermgr/Makefile b/examples/libmsrpc/cacusermgr/Makefile
deleted file mode 100644
index ab8bea410ed..00000000000
--- a/examples/libmsrpc/cacusermgr/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-CC=gcc
-INCLUDES= -I`pwd` -I../../../source/ -I../../../source/include -I../../../source/ubiqx
-
-DEFS= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-
-CFLAGS= -g -Wall -ansi $(INCLUDES)
-
-OBJ= util.o mgr_group.o mgr_user.o
-
-LDFLAGS=-L. -L../../bin/
-LIBS=../../../source/bin/libmsrpc.so
-
-all: cacusermgr
-
-cacusermgr: cacusermgr.o $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(OBJ) $(LIBS)
-
-.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
-
-clean:
- rm -f *.o cacusermgr
diff --git a/examples/libmsrpc/cacusermgr/cacusermgr.c b/examples/libmsrpc/cacusermgr/cacusermgr.c
deleted file mode 100644
index 43c789b8721..00000000000
--- a/examples/libmsrpc/cacusermgr/cacusermgr.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * cacusermgr main implementation.
- *
- * Copyright (C) Chris Nicholls 2005
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#include "cacusermgr.h"
-
-#define DEFAULT_MENU_LINES 15
-
-
-void create_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd) {
- struct SamCreateUser cu;
- struct SamCreateGroup cg;
-
- fstring in;
- fstring tmp;
-
- if(!hnd || !mem_ctx || !dom_hnd) {
- printf("No Handle to SAM.\n");
- return;
- }
-
- /*the menu*/
- in[0] = '\0';
- while(in[0] != 'c' && in[0] != 'C' && in[0] != 'q' && in[0] != 'Q') {
- printf("\n");
- printf("[u] Create User\n");
- printf("[g] Create Group\n");
- printf("[m] Create Machine Account\n");
- printf("[c] Cancel\n\n");
-
- printf("Command: ");
- mgr_getline(in);
-
- printf("\n");
-
- switch(in[0]) {
- case 'u': /*create user*/
- case 'U':
- ZERO_STRUCT(cu);
- cu.in.dom_hnd = dom_hnd;
- cu.in.acb_mask = ACB_NORMAL;
-
- printf("Enter name: ");
- mgr_getline(tmp);
- cu.in.name = talloc_strdup(mem_ctx, tmp);
-
- if(!cac_SamCreateUser(hnd, mem_ctx, &cu)) {
- printerr("Could not create user.", hnd->status);
- }
- else {
- user_menu(hnd, mem_ctx, dom_hnd, cu.out.user_hnd);
- }
-
- /*this will break the loop and send us back to the main menu*/
- in[0] = 'c';
- break;
-
- case 'g': /*create group*/
- case 'G':
- ZERO_STRUCT(cg);
- cg.in.dom_hnd = dom_hnd;
- cg.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- printf("Enter name: ");
- mgr_getline(tmp);
- cg.in.name = talloc_strdup(mem_ctx, tmp);
-
- if(!cac_SamCreateGroup(hnd, mem_ctx, &cg)) {
- printerr("Could not create group.", hnd->status);
- }
- else {
- group_menu(hnd, mem_ctx, dom_hnd, cg.out.group_hnd);
- }
-
- /*this will break the loop and send us back to the main menu*/
- in[0] = 'c';
- break;
-
- case 'm': /*create machine account*/
- case 'M':
- ZERO_STRUCT(cu);
- cu.in.dom_hnd = dom_hnd;
- cu.in.acb_mask = ACB_WSTRUST;
-
- printf("Enter machine name: ");
- mgr_getline(tmp);
-
- /*make sure we have a $ on the end*/
- if(tmp[strlen(tmp) - 1] != '$')
- cu.in.name = talloc_asprintf(mem_ctx, "%s$", tmp);
- else
- cu.in.name = talloc_strdup(mem_ctx, tmp);
-
- strlower_m(cu.in.name);
-
- printf("Creating account: %s\n", cu.in.name);
-
- if(!cac_SamCreateUser(hnd, mem_ctx, &cu)) {
- printerr("Could not create account.", hnd->status);
- }
- else {
- user_menu(hnd, mem_ctx, dom_hnd, cu.out.user_hnd);
- }
-
- /*this will break the loop and send us back to the main menu*/
- in[0] = 'c';
- break;
-
- case 'c': /*cancel*/
- case 'C':
- case 'q':
- case 'Q':
- /*do nothing*/
- break;
-
- default:
- printf("Invalid option\n");
- }
- }
-
- return;
-}
-
-void main_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd) {
- fstring in;
-
- uint32 rid_type = 0;
-
- struct SamOpenUser openu;
- struct SamOpenGroup openg;
- struct SamEnumUsers enumu;
- struct SamEnumGroups enumg;
- struct SamFlush flush;
-
- char *name = NULL;
- uint32 rid = 0;
-
- if(!hnd || !mem_ctx || !dom_hnd) {
- printf("No handle to SAM.\n");
- return;
- }
-
- /*initialize this here and don't worry about it later*/
- ZERO_STRUCT(flush);
- flush.in.dom_hnd = dom_hnd;
-
- in[0] = '\0';
-
- /*handle the menu and commands*/
- while(in[0] != 'q' && in[0] != 'Q') {
- printf("\n");
-
- printf("[o] Open User or Group\n");
- printf("[c] Create Account or Group\n");
- printf("[u] List Users\n");
- printf("[g] List Groups\n");
- printf("[m] List Machine Accounts\n");
- printf("[q] Quit\n\n");
-
- printf("Command: ");
-
- mgr_getline(in);
-
- printf("\n");
-
- switch(in[0]) {
- case 'o': /*open user or group*/
- case 'O':
- printf("Enter RID or Name: ");
- rid_type = rid_or_name(hnd, mem_ctx, dom_hnd, &rid, &name);
-
- if(rid_type == CAC_USER_RID) {
- ZERO_STRUCT(openu);
- openu.in.dom_hnd = dom_hnd;
- openu.in.rid = rid;
- openu.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenUser(hnd, mem_ctx, &openu))
- printerr("Could not open user.", hnd->status);
- else {
- user_menu(hnd, mem_ctx, dom_hnd, openu.out.user_hnd);
-
- if(!cac_SamFlush(hnd, mem_ctx, &flush)) {
- printerr("Lost handle while flushing SAM.", hnd->status);
- /*we want to quit*/
- in[0] = 'q';
- }
- }
- }
- else if(rid_type == CAC_GROUP_RID) {
- ZERO_STRUCT(openg);
- openg.in.dom_hnd = dom_hnd;
- openg.in.rid = rid;
- openg.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenGroup(hnd, mem_ctx, &openg))
- printerr("Could not open group.", hnd->status);
- else {
- group_menu(hnd, mem_ctx, dom_hnd, openg.out.group_hnd);
-
- if(!cac_SamFlush(hnd, mem_ctx, &flush)) {
- printerr("Lost handle while flushing SAM.", hnd->status);
- /*we want to quit*/
- in[0] = 'q';
- }
- }
- }
- else {
- printf("Unknown RID/Name.\n");
- }
-
- break;
-
- case 'c': /*create account/group*/
- case 'C':
- create_menu(hnd, mem_ctx, dom_hnd);
- if(!cac_SamFlush(hnd, mem_ctx, &flush)) {
- printerr("Lost handle while flushing SAM.", hnd->status);
- /*we want to quit*/
- in[0] = 'q';
- }
- break;
-
- case 'u': /*list users*/
- case 'U':
- ZERO_STRUCT(enumu);
- enumu.in.dom_hnd = dom_hnd;
- enumu.in.acb_mask = ACB_NORMAL;
-
- printf("Users:\n");
- while(cac_SamEnumUsers(hnd, mem_ctx, &enumu)) {
- print_rid_list(enumu.out.rids, enumu.out.names, enumu.out.num_users);
- }
- if(CAC_OP_FAILED(hnd->status))
- printerr("Error occured while enumerating users.", hnd->status);
- break;
-
- case 'g': /*list groups*/
- case 'G':
- ZERO_STRUCT(enumg);
- enumg.in.dom_hnd = dom_hnd;
-
- while(cac_SamEnumGroups(hnd, mem_ctx, &enumg)) {
- print_rid_list( enumg.out.rids, enumg.out.names, enumg.out.num_groups);
- }
-
- if(CAC_OP_FAILED(hnd->status))
- printerr("Error occured while enumerating groups.", hnd->status);
- break;
-
- case 'm': /*list machine accounts*/
- case 'M':
- ZERO_STRUCT(enumu);
- enumu.in.dom_hnd = dom_hnd;
- enumu.in.acb_mask = ACB_WSTRUST;
-
- printf("Users:\n");
- while(cac_SamEnumUsers(hnd, mem_ctx, &enumu)) {
- print_rid_list( enumu.out.rids, enumu.out.names, enumu.out.num_users);
- }
- if(CAC_OP_FAILED(hnd->status))
- printerr("Error occured while enumerating accounts.", hnd->status);
- break;
-
- case 'q': /*quit*/
- case 'Q':
- /*just do nothing*/
- break;
-
- default:
- printf("Invalid Command.\n");
- }
- }
-}
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- struct SamOpenDomain sod;
-
- mem_ctx = talloc_init("cacusermgr");
- if(!mem_ctx) {
- printf("Could not initialize Talloc Context\n");
- exit(-1);
- }
-
- /**first initialize the server handle with what we have*/
- hnd = cac_NewServerHandle(True);
- if(!hnd) {
- printf("Could not create server handle\n");
- exit(-1);
- }
-
- /*fill in the blanks*/
- if(!process_cmd_line(hnd, mem_ctx, argc, argv))
- usage();
-
- if(!cac_Connect(hnd, NULL)) {
- printf("Could not connect to server %s. %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- /*open the domain sam*/
- ZERO_STRUCT(sod);
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- printf("Could not open handle to domain SAM. %s\n", nt_errstr(hnd->status));
- goto cleanup;
- }
-
- main_menu(hnd, mem_ctx, sod.out.dom_hnd);
-
-cleanup:
-
- if(sod.out.dom_hnd)
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
-
- if(sod.out.sam)
- cac_SamClose(hnd, mem_ctx, sod.out.sam);
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
diff --git a/examples/libmsrpc/cacusermgr/cacusermgr.h b/examples/libmsrpc/cacusermgr/cacusermgr.h
deleted file mode 100644
index 84c60eb17cd..00000000000
--- a/examples/libmsrpc/cacusermgr/cacusermgr.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * cacusermgr definitions and includes.
- *
- * Copyright (C) Chris Nicholls 2005
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef CACUSERMGR_H_
-#define CACUSERMGR_H_
-
-#include "libmsrpc.h"
-#include "includes.h"
-
-/*used for the simple pager - mgr_page()*/
-#define DEFAULT_SCREEN_LINES 20
-
-/**************
- * prototypes *
- **************/
-
-/*util.c*/
-void usage();
-int process_cmd_line(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, int argc, char **argv);
-void mgr_getline(fstring line);
-void mgr_page(uint32 line_count);
-uint32 rid_or_name(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, uint32 *rid, char **name);
-char *get_new_password(TALLOC_CTX *mem_ctx);
-void printerr(const char *msg, NTSTATUS status);
-void print_rid_list(uint32 *rids, char **names, uint32 num_rids);
-void print_lookup_records(CacLookupRidsRecord *map, uint32 num_rids);
-int list_groups(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd);
-void list_privs(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info);
-void add_privs(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info);
-void list_users(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd);
-
-void mgr_GetAuthDataFn(const char * pServer,
- const char * pShare,
- char * pWorkgroup,
- int maxLenWorkgroup,
- char * pUsername,
- int maxLenUsername,
- char * pPassword,
- int maxLenPassword);
-
-
-/*mgr_group.c*/
-void group_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *group_hnd);
-
-/*mgr_user.c*/
-void user_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *user_hnd);
-
-#endif /*CACUSERMGR_H_*/
diff --git a/examples/libmsrpc/cacusermgr/mgr_group.c b/examples/libmsrpc/cacusermgr/mgr_group.c
deleted file mode 100644
index 37c89db8133..00000000000
--- a/examples/libmsrpc/cacusermgr/mgr_group.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * cacusermgr group implementation.
- *
- * Copyright (C) Chris Nicholls 2005
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#include "cacusermgr.h"
-
-CacGroupInfo *get_group_info(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *group_hnd) {
- struct SamGetGroupInfo getinfo;
-
- if(!hnd || !mem_ctx ||!group_hnd)
- return NULL;
-
- ZERO_STRUCT(getinfo);
- getinfo.in.group_hnd = group_hnd;
-
- if(!cac_SamGetGroupInfo(hnd, mem_ctx, &getinfo))
- printerr("Could not get group info.", hnd->status);
-
- return getinfo.out.info;
-}
-
-void print_group_info(CacGroupInfo *info) {
- if(!info)
- return;
-
- printf(" Group Name : %s\n", info->name);
- printf(" Description : %s\n", info->description);
- printf(" Number of Members : %d\n", info->num_members);
-}
-
-CacGroupInfo *modify_group_info(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *group_hnd) {
- struct SamSetGroupInfo setinfo;
- CacGroupInfo *info = NULL;
- fstring tmp;
-
- info = get_group_info(hnd, mem_ctx, group_hnd);
-
- if(!info)
- return NULL;
-
- printf("Description [%s]: ", info->description);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->description = talloc_strdup(mem_ctx, tmp);
-
- ZERO_STRUCT(setinfo);
- setinfo.in.group_hnd = group_hnd;
- setinfo.in.info = info;
-
- if(!cac_SamSetGroupInfo(hnd, mem_ctx, &setinfo)) {
- printerr("Could not set info.", hnd->status);
- info = NULL;
- }
-
- return info;
-}
-
-void group_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *group_hnd) {
- CacGroupInfo *info = NULL;
- int rid_type = 0;
-
- fstring in;
-
- char *buf;
-
- struct SamGetGroupMembers getmem;
- struct SamGetNamesFromRids getnames;
- struct SamAddGroupMember add;
- struct SamRemoveGroupMember del;
-
- info = get_group_info(hnd, mem_ctx, group_hnd);
-
- printf("\n");
- print_group_info(info);
-
- while(in[0] != 'b' && in[0] != 'B' && in[0] != 'q' && in[0] != 'Q') {
- printf("\n");
- printf("[m] List Group Members\n");
- printf("[a] Add User To Group\n");
- printf("[r] Remove User From Group\n");
- printf("[l] List Users\n");
- printf("[v] View Group Info\n");
- printf("[d] Set Group Description\n");
- printf("[x] Delete Group\n");
- printf("[b] Back\n\n");
-
- printf("Command: ");
- mgr_getline(in);
-
- printf("\n");
-
- switch(in[0]) {
- case 'a': /*add member to group*/
- case 'A':
- ZERO_STRUCT(add);
- add.in.group_hnd = group_hnd;
-
- printf("Enter RID or Name: ");
- rid_type = rid_or_name(hnd, mem_ctx, dom_hnd, &add.in.rid, &buf);
-
- if(rid_type != CAC_USER_RID) {
- printf("Invalid User.\n");
- break;
- }
-
- if(!cac_SamAddGroupMember(hnd, mem_ctx, &add)) {
- printerr("Could not add user to group.", hnd->status);
- }
- break;
-
- case 'r': /*remove user from group*/
- case 'R':
- ZERO_STRUCT(del);
- del.in.group_hnd = group_hnd;
-
- printf("Enter RID or Name: ");
- rid_type = rid_or_name(hnd, mem_ctx, dom_hnd, &del.in.rid, &buf);
-
- if(rid_type != CAC_USER_RID) {
- printf("Invalid User.\n");
- break;
- }
-
- if(!cac_SamRemoveGroupMember(hnd, mem_ctx, &del)) {
- printerr("Could not remove use from group.", hnd->status);
- }
- break;
-
- case 'l': /*list users*/
- case 'L':
- list_users(hnd, mem_ctx, dom_hnd);
- break;
-
- case 'm': /*list members*/
- case 'M':
- ZERO_STRUCT(getmem);
- getmem.in.group_hnd = group_hnd;
-
- if(!cac_SamGetGroupMembers(hnd, mem_ctx, &getmem)) {
- printerr("Could not get members.", hnd->status);
- break;
- }
-
- ZERO_STRUCT(getnames);
- getnames.in.dom_hnd = dom_hnd;
- getnames.in.rids = getmem.out.rids;
- getnames.in.num_rids = getmem.out.num_members;
-
- if(!cac_SamGetNamesFromRids(hnd, mem_ctx, &getnames)) {
- printerr("Could not lookup names.", hnd->status);
- break;
- }
-
- printf("Group has %d members:\n", getnames.out.num_names);
- print_lookup_records(getnames.out.map, getnames.out.num_names);
-
- break;
-
- case 'd': /*set description*/
- case 'D':
- info = modify_group_info(hnd, mem_ctx, group_hnd);
-
- if(info)
- printf("Set Group Info.\n");
- break;
-
- case 'v': /*view info*/
- case 'V':
- info = get_group_info(hnd, mem_ctx, group_hnd);
- print_group_info(info);
- break;
-
- case 'x': /*delete group*/
- case 'X':
- if(!cac_SamDeleteGroup(hnd, mem_ctx, group_hnd))
- printerr("Could Not Delete Group.", hnd->status);
-
- /*we want to go back to the main menu*/
- in[0] = 'b';
- break;
-
- case 'b': /*back*/
- case 'B':
- case 'q':
- case 'Q':
- break;
-
- default:
- printf("Invalid Command.\n");
- }
- }
-
- cac_SamClose(hnd, mem_ctx, group_hnd);
-}
diff --git a/examples/libmsrpc/cacusermgr/mgr_user.c b/examples/libmsrpc/cacusermgr/mgr_user.c
deleted file mode 100644
index bdae55ddec3..00000000000
--- a/examples/libmsrpc/cacusermgr/mgr_user.c
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * cacusermgr user implementation.
- *
- * Copyright (C) Chris Nicholls 2005
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#include "cacusermgr.h"
-
-void print_user_info(CacUserInfo *info) {
- printf("\n");
- printf(" User Name : %s\n", info->username);
- printf(" Full Name : %s\n", info->full_name);
- printf(" Home Dir : %s\n", info->home_dir);
- printf(" Home Drive : %s\n", info->home_drive);
- printf(" Profile Path : %s\n", info->profile_path);
- printf(" Logon Script : %s\n", info->logon_script);
- printf(" Description : %s\n", info->description);
- printf(" Workstations : %s\n", info->workstations);
- printf(" Remote Dial : %s\n", info->dial);
-
- printf(" Logon Time : %s\n", http_timestring(info->logon_time));
- printf(" Logoff Time : %s\n", http_timestring(info->logoff_time));
- printf(" Kickoff Time : %s\n", http_timestring(info->kickoff_time));
- printf(" Pass last set : %s\n", http_timestring(info->pass_last_set_time));
- printf(" Pass can set : %s\n", http_timestring(info->pass_can_change_time));
- printf(" Pass must set : %s\n", http_timestring(info->pass_must_change_time));
-
- printf(" User RID : 0x%x\n", info->rid);
- printf(" Group RID : 0x%x\n", info->group_rid);
- printf(" User Type : ");
-
- if(info->acb_mask & ACB_NORMAL)
- printf("Normal User\n");
- else if(info->acb_mask & ACB_TEMPDUP)
- printf("Temporary Duplicate Account\n");
- else if(info->acb_mask & ACB_DOMTRUST)
- printf("Inter-Domain Trust Account\n");
- else if(info->acb_mask & ACB_WSTRUST)
- printf("Workstation Trust Account\n");
- else if(info->acb_mask & ACB_SVRTRUST)
- printf("Server Trust Account\n");
- else
- printf("\n");
-
- printf(" Disabled : %s\n", (info->acb_mask & ACB_DISABLED) ? "Yes" : "No");
- printf(" Locked : %s\n", (info->acb_mask & ACB_AUTOLOCK) ? "Yes" : "No");
- printf(" Pass Expires : %s\n", (info->acb_mask & ACB_PWNOEXP) ? "No" : "Yes");
- printf(" Pass Required : %s\n", (info->acb_mask & ACB_PWNOTREQ) ? "No" : "Yes");
-
-}
-
-CacUserInfo *modify_user_info(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *user_hnd) {
- CacUserInfo *info = NULL;
- fstring tmp;
-
- struct SamGetUserInfo getinfo;
- struct SamSetUserInfo setinfo;
-
- ZERO_STRUCT(getinfo);
- ZERO_STRUCT(setinfo);
-
- getinfo.in.user_hnd = user_hnd;
-
- if(!cac_SamGetUserInfo(hnd, mem_ctx, &getinfo)) {
- printerr("Could not get user info.", hnd->status);
- return NULL;
- }
-
- info = getinfo.out.info;
-
- printf("\n");
- printf(" User Name [%s]: ", info->username);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->username = talloc_strdup(mem_ctx, tmp);
-
- printf(" Full Name [%s]: ", info->full_name);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->full_name = talloc_strdup(mem_ctx, tmp);
-
- printf(" Description [%s]: ", info->description);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->description = talloc_strdup(mem_ctx, tmp);
-
- printf(" Home Dir [%s]: ", info->home_dir);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->home_dir = talloc_strdup(mem_ctx, tmp);
-
- printf(" Home Drive [%s]: ", info->home_drive);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->home_drive = talloc_strdup(mem_ctx, tmp);
-
- printf(" Profile Path [%s]: ", info->profile_path);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->profile_path = talloc_strdup(mem_ctx, tmp);
-
- printf(" Logon Script [%s]: ", info->logon_script);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->logon_script = talloc_strdup(mem_ctx, tmp);
-
- printf(" Workstations [%s]: ", info->workstations);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->workstations = talloc_strdup(mem_ctx, tmp);
-
- printf(" Remote Dial [%s]: ", info->dial);
- mgr_getline(tmp);
- if(tmp[0] != '\0')
- info->dial = talloc_strdup(mem_ctx, tmp);
-
- printf(" Disabled [%s] (y/n): ", (info->acb_mask & ACB_DISABLED) ? "Yes" : "No");
- mgr_getline(tmp);
- if(tmp[0] == 'y' || tmp[0] == 'Y')
- info->acb_mask |= ACB_DISABLED;
- else if(tmp[0] == 'n' || tmp[0] == 'N')
- info->acb_mask ^= (info->acb_mask & ACB_DISABLED) ? ACB_DISABLED : 0x0;
-
- printf(" Pass Expires [%s] (y/n): ", (info->acb_mask & ACB_PWNOEXP) ? "No" : "Yes");
- mgr_getline(tmp);
- if(tmp[0] == 'n' || tmp[0] == 'N')
- info->acb_mask |= ACB_PWNOEXP;
- else if(tmp[0] == 'y' || tmp[0] == 'Y')
- info->acb_mask ^= (info->acb_mask & ACB_PWNOEXP) ? ACB_PWNOEXP : 0x0;
-
- printf(" Pass Required [%s] (y/n): ", (info->acb_mask & ACB_PWNOTREQ) ? "No" : "Yes");
- mgr_getline(tmp);
- if(tmp[0] == 'n' || tmp[0] == 'N')
- info->acb_mask |= ACB_PWNOTREQ;
- else if(tmp[0] == 'y' || tmp[0] == 'Y')
- info->acb_mask ^= (info->acb_mask & ACB_PWNOTREQ) ? ACB_PWNOTREQ : 0x0;
-
- setinfo.in.user_hnd = user_hnd;
- setinfo.in.info = info;
-
- if(!cac_SamSetUserInfo(hnd, mem_ctx, &setinfo)) {
- printerr("Could not set user info.", hnd->status);
- }
-
- return info;
-}
-
-void add_user_to_group(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info, POLICY_HND *dom_hnd) {
- int rid_type = 0;
-
- char *tmp = NULL;
-
- struct SamOpenGroup og;
- struct SamAddGroupMember add;
-
- ZERO_STRUCT(og);
- ZERO_STRUCT(add);
-
- printf("Group RID or Name:");
-
- og.in.dom_hnd = dom_hnd;
- og.in.access = MAXIMUM_ALLOWED_ACCESS;
- rid_type = rid_or_name(hnd, mem_ctx, dom_hnd, &og.in.rid, &tmp);
-
- if(!cac_SamOpenGroup(hnd, mem_ctx, &og)) {
- printerr("Could not open group.", hnd->status);
- return;
- }
-
- add.in.group_hnd = og.out.group_hnd;
- add.in.rid = info->rid;
-
- if(!cac_SamAddGroupMember(hnd, mem_ctx, &add)) {
- printerr("Could not add user to group.", hnd->status);
- }
-
- cac_SamClose(hnd, mem_ctx, og.out.group_hnd);
-}
-
-void remove_user_from_group(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info, POLICY_HND *dom_hnd) {
- int rid_type = 0;
-
- char *tmp = NULL;
-
- struct SamOpenGroup og;
- struct SamRemoveGroupMember del;
-
- ZERO_STRUCT(og);
- ZERO_STRUCT(del);
-
- printf("Group RID or Name:");
-
- og.in.dom_hnd = dom_hnd;
- og.in.access = MAXIMUM_ALLOWED_ACCESS;
- rid_type = rid_or_name(hnd, mem_ctx, dom_hnd, &og.in.rid, &tmp);
-
- if(!cac_SamOpenGroup(hnd, mem_ctx, &og)) {
- printerr("Could not open group.", hnd->status);
- return;
- }
-
- del.in.group_hnd = og.out.group_hnd;
- del.in.rid = info->rid;
-
- if(!cac_SamRemoveGroupMember(hnd, mem_ctx, &del)) {
- printerr("Could not add user to group.", hnd->status);
- }
-
- cac_SamClose(hnd, mem_ctx, og.out.group_hnd);
-}
-
-void user_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *user_hnd) {
- fstring in;
-
- struct SamGetUserInfo getinfo;
- struct SamSetPassword setpass;
- struct SamGetGroupsForUser groups;
- struct SamGetNamesFromRids gnfr;
-
- CacUserInfo *info = NULL;
-
- if(!hnd || !mem_ctx || !user_hnd) {
- printf("Must open user.\n");
- return;
- }
-
- /*get the userinfo and print it out*/
- ZERO_STRUCT(getinfo);
- getinfo.in.user_hnd = user_hnd;
-
- if(!cac_SamGetUserInfo(hnd, mem_ctx, &getinfo)) {
- printerr("Could not get info.", hnd->status);
- info = NULL;
- }
- else {
- info = getinfo.out.info;
- print_user_info(info);
- }
-
- /*now deal with the menu*/
- in[0] = '\0';
- while(in[0] != 'b' && in[0] != 'B' && in[0] != 'q' && in[0] != 'Q') {
- printf("\n");
- printf("[s] Set Password\n");
-
- if(info && (info->acb_mask & ACB_DISABLED))
- printf("[e] Enable User\n");
- else if(info)
- printf("[d] Disable User\n");
-
- printf("[v] View User Info\n");
- printf("[m] Modify User Info\n");
- printf("[x] Delete User\n\n");
-
- printf("[g] List Group Membership\n");
- printf("[a] Add User To Group\n");
- printf("[l] List Domain Groups\n");
- printf("[r] Remove User From Group\n\n");
-
- printf("[b] Back\n\n");
-
- printf("Command: ");
- mgr_getline(in);
-
- printf("\n");
-
- switch(in[0]) {
- case 'g': /*list group membership*/
- case 'G':
- ZERO_STRUCT(groups);
- groups.in.user_hnd = user_hnd;
-
- if(!cac_SamGetGroupsForUser(hnd, mem_ctx, &groups)) {
- printerr("Could not get groups.", hnd->status);
- break;
- }
-
- ZERO_STRUCT(gnfr);
- gnfr.in.dom_hnd = dom_hnd;
- gnfr.in.rids = groups.out.rids;
- gnfr.in.num_rids = groups.out.num_groups;
-
- if(!cac_SamGetNamesFromRids(hnd, mem_ctx, &gnfr)) {
- printerr("Could not map RIDs to names.", hnd->status);
- break;
- }
-
- print_lookup_records(gnfr.out.map, gnfr.out.num_names);
-
- break;
- case 's': /*reset password*/
- case 'S':
- ZERO_STRUCT(setpass);
- setpass.in.user_hnd = user_hnd;
- setpass.in.password = get_new_password(mem_ctx);
-
- if(!setpass.in.password) {
- printf("Out of memory.\n");
- break;
- }
-
- if(!cac_SamSetPassword(hnd, mem_ctx, &setpass)) {
- printerr("Could not set password.", hnd->status);
- }
- else {
- printf("Reset password.\n");
- }
- break;
-
- case 'e': /*enable user*/
- case 'E':
- if(info && !(info->acb_mask & ACB_DISABLED))
- break;
-
- if(!cac_SamEnableUser(hnd, mem_ctx, user_hnd)) {
- printerr("Could not enable user.", hnd->status);
- }
- else {
- printf("Enabled User.\n");
- /*toggle the disabled ACB bit in our local copy of the info*/
- info->acb_mask ^= ACB_DISABLED;
- }
- break;
-
- case 'd': /*disable user*/
- case 'D':
- if(info && (info->acb_mask & ACB_DISABLED))
- break;
-
- if(!cac_SamDisableUser(hnd, mem_ctx, user_hnd)) {
- printerr("Could not disable user.", hnd->status);
- }
- else {
- printf("Disabled User.\n");
- /*toggle the disabled ACB bit in our local copy of the info*/
- info->acb_mask ^= ACB_DISABLED;
- }
- break;
-
- case 'v': /*view user info*/
- case 'V':
- ZERO_STRUCT(getinfo);
- getinfo.in.user_hnd = user_hnd;
-
- if(!cac_SamGetUserInfo(hnd, mem_ctx, &getinfo)) {
- printerr("Could not get info.", hnd->status);
- info = NULL;
- }
- else {
- info = getinfo.out.info;
- print_user_info(info);
- }
-
- break;
-
- case 'm': /*modify user info*/
- case 'M':
- info = modify_user_info(hnd, mem_ctx, user_hnd);
-
- if(info)
- printf("Updated user info.\n");
- break;
-
- case 'l': /*list domain groups*/
- case 'L':
- list_groups(hnd, mem_ctx, dom_hnd);
- break;
-
- case 'a': /*add user to group*/
- case 'A':
- add_user_to_group(hnd, mem_ctx, info, dom_hnd);
- break;
-
- case 'r': /*remove user from group*/
- case 'R':
- remove_user_from_group(hnd, mem_ctx, info, dom_hnd);
- break;
-
- case 'x': /*delete user*/
- case 'X':
- if(!cac_SamDeleteUser(hnd, mem_ctx, user_hnd))
- printerr("Could not delete user.", hnd->status);
-
- /*we want to go back to the main menu*/
- in[0] = 'b';
- break;
-
- case 'b': /*back*/
- case 'B':
- case 'q':
- case 'Q':
- /*do nothing*/
- break;
-
- default:
- printf("Invalid command.\n");
- }
- }
-
- /*close the user before returning*/
- cac_SamClose(hnd, mem_ctx, user_hnd);
-}
diff --git a/examples/libmsrpc/cacusermgr/util.c b/examples/libmsrpc/cacusermgr/util.c
deleted file mode 100644
index fa83e9cda94..00000000000
--- a/examples/libmsrpc/cacusermgr/util.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * cacusermgr utility functions.
- *
- * Copyright (C) Chris Nicholls 2005
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#include "cacusermgr.h"
-
-/*prints usage and quits*/
-void usage() {
- printf("Usage:\n");
- printf(" cacusermgr [options] server\n\n");
- printf("options:\n");
- printf(" -u USERNAME Username to login with\n");
- printf(" -d/-w DOMAIN Domain name\n");
- printf(" -D LEVEL Debug level\n");
- printf(" -h Print this message\n");
-
- exit(1);
-}
-
-/*initializes values in the server handle from the command line returns 0 if there is a problem, non-zero if everything is ok*/
-int process_cmd_line(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, int argc, char **argv) {
- char op;
-
- if(!hnd || !mem_ctx || !argc)
- return 0;
-
- while( (op = getopt(argc, argv, "u:U:d:w:W:D:h")) != -1) {
- switch(op) {
- case 'u': /*username*/
- case 'U':
- if(optarg)
- strncpy(hnd->username, optarg, sizeof(fstring));
- else
- usage();
- break;
-
- case 'd': /*domain name*/
- case 'w':
- case 'W':
- if(optarg)
- strncpy(hnd->domain, optarg, sizeof(fstring));
- else
- usage();
- break;
-
- case 'D': /*debug level*/
- if(optarg)
- hnd->debug = atoi(optarg);
- else
- usage();
- break;
-
- case 'h': /*help*/
- usage();
- break;
-
- case '?':
- default:
- printf("Unknown option -%c\n", op);
- usage();
- }
- }
-
- if(optind >= argc)
- usage();
-
- /*whatever is less should be the server*/
- strncpy(hnd->server, argv[optind], sizeof(fstring));
-
- return 1;
-}
-
-void mgr_getline(fstring line) {
-
- fgets(line, sizeof(fstring), stdin);
-
- if(line[strlen(line) - 1] == '\n')
- line[strlen(line) - 1] = '\0';
-
-}
-
-/*this is pretty similar to the other get_auth_data_fn's*/
-void mgr_GetAuthDataFn(const char * pServer,
- const char * pShare,
- char * pWorkgroup,
- int maxLenWorkgroup,
- char * pUsername,
- int maxLenUsername,
- char * pPassword,
- int maxLenPassword)
-
-{
- char temp[sizeof(fstring)];
-
- static char authUsername[sizeof(fstring)];
- static char authWorkgroup[sizeof(fstring)];
- static char authPassword[sizeof(fstring)];
- static char authSet = 0;
-
- char *pass = NULL;
-
- if (authSet)
- {
- strncpy(pWorkgroup, authWorkgroup, maxLenWorkgroup - 1);
- strncpy(pUsername, authUsername, maxLenUsername - 1);
- strncpy(pPassword, authPassword, maxLenPassword - 1);
- }
- else
- {
- if(pWorkgroup[0] != '\0') {
- strncpy(authWorkgroup, pWorkgroup, maxLenWorkgroup - 1);
- }
- else {
- d_printf("Domain: [%s] ", pWorkgroup);
- mgr_getline(pWorkgroup);
-
- if (temp[0] != '\0')
- {
- strncpy(pWorkgroup, temp, maxLenWorkgroup - 1);
- strncpy(authWorkgroup, temp, maxLenWorkgroup - 1);
- }
- }
-
-
- if(pUsername[0] != '\0') {
- strncpy(authUsername, pUsername, maxLenUsername - 1);
- }
- else {
- d_printf("Username: [%s] ", pUsername);
- mgr_getline(pUsername);
-
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
- {
- temp[strlen(temp) - 1] = '\0';
- }
-
- if (temp[0] != '\0')
- {
- strncpy(pUsername, temp, maxLenUsername - 1);
- strncpy(authUsername, pUsername, maxLenUsername - 1);
- }
- }
- if(pPassword[0] != '\0') {
- strncpy(authPassword, pPassword, maxLenPassword - 1);
- }
- else {
- pass = getpass("Password: ");
- if (pass)
- fstrcpy(temp, pass);
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
- {
- temp[strlen(temp) - 1] = '\0';
- }
- if (temp[0] != '\0')
- {
- strncpy(pPassword, temp, maxLenPassword - 1);
- strncpy(authPassword, pPassword, maxLenPassword - 1);
- }
- }
- authSet = 1;
- }
-}
-
-void mgr_page(uint32 line_count) {
-
- if( (line_count % DEFAULT_SCREEN_LINES) != 0)
- return;
-
- printf("--Press enter to continue--\n");
- getchar();
-}
-
-/*reads a line from stdin, figures out if it is a RID or name, gets a CacLookupRidsRecord and then returns the type*/
-uint32 rid_or_name(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, uint32 *rid, char **name) {
- fstring line;
-
- BOOL is_rid = False;
- uint32 rid_type = 0;
-
- struct SamGetNamesFromRids getnames;
- struct SamGetRidsFromNames getrids;
-
- mgr_getline(line);
-
- if(strncmp(line, "0x", 2) == 0) {
- /*then this is a RID*/
- sscanf( (line + 2), "%x", rid);
- is_rid = True;
- }
- else {
- /*then this is a name*/
- *name = talloc_strdup(mem_ctx, line);
- }
-
- if(is_rid) {
- ZERO_STRUCT(getnames);
-
- getnames.in.dom_hnd = dom_hnd;
- getnames.in.rids = rid;
- getnames.in.num_rids = 1;
-
- cac_SamGetNamesFromRids(hnd, mem_ctx, &getnames);
-
- if(getnames.out.num_names > 0)
- rid_type = getnames.out.map[0].type;
-
- }
- else {
- ZERO_STRUCT(getrids);
-
- getrids.in.dom_hnd = dom_hnd;
- getrids.in.names = name;
- getrids.in.num_names = 1;
-
- cac_SamGetRidsFromNames(hnd, mem_ctx, &getrids);
-
- if(getrids.out.num_rids > 0) {
- rid_type = getrids.out.map[0].type;
-
- /*send back the RID so cac_SamOpenXX() doesn't have to look it up*/
- *rid = getrids.out.map[0].rid;
- }
- }
-
- return rid_type;
-}
-
-/*print's out some common error messages*/
-void printerr(const char *msg, NTSTATUS status) {
- if(NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED))
- printf("%s You do not have sufficient rights.\n", msg);
-
- else if(NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER))
- printf("%s No such user.\n", msg);
-
- else if(NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_GROUP))
- printf("%s No such group.\n", msg);
-
- else if(NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS))
- printf("%s User already exists.\n", msg);
-
- else if(NT_STATUS_EQUAL(status, NT_STATUS_GROUP_EXISTS))
- printf("%s Group already exists.\n", msg);
-
- else
- printf("%s %s.\n", msg, nt_errstr(status));
-}
-
-char *get_new_password(TALLOC_CTX *mem_ctx) {
- char *pass1 = NULL;
-
- pass1 = getpass("Enter new password: ");
-
- return talloc_strdup(mem_ctx, pass1);
-}
-
-void print_rid_list(uint32 *rids, char **names, uint32 num_rids) {
- uint32 i = 0;
-
- if(!names || !rids)
- return;
-
- printf(" RID Name\n");
-
- while(i < num_rids) {
- printf("[0x%x] [%s]\n", rids[i], names[i]);
-
- i++;
-
- mgr_page(i);
- }
-}
-
-void print_lookup_records(CacLookupRidsRecord *map, uint32 num_rids) {
- uint32 i = 0;
-
- if(!map)
- return;
-
- printf("RID Name\n");
-
- while(i < num_rids) {
- if(map[i].found) {
- printf("[0x%x] [%s]\n", map[i].rid, map[i].name);
- }
-
- i++;
-
- mgr_page(i);
- }
-}
-
-int list_groups(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd) {
- struct SamEnumGroups eg;
-
- if(!hnd || !mem_ctx || !dom_hnd)
- return 0;
-
- ZERO_STRUCT(eg);
- eg.in.dom_hnd = dom_hnd;
-
- while(cac_SamEnumGroups(hnd, mem_ctx, &eg))
- print_rid_list(eg.out.rids, eg.out.names, eg.out.num_groups);
-
- if(CAC_OP_FAILED(hnd->status)) {
- printerr("Could not enumerate groups.", hnd->status);
- return 0;
- }
-
- return 1;
-}
-
-void list_users(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd) {
- struct SamEnumUsers eu;
-
- if(!hnd || !mem_ctx || !dom_hnd)
- return;
-
- ZERO_STRUCT(eu);
- eu.in.dom_hnd = dom_hnd;
-
- while(cac_SamEnumUsers(hnd, mem_ctx, &eu))
- print_rid_list(eu.out.rids, eu.out.names, eu.out.num_users);
-
- if(CAC_OP_FAILED(hnd->status))
- printerr("Could not enumerate users.", hnd->status);
-}
diff --git a/examples/libmsrpc/test/Makefile b/examples/libmsrpc/test/Makefile
deleted file mode 100644
index 95fa5effa58..00000000000
--- a/examples/libmsrpc/test/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-CC=gcc
-INCLUDES= -I`pwd` -I../../../source/ -I../../../source/include -I../../../source/ubiqx
-
-DEFS= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-#CFLAGS= -O -D_SAMBA_BUILD_ -gstabs -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER -Wdeclaration-after-statement -g $(INCLUDES) $(DEFS) -fPIC
-
-CFLAGS= -g -Wall -ansi $(INCLUDES)
-
-LDFLAGS=-L. -L../../bin/
-LIBS=../../../source/bin/libmsrpc.so
-
-TESTS= lsapol lsaq lsaenum lsaenumprivs lsapriv ear \
- regkey regopenkey regkeyenum regvalenum regsetval regqueryval regdelete security \
- adduser samenum samlookup samgroup enable disable dominfo samuser \
- svc \
- smbc
-
-all: $(TESTS)
-
-lsapol: lsa/lsapol.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-lsapriv: lsa/lsapriv.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-lsaq: lsa/lsaq.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-lsaenum: lsa/lsaenum.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-lsaenumprivs: lsa/lsaenumprivs.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-lsaaddrights: lsa/lsaaddrights.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-ear: lsa/ear.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-regkey: reg/regkey.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-regopenkey: reg/regopenkey.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-regkeyenum: reg/regkeyenum.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-regkeycreate: reg/regkeycreate.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-
-regvalenum: reg/regvalenum.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-regsetval: reg/regsetval.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-regqueryval: reg/regqueryval.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-regdelete: reg/regdelete.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-security: reg/security.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-adduser: sam/adduser.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-samenum: sam/samenum.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-samlookup: sam/samlookup.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-samgroup: sam/samgroup.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-enable: sam/enable.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-disable: sam/disable.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-samuser: sam/samuser.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-dominfo: sam/dominfo.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-svc: svcctl/svc.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS)
-
-smbc: smbc_test/smbc.o test_util.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< test_util.o $(LIBS) ../../../source/bin/libsmbclient.so
-
-clean:
- rm -f $(TESTS) *.o lsa/*.o reg/*.o sam/*.o
diff --git a/examples/libmsrpc/test/README b/examples/libmsrpc/test/README
deleted file mode 100644
index 9352905b5b5..00000000000
--- a/examples/libmsrpc/test/README
+++ /dev/null
@@ -1,8 +0,0 @@
-This code was written to test the different library functions. However, a simple example of almost every libmsrpc call can be found
-in this code.
-
-notes: most of the programs use a modified smbc_get_auth_data_fn which will not prompt for a user/domain/password so expect flaky results
-if you run the tests with just a server, ie: svc remote_machine
-
-
-If you get errors about the libmsrpc.so object, make sure your LD_LIBRARY_PATH points to /path/to/samba3/source/bin
diff --git a/examples/libmsrpc/test/lsa/ear.c b/examples/libmsrpc/test/lsa/ear.c
deleted file mode 100644
index 8a8202543da..00000000000
--- a/examples/libmsrpc/test/lsa/ear.c
+++ /dev/null
@@ -1,261 +0,0 @@
-/* connects to an LSA, asks for a list of server names, prints out their sids, then looks up their names from the sids and prints them out again
- * if you run as lsaq -p, then it will simulate a partial success for cac_GetNamesFromSids. It will try to lookup the server's local and domain sids
- */
-
-
-#include "libmsrpc.h"
-#include "includes.h"
-
-void fill_conn_info(CacServerHandle *hnd) {
- pstring domain;
- pstring username;
- pstring password;
- pstring server;
-
- fprintf(stdout, "Enter domain name: ");
- fscanf(stdin, "%s", domain);
-
- fprintf(stdout, "Enter username: ");
- fscanf(stdin, "%s", username);
-
- fprintf(stdout, "Enter password (no input masking): ");
- fscanf(stdin, "%s", password);
-
- fprintf(stdout, "Enter server (ip or name): ");
- fscanf(stdin, "%s", server);
-
- hnd->domain = SMB_STRDUP(domain);
- hnd->username = SMB_STRDUP(username);
- hnd->password = SMB_STRDUP(password);
- hnd->server = SMB_STRDUP(server);
-}
-
-void get_server_names(TALLOC_CTX *mem_ctx, int *num_names, char ***names) {
- int i = 0;
- pstring tmp;
-
- fprintf(stdout, "How many names do you want to lookup?: ");
- fscanf(stdin, "%d", num_names);
-
- *names = TALLOC_ARRAY(mem_ctx, char *, *num_names);
- if(*names == NULL) {
- fprintf(stderr, "No memory for allocation\n");
- exit(-1);
- }
-
- for(i = 0; i < *num_names; i++) {
- fprintf(stdout, "Enter name: ");
- fscanf(stdin, "%s", tmp);
- (*names)[i] = talloc_strdup(mem_ctx, tmp);
- }
-}
-
-int main(int argc, char **argv) {
- int i;
- int result;
- char **names;
- int num_names;
- int num_sids;
- CacServerHandle *hnd = NULL;
- POLICY_HND *lsa_pol = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- DOM_SID *sid_buf = NULL;
-
- BOOL sim_partial = False;
-
- if(argc > 1 && strcmp(argv[1], "-p") == 0)
- sim_partial = True;
-
- mem_ctx = talloc_init("lsaq");
-
- hnd = cac_NewServerHandle(False);
-
- fill_conn_info(hnd);
-
- get_server_names(mem_ctx, &num_names, &names);
-
- /*connect to the PDC and open a LSA handle*/
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error %s.\n", nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- fprintf(stdout, "Connected to server: %s\n", hnd->server);
-
- struct LsaOpenPolicy lop;
- ZERO_STRUCT(lop);
-
- lop.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
- lop.in.security_qos = True;
-
- if(!cac_LsaOpenPolicy(hnd, mem_ctx, &lop)) {
- fprintf(stderr, "Could not get lsa policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- fprintf(stdout, "Opened Policy Handle\n");
-
- /*just to make things neater*/
- lsa_pol = lop.out.pol;
-
- /*fetch the local sid and domain sid for the pdc*/
-
- struct LsaFetchSid fsop;
- ZERO_STRUCT(fsop);
-
- fsop.in.pol = lsa_pol;
- fsop.in.info_class = (CAC_LOCAL_INFO|CAC_DOMAIN_INFO);
-
- fprintf(stdout, "fetching SID info for %s\n", hnd->server);
-
- result = cac_LsaFetchSid(hnd, mem_ctx, &fsop);
- if(!result) {
- fprintf(stderr, "Could not get sid for server: %s\n. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
- exit(-1);
- }
-
- if(result == CAC_PARTIAL_SUCCESS) {
- fprintf(stdout, "could not retrieve both domain and local information\n");
- }
-
-
- fprintf(stdout, "Fetched SID info for %s\n", hnd->server);
- if(fsop.out.local_sid != NULL)
- fprintf(stdout, " domain: %s. Local SID: %s\n", fsop.out.local_sid->domain, sid_string_static(&fsop.out.local_sid->sid));
-
- if(fsop.out.domain_sid != NULL)
- fprintf(stdout, " domain: %s, Domain SID: %s\n", fsop.out.domain_sid->domain, sid_string_static(&fsop.out.domain_sid->sid));
-
- fprintf(stdout, "Looking up sids\n");
-
-
- struct LsaGetSidsFromNames gsop;
- ZERO_STRUCT(gsop);
-
- gsop.in.pol = lsa_pol;
- gsop.in.num_names = num_names;
- gsop.in.names = names;
-
- result = cac_LsaGetSidsFromNames(hnd, mem_ctx, &gsop);
-
- if(!result) {
- fprintf(stderr, "Could not lookup any sids!\n Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- if(result == CAC_PARTIAL_SUCCESS) {
- fprintf(stdout, "Not all names could be looked up.\nThe following names were not found:\n");
-
- for(i = 0; i < (num_names - gsop.out.num_found); i++) {
- fprintf(stdout, " %s\n", gsop.out.unknown[i]);
- }
-
- fprintf(stdout, "\n");
- }
-
- /*buffer the sids so we can look them up back to names*/
- num_sids = (sim_partial) ? gsop.out.num_found + 2: gsop.out.num_found;
- sid_buf = TALLOC_ARRAY(mem_ctx, DOM_SID, num_sids);
-
- fprintf(stdout, "%d names were resolved: \n", gsop.out.num_found);
-
-
- i = 0;
- while(i < gsop.out.num_found) {
- fprintf(stdout, " Name: %s\n SID: %s\n\n", gsop.out.sids[i].name, sid_string_static(&gsop.out.sids[i].sid));
-
- sid_buf[i] = gsop.out.sids[i].sid;
-
- printf("Attempting to open account\n");
-
- struct LsaOpenAccount loa;
- ZERO_STRUCT(loa);
-
- loa.in.pol = lsa_pol;
- loa.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
- loa.in.sid = &gsop.out.sids[i].sid;
-
- if(!cac_LsaOpenAccount(hnd, mem_ctx, &loa)) {
- fprintf(stderr, "Could not open account.\n Error: %s\n", nt_errstr(hnd->status));
- }
-
- printf("\nEnumerating privs:");
- struct LsaEnumAccountRights earop;
- ZERO_STRUCT(earop);
-
- earop.in.pol = lsa_pol;
-
- earop.in.sid = &gsop.out.sids[i].sid;
-
- if(!cac_LsaEnumAccountRights(hnd, mem_ctx, &earop)) {
- fprintf(stderr, "Could not enumerate account rights.\n Error: %s\n", nt_errstr(hnd->status));
- }
-
- int j;
- printf( "Rights: ");
- for(j = 0; j < earop.out.num_privs; j++) {
- printf(" %s\n", earop.out.priv_names[j]);
- }
-
- printf("\n");
-
-
- i++;
- }
-
- /*if we want a partial success to occur below, then add the server's SIDs to the end of the array*/
- if(sim_partial) {
- sid_buf[i] = fsop.out.local_sid->sid;
- sid_buf[i+1] = fsop.out.domain_sid->sid;
- }
-
- fprintf(stdout, "Looking up Names from SIDs\n");
-
- struct LsaGetNamesFromSids gnop;
- ZERO_STRUCT(gnop);
-
- gnop.in.pol = lsa_pol;
- gnop.in.num_sids = num_sids;
- gnop.in.sids = sid_buf;
-
- result = cac_LsaGetNamesFromSids(hnd, mem_ctx, &gnop);
-
- if(!result) {
- fprintf(stderr, "Could not lookup any names!.\n Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- if(result == CAC_PARTIAL_SUCCESS) {
- fprintf(stdout, "\nNot all SIDs could be looked up.\n. The following SIDs were not found:\n");
-
- for(i = 0; i < (num_sids - gnop.out.num_found); i++) {
- fprintf(stdout, "SID: %s\n", sid_string_static(&gnop.out.unknown[i]));
- }
-
- fprintf(stdout, "\n");
- }
-
- fprintf(stdout, "%d SIDs were resolved: \n", gnop.out.num_found);
- for(i = 0; i < gnop.out.num_found; i++) {
- fprintf(stdout, " SID: %s\n Name: %s\n", sid_string_static(&gnop.out.sids[i].sid), gsop.out.sids[i].name);
- }
-
-done:
-
- if(!cac_LsaClosePolicy(hnd, mem_ctx, lsa_pol)) {
- fprintf(stderr, "Could not close LSA policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- fprintf(stdout, "Closed Policy handle.\n");
- }
-
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
-
- return 0;
-}
diff --git a/examples/libmsrpc/test/lsa/lsaenum.c b/examples/libmsrpc/test/lsa/lsaenum.c
deleted file mode 100644
index d4ad4f73aa8..00000000000
--- a/examples/libmsrpc/test/lsa/lsaenum.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*enumerates SIDs*/
-
-#include "libmsrpc.h"
-#include "includes.h"
-
-int main(int argc, char **argv) {
-
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- POLICY_HND *pol = NULL;
-
- int i;
- int max_sids;
-
- mem_ctx = talloc_init("lsaenum");
-
- hnd = cac_NewServerHandle(True);
-
- printf("Enter server to connect to: ");
- fscanf(stdin, "%s", hnd->server);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s.\n errno: %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- printf("How many sids do you want to grab at a time? ");
- fscanf(stdin, "%d", &max_sids);
-
- struct LsaOpenPolicy lop;
- ZERO_STRUCT(lop);
-
- lop.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
- lop.in.security_qos = True;
-
-
- if(!cac_LsaOpenPolicy(hnd, mem_ctx, &lop)) {
- fprintf(stderr, "Could not open policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- pol = lop.out.pol;
-
-
- struct LsaEnumSids esop;
- ZERO_STRUCT(esop);
- esop.in.pol = pol;
- /*grab a couple at a time to demonstrate multiple calls*/
- esop.in.pref_max_sids = max_sids;
-
- printf("Attempting to fetch SIDs %d at a time\n", esop.in.pref_max_sids);
-
- while(cac_LsaEnumSids(hnd, mem_ctx, &esop)) {
-
- printf("\nEnumerated %d sids: \n", esop.out.num_sids);
- for(i = 0; i < esop.out.num_sids; i++) {
- printf(" SID: %s\n", sid_string_static(&esop.out.sids[i]));
- }
-
- printf("Resolving names\n");
-
- struct LsaGetNamesFromSids gnop;
- ZERO_STRUCT(gnop);
-
- gnop.in.pol = pol;
- gnop.in.sids = esop.out.sids;
- gnop.in.num_sids = esop.out.num_sids;
-
- if(!cac_LsaGetNamesFromSids(hnd, mem_ctx, &gnop)) {
- fprintf(stderr, "Could not resolve names.\n Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- printf("\nResolved %d names: \n", gnop.out.num_found);
- for(i = 0; i < gnop.out.num_found; i++) {
- printf(" SID: %s\n", sid_string_static(&gnop.out.sids[i].sid));
- printf(" Name: %s\n", gnop.out.sids[i].name);
- }
-
- /*clean up a little*/
- talloc_free(gnop.out.sids);
- }
-
-done:
- if(!cac_LsaClosePolicy(hnd, mem_ctx, pol)) {
- fprintf(stderr, "Could not close policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- }
-
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
-
- return 0;
-}
diff --git a/examples/libmsrpc/test/lsa/lsaenumprivs.c b/examples/libmsrpc/test/lsa/lsaenumprivs.c
deleted file mode 100644
index 8b5c9deca6b..00000000000
--- a/examples/libmsrpc/test/lsa/lsaenumprivs.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*enumerates privileges*/
-
-#include "libmsrpc.h"
-#include "includes.h"
-
-#define MAX_STRING_LEN 50;
-
-int main() {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
- POLICY_HND *lsa_pol = NULL;
-
- int i;
-
- mem_ctx = talloc_init("lsatrust");
-
- hnd = cac_NewServerHandle(True);
-
- printf("Server: ");
- fscanf(stdin, "%s", hnd->server);
-
- printf("Connecting to server....\n");
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s\n errno %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- printf("Connected to server\n");
-
- struct LsaOpenPolicy lop;
- ZERO_STRUCT(lop);
-
- lop.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
- lop.in.security_qos = True;
-
-
- if(!cac_LsaOpenPolicy(hnd, mem_ctx, &lop)) {
- fprintf(stderr, "Could not open policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- lsa_pol = lop.out.pol;
-
- printf("Enumerating Privileges\n");
-
- struct LsaEnumPrivileges ep;
- ZERO_STRUCT(ep);
-
- ep.in.pol = lsa_pol;
- ep.in.pref_max_privs = 50;
-
- while(cac_LsaEnumPrivileges(hnd, mem_ctx, &ep)) {
- printf(" Enumerated %d privileges\n", ep.out.num_privs);
-
- for(i = 0; i < ep.out.num_privs; i++) {
- printf("\"%s\"\n", ep.out.priv_names[i]);
- }
-
- printf("\n");
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- fprintf(stderr, "Error while enumerating privileges.\n Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
-done:
- if(!cac_LsaClosePolicy(hnd, mem_ctx, lsa_pol)) {
- fprintf(stderr, "Could not close policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- }
-
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
-
- return 0;
-}
diff --git a/examples/libmsrpc/test/lsa/lsapol.c b/examples/libmsrpc/test/lsa/lsapol.c
deleted file mode 100644
index 58407e4343b..00000000000
--- a/examples/libmsrpc/test/lsa/lsapol.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* simple test code, opens and closes an LSA policy handle using libmsrpc, careful.. there's no password input masking*/
-
-#include "includes.h"
-#include "libmsrpc.h"
-
-void fill_conn_info(CacServerHandle *hnd) {
- pstring domain;
- pstring username;
- pstring password;
- pstring server;
-
- fprintf(stdout, "Enter domain name: ");
- fscanf(stdin, "%s", domain);
-
- fprintf(stdout, "Enter username: ");
- fscanf(stdin, "%s", username);
-
- fprintf(stdout, "Enter password (no input masking): ");
- fscanf(stdin, "%s", password);
-
- fprintf(stdout, "Enter server (ip or name): ");
- fscanf(stdin, "%s", server);
-
- hnd->domain = SMB_STRDUP(domain);
- hnd->username = SMB_STRDUP(username);
- hnd->password = SMB_STRDUP(password);
- hnd->server = SMB_STRDUP(server);
-}
-
-int main() {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx;
- struct LsaOpenPolicy op;
-
- mem_ctx = talloc_init("lsapol");
-
-
- hnd = cac_NewServerHandle(False);
-
- /*this line is unnecesary*/
- cac_SetAuthDataFn(hnd, cac_GetAuthDataFn);
-
- hnd->debug = 0;
-
- fill_conn_info(hnd);
-
- /*connect to the server, its name/ip is already in the handle so just pass NULL*/
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server. \n Error %s\n errno(%d): %s\n", nt_errstr(hnd->status), errno, strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
- else {
- fprintf(stdout, "Connected to server\n");
- }
-
- op.in.access = GENERIC_EXECUTE_ACCESS;
- op.in.security_qos = True;
-
- /*open the handle*/
- if(!cac_LsaOpenPolicy(hnd, mem_ctx, &op)) {
- fprintf(stderr, "Could not open policy.\n Error: %s.errno: %d.\n", nt_errstr(hnd->status), errno);
- cac_FreeHandle(hnd);
- exit(-1);
- }
- else {
- fprintf(stdout, "Opened Policy handle\n");
- }
-
- /*close the handle*/
- if(!cac_LsaClosePolicy(hnd, mem_ctx, op.out.pol)) {
- fprintf(stderr, "Could not close policy. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- fprintf(stdout, "Closed Policy handle\n");
- }
-
- /*cleanup*/
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- fprintf(stdout, "Free'd server handle\n");
-
- return 0;
-}
-
diff --git a/examples/libmsrpc/test/lsa/lsapriv.c b/examples/libmsrpc/test/lsa/lsapriv.c
deleted file mode 100644
index 80b3ea102f6..00000000000
--- a/examples/libmsrpc/test/lsa/lsapriv.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*tries to set privileges for an account*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-#define BIGGEST_UINT32 0xffffffff
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- struct LsaOpenPolicy lop;
- struct LsaEnumPrivileges ep;
- struct LsaEnumAccountRights ar;
- struct LsaAddPrivileges ap;
-
- fstring tmp;
-
- uint32 i = 0;
-
- mem_ctx = talloc_init("lsapriv");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- ZERO_STRUCT(lop);
-
- lop.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
-
- if(!cac_LsaOpenPolicy(hnd, mem_ctx, &lop)) {
- fprintf(stderr, "Could not open LSA policy. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- /*first enumerate possible privileges*/
- ZERO_STRUCT(ep);
-
- ep.in.pol = lop.out.pol;
- ep.in.pref_max_privs = BIGGEST_UINT32;
-
- printf("Enumerating supported privileges:\n");
- while(cac_LsaEnumPrivileges(hnd, mem_ctx, &ep)) {
- for(i = 0; i < ep.out.num_privs; i++) {
- printf("\t%s\n", ep.out.priv_names[i]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- fprintf(stderr, "Could not enumerate privileges. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- printf("Enter account name: ");
- cactest_readline(stdin, tmp);
-
- ZERO_STRUCT(ar);
-
- ar.in.pol = lop.out.pol;
- ar.in.name = talloc_strdup(mem_ctx, tmp);
-
- printf("Enumerating privileges for %s:\n", ar.in.name);
- if(!cac_LsaEnumAccountRights(hnd, mem_ctx, &ar)) {
- fprintf(stderr, "Could not enumerate privileges. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- printf("Enumerated %d privileges:\n", ar.out.num_privs);
-
- for(i = 0; i < ar.out.num_privs; i++)
- printf("\t%s\n", ar.out.priv_names[i]);
-
- ZERO_STRUCT(ap);
-
- ap.in.pol = lop.out.pol;
- ap.in.name = ar.in.name;
-
- printf("How many privileges will you set: ");
- scanf("%d", &ap.in.num_privs);
-
- ap.in.priv_names = talloc_array(mem_ctx, char *, ap.in.num_privs);
- if(!ap.in.priv_names) {
- fprintf(stderr, "No memory\n");
- goto done;
- }
-
- for(i = 0; i < ap.in.num_privs; i++) {
- printf("Enter priv %d: ", i);
- cactest_readline(stdin, tmp);
-
- ap.in.priv_names[i] = talloc_strdup(mem_ctx, tmp);
- }
-
- if(!cac_LsaSetPrivileges(hnd, mem_ctx, &ap)) {
- fprintf(stderr, "Could not set privileges. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
-done:
- talloc_destroy(mem_ctx);
- cac_FreeHandle(hnd);
-
- return 0;
-
-}
-
diff --git a/examples/libmsrpc/test/lsa/lsaq.c b/examples/libmsrpc/test/lsa/lsaq.c
deleted file mode 100644
index 54c1849bfde..00000000000
--- a/examples/libmsrpc/test/lsa/lsaq.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/* connects to an LSA, asks for a list of server names, prints out their sids, then looks up their names from the sids and prints them out again
- * if you run as lsaq -p, then it will simulate a partial success for cac_GetNamesFromSids. It will try to lookup the server's local and domain sids
- */
-
-
-#include "libmsrpc.h"
-#include "includes.h"
-
-void fill_conn_info(CacServerHandle *hnd) {
- pstring domain;
- pstring username;
- pstring password;
- pstring server;
-
- fprintf(stdout, "Enter domain name: ");
- fscanf(stdin, "%s", domain);
-
- fprintf(stdout, "Enter username: ");
- fscanf(stdin, "%s", username);
-
- fprintf(stdout, "Enter password (no input masking): ");
- fscanf(stdin, "%s", password);
-
- fprintf(stdout, "Enter server (ip or name): ");
- fscanf(stdin, "%s", server);
-
- hnd->domain = SMB_STRDUP(domain);
- hnd->username = SMB_STRDUP(username);
- hnd->password = SMB_STRDUP(password);
- hnd->server = SMB_STRDUP(server);
-}
-
-void get_server_names(TALLOC_CTX *mem_ctx, int *num_names, char ***names) {
- int i = 0;
- pstring tmp;
-
- fprintf(stdout, "How many names do you want to lookup?: ");
- fscanf(stdin, "%d", num_names);
-
- *names = TALLOC_ARRAY(mem_ctx, char *, *num_names);
- if(*names == NULL) {
- fprintf(stderr, "No memory for allocation\n");
- exit(-1);
- }
-
- for(i = 0; i < *num_names; i++) {
- fprintf(stdout, "Enter name: ");
- fscanf(stdin, "%s", tmp);
- (*names)[i] = talloc_strdup(mem_ctx, tmp);
- }
-}
-
-int main(int argc, char **argv) {
- int i;
- int result;
- char **names;
- int num_names;
- int num_sids;
- CacServerHandle *hnd = NULL;
- POLICY_HND *lsa_pol = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- DOM_SID *sid_buf = NULL;
-
- BOOL sim_partial = False;
-
- if(argc > 1 && strcmp(argv[1], "-p") == 0)
- sim_partial = True;
-
- mem_ctx = talloc_init("lsaq");
-
- hnd = cac_NewServerHandle(False);
-
- fill_conn_info(hnd);
-
- get_server_names(mem_ctx, &num_names, &names);
-
- /*connect to the PDC and open a LSA handle*/
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error %s.\n", nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- fprintf(stdout, "Connected to server: %s\n", hnd->server);
-
- struct LsaOpenPolicy lop;
- ZERO_STRUCT(lop);
-
- lop.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
- lop.in.security_qos = True;
-
- if(!cac_LsaOpenPolicy(hnd, mem_ctx, &lop)) {
- fprintf(stderr, "Could not get lsa policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- fprintf(stdout, "Opened Policy Handle\n");
-
- /*just to make things neater*/
- lsa_pol = lop.out.pol;
-
- /*fetch the local sid and domain sid for the pdc*/
-
- struct LsaFetchSid fsop;
- ZERO_STRUCT(fsop);
-
- fsop.in.pol = lsa_pol;
- fsop.in.info_class = (CAC_LOCAL_INFO|CAC_DOMAIN_INFO);
-
- fprintf(stdout, "fetching SID info for %s\n", hnd->server);
-
- result = cac_LsaFetchSid(hnd, mem_ctx, &fsop);
- if(!result) {
- fprintf(stderr, "Could not get sid for server: %s\n. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
- exit(-1);
- }
-
- if(result == CAC_PARTIAL_SUCCESS) {
- fprintf(stdout, "could not retrieve both domain and local information\n");
- }
-
-
- fprintf(stdout, "Fetched SID info for %s\n", hnd->server);
- if(fsop.out.local_sid != NULL)
- fprintf(stdout, " domain: %s. Local SID: %s\n", fsop.out.local_sid->domain, sid_string_static(&fsop.out.local_sid->sid));
-
- if(fsop.out.domain_sid != NULL)
- fprintf(stdout, " domain: %s, Domain SID: %s\n", fsop.out.domain_sid->domain, sid_string_static(&fsop.out.domain_sid->sid));
-
- fprintf(stdout, "\nAttempting to query info policy\n");
-
- struct LsaQueryInfoPolicy qop;
- ZERO_STRUCT(qop);
-
- qop.in.pol = lsa_pol;
-
- if(!cac_LsaQueryInfoPolicy(hnd, mem_ctx, &qop)) {
- fprintf(stderr, "Could not query information policy!.\n Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- fprintf(stdout, "Query result: \n");
- fprintf(stdout, " domain name: %s\n", qop.out.domain_name);
- fprintf(stdout, " dns name: %s\n", qop.out.dns_name);
- fprintf(stdout, " forest name: %s\n", qop.out.forest_name);
- fprintf(stdout, " domain guid: %s\n", smb_uuid_string_static(*qop.out.domain_guid));
- fprintf(stdout, " domain sid: %s\n", sid_string_static(qop.out.domain_sid));
-
- fprintf(stdout, "\nLooking up sids\n");
-
- struct LsaGetSidsFromNames gsop;
- ZERO_STRUCT(gsop);
-
- gsop.in.pol = lsa_pol;
- gsop.in.num_names = num_names;
- gsop.in.names = names;
-
- result = cac_LsaGetSidsFromNames(hnd, mem_ctx, &gsop);
-
- if(!result) {
- fprintf(stderr, "Could not lookup any sids!\n Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- if(result == CAC_PARTIAL_SUCCESS) {
- fprintf(stdout, "Not all names could be looked up.\nThe following names were not found:\n");
-
- for(i = 0; i < (num_names - gsop.out.num_found); i++) {
- fprintf(stdout, " %s\n", gsop.out.unknown[i]);
- }
-
- fprintf(stdout, "\n");
- }
-
- /*buffer the sids so we can look them up back to names*/
- num_sids = (sim_partial) ? gsop.out.num_found + 2: gsop.out.num_found;
- sid_buf = TALLOC_ARRAY(mem_ctx, DOM_SID, num_sids);
-
- fprintf(stdout, "%d names were resolved: \n", gsop.out.num_found);
-
-
- i = 0;
- while(i < gsop.out.num_found) {
- fprintf(stdout, " Name: %s\n SID: %s\n\n", gsop.out.sids[i].name, sid_string_static(&gsop.out.sids[i].sid));
-
- sid_buf[i] = gsop.out.sids[i].sid;
-
- i++;
- }
-
- /*if we want a partial success to occur below, then add the server's SIDs to the end of the array*/
- if(sim_partial) {
- sid_buf[i] = fsop.out.local_sid->sid;
- sid_buf[i+1] = fsop.out.domain_sid->sid;
- }
-
- fprintf(stdout, "Looking up Names from SIDs\n");
-
- struct LsaGetNamesFromSids gnop;
- ZERO_STRUCT(gnop);
-
- gnop.in.pol = lsa_pol;
- gnop.in.num_sids = num_sids;
- gnop.in.sids = sid_buf;
-
- result = cac_LsaGetNamesFromSids(hnd, mem_ctx, &gnop);
-
- if(!result) {
- fprintf(stderr, "Could not lookup any names!.\n Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- if(result == CAC_PARTIAL_SUCCESS) {
- fprintf(stdout, "\nNot all SIDs could be looked up.\n. The following SIDs were not found:\n");
-
- for(i = 0; i < (num_sids - gnop.out.num_found); i++) {
- fprintf(stdout, "SID: %s\n", sid_string_static(&gnop.out.unknown[i]));
- }
-
- fprintf(stdout, "\n");
- }
-
- fprintf(stdout, "%d SIDs were resolved: \n", gnop.out.num_found);
- for(i = 0; i < gnop.out.num_found; i++) {
- fprintf(stdout, " SID: %s\n Name: %s\n", sid_string_static(&gnop.out.sids[i].sid), gsop.out.sids[i].name);
- }
-
-done:
-
- if(!cac_LsaClosePolicy(hnd, mem_ctx, lsa_pol)) {
- fprintf(stderr, "Could not close LSA policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- fprintf(stdout, "Closed Policy handle.\n");
- }
-
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
-
- return 0;
-}
diff --git a/examples/libmsrpc/test/lsa/lsatrust.c b/examples/libmsrpc/test/lsa/lsatrust.c
deleted file mode 100644
index 6ad293f832f..00000000000
--- a/examples/libmsrpc/test/lsa/lsatrust.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*queries trusted domain information*/
-
-#include "libmsrpc.h"
-#include "includes.h"
-
-#define MAX_STRING_LEN 50;
-
-void print_info(LSA_TRUSTED_DOMAIN_INFO *info) {
- switch(info->info_class) {
- case CAC_INFO_TRUSTED_DOMAIN_FULL_INFO:
- case CAC_INFO_TRUSTED_DOMAIN_INFO_ALL:
- printf(" Domain Name: %s\n", unistr2_static(&info->info_ex.domain_name.unistring));
- printf(" Netbios Name: %s\n", unistr2_static(&info->info_ex.netbios_name.unistring));
- printf(" Domain Sid: %s\n", sid_string_static(&info->info_ex.sid.sid));
- printf(" Trust direction: %d\n", info->info_ex.trust_direction);
- printf(" Trust Type: %d\n", info->info_ex.trust_type);
- printf(" Trust attr: %d\n", info->info_ex.trust_attributes);
- printf(" Posix Offset: %d\n", info->posix_offset.posix_offset);
- break;
- }
-}
-
-int main() {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
- POLICY_HND *lsa_pol = NULL;
-
- int i;
-
- mem_ctx = talloc_init("lsatrust");
-
- hnd = cac_NewServerHandle(False);
-
- /*malloc some memory so get_auth_data_fn can work*/
- hnd->username = SMB_MALLOC_ARRAY(char, sizeof(fstring));
- hnd->domain = SMB_MALLOC_ARRAY(char, sizeof(fstring));
- hnd->netbios_name = SMB_MALLOC_ARRAY(char, sizeof(fstring));
- hnd->password = SMB_MALLOC_ARRAY(char, sizeof(fstring));
-
- hnd->server = SMB_MALLOC_ARRAY(char, sizeof(fstring));
-
-
- printf("Server: ");
- fscanf(stdin, "%s", hnd->server);
-
- printf("Connecting to server....\n");
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s\n errno %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- printf("Connected to server\n");
-
- struct LsaOpenPolicy lop;
- ZERO_STRUCT(lop);
-
- lop.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
- lop.in.security_qos = True;
-
-
- if(!cac_LsaOpenPolicy(hnd, mem_ctx, &lop)) {
- fprintf(stderr, "Could not open policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- lsa_pol = lop.out.pol;
-
- printf("Enumerating Trusted Domains\n");
-
- struct LsaEnumTrustedDomains etd;
- ZERO_STRUCT(etd);
-
- etd.in.pol = lsa_pol;
-
- while(cac_LsaEnumTrustedDomains(hnd, mem_ctx, &etd)) {
- printf(" Enumerated %d domains\n", etd.out.num_domains);
-
- for(i = 0; i < etd.out.num_domains; i++) {
- printf(" Name: %s\n", etd.out.domain_names[i]);
- printf(" SID: %s\n", sid_string_static(&etd.out.domain_sids[i]));
-
- printf("\n Attempting to open domain...\n");
-
- struct LsaOpenTrustedDomain otd;
- ZERO_STRUCT(otd);
-
- otd.in.pol = lsa_pol;
- otd.in.domain_sid = &etd.out.domain_sids[i];
- otd.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
-
- /*try to query trusted domain info by name*/
- struct LsaQueryTrustedDomainInfo qtd;
- ZERO_STRUCT(qtd);
-
- qtd.in.pol = lsa_pol;
- qtd.in.domain_name = etd.out.domain_names[i];
-
-
- int j;
- for(j = 0; j < 100; j++ ) {
- qtd.in.info_class = j;
-
- printf(" Querying trustdom by name\n");
- if(!cac_LsaQueryTrustedDomainInfo(hnd, mem_ctx, &qtd)) {
- fprintf(stderr, " could not query trusted domain info.\n Error %s\n", nt_errstr(hnd->status));
- continue;
- }
-
- printf(" info_class %d succeeded\n", j);
- printf(" Query result:\n");
- printf(" size %d\n", sizeof(*qtd.out.info));
- }
-
- /*try to query trusted domain info by SID*/
- printf(" Querying trustdom by sid\n");
- qtd.in.domain_sid = &etd.out.domain_sids[i];
- if(!cac_LsaQueryTrustedDomainInfo(hnd, mem_ctx, &qtd)) {
- fprintf(stderr, " could not query trusted domain info.\n Error %s\n", nt_errstr(hnd->status));
- continue;
- }
-
- printf(" Query result:\n");
-/* print_info(qtd.out.info);*/
-
- if(CAC_OP_FAILED(hnd->status)) {
- fprintf(stderr, " Could not enum sids.\n Error: %s\n", nt_errstr(hnd->status));
- continue;
- }
- }
-
- printf("\n");
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- fprintf(stderr, "Error while enumerating trusted domains.\n Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
-done:
- if(!cac_LsaClosePolicy(hnd, mem_ctx, lsa_pol)) {
- fprintf(stderr, "Could not close policy handle.\n Error: %s\n", nt_errstr(hnd->status));
- }
-
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
-
- return 0;
-}
diff --git a/examples/libmsrpc/test/reg/regdelete.c b/examples/libmsrpc/test/reg/regdelete.c
deleted file mode 100644
index 50b08ba468c..00000000000
--- a/examples/libmsrpc/test/reg/regdelete.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*tests deleting a key or value*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- fstring tmp;
- char input = 'v';
-
- mem_ctx = talloc_init("regdelete");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- printf("enter key to open: \n");
- cactest_readline(stdin, tmp);
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- rok.in.name = talloc_strdup(mem_ctx, tmp);
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s. Error %s\n", rok.in.name, nt_errstr(hnd->status));
- exit(-1);
- }
-
- printf("getting version (just for testing\n");
-
- struct RegGetVersion rgv;
- ZERO_STRUCT(rgv);
-
- rgv.in.key = rok.out.key;
-
- if(!cac_RegGetVersion(hnd, mem_ctx, &rgv))
- fprintf(stderr, "Could not get version. Error: %s\n", nt_errstr(hnd->status));
- else
- printf("Version: %d\n", rgv.out.version);
-
-
- while(input == 'v' || input == 'k') {
- printf("Delete [v]alue [k]ey or [q]uit: ");
- scanf("%c", &input);
-
- switch(input) {
- case 'v':
- printf("Value to delete: ");
- cactest_readline(stdin, tmp);
-
- struct RegDeleteValue rdv;
- ZERO_STRUCT(rdv);
-
- rdv.in.parent_key = rok.out.key;
- rdv.in.name = talloc_strdup(mem_ctx, tmp);
-
- if(!cac_RegDeleteValue(hnd, mem_ctx, &rdv))
- fprintf(stderr, "Could not delete value %s. Error: %s\n", rdv.in.name, nt_errstr(hnd->status));
-
- break;
- case 'k':
- printf("Key to delete: ");
- cactest_readline(stdin, tmp);
-
- struct RegDeleteKey rdk;
- ZERO_STRUCT(rdk);
-
- rdk.in.parent_key = rok.out.key;
- rdk.in.name = talloc_strdup(mem_ctx, tmp);
-
- printf("delete recursively? [y/n]: ");
- cactest_readline(stdin, tmp);
-
- rdk.in.recursive = (tmp[0] == 'y') ? True : False;
-
- if(!cac_RegDeleteKey(hnd, mem_ctx, &rdk))
- fprintf(stderr, "Could not delete key %s. Error %s\n", rdk.in.name, nt_errstr(hnd->status));
-
- break;
- }
- }
- cac_RegClose(hnd, mem_ctx, rok.out.key);
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
-
diff --git a/examples/libmsrpc/test/reg/regkey.c b/examples/libmsrpc/test/reg/regkey.c
deleted file mode 100644
index a90d06c6efe..00000000000
--- a/examples/libmsrpc/test/reg/regkey.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*opens and closes a key*/
-
-#include "libmsrpc.h"
-
-int main() {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- fstring key;
-
- mem_ctx = talloc_init("regkey");
-
- hnd = cac_NewServerHandle(False);
-
- /*allocate some memory so get_auth_data_fn can do it's magic*/
- hnd->username = SMB_MALLOC_ARRAY(char, sizeof(fstring));
- hnd->domain = SMB_MALLOC_ARRAY(char, sizeof(fstring));
- hnd->netbios_name = SMB_MALLOC_ARRAY(char, sizeof(fstring));
- hnd->password = SMB_MALLOC_ARRAY(char, sizeof(fstring));
-
- hnd->server = SMB_MALLOC_ARRAY(char, sizeof(fstring));
-
- printf("Enter server to connect to: ");
- fscanf(stdin, "%s", hnd->server);
-
- printf("Enter key to open: ");
- fscanf(stdin, "%s", key);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s.\n errno: %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- struct RegConnect rc;
- ZERO_STRUCT(rc);
-
- rc.in.access = REG_KEY_ALL;
- rc.in.root = HKEY_LOCAL_MACHINE;
-
- if(!cac_RegConnect(hnd, mem_ctx, &rc)) {
- fprintf(stderr, " Could not connect to registry. %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- printf("trying to open key %s...\n", key);
-
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- rok.in.parent_key = rc.out.key;
- rok.in.name = key;
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s\n Error: %s\n", rok.in.name, nt_errstr(hnd->status));
- goto done;
- }
-
- if(!cac_RegClose(hnd, mem_ctx, rok.out.key)) {
- fprintf(stderr, "Could not close handle %s\n", nt_errstr(hnd->status));
- }
-
- if(!cac_RegClose(hnd, mem_ctx, rc.out.key)) {
- fprintf(stderr, " Could not close handle. %s\n", nt_errstr(hnd->status));
- }
-
-done:
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-
-}
diff --git a/examples/libmsrpc/test/reg/regkeycreate.c b/examples/libmsrpc/test/reg/regkeycreate.c
deleted file mode 100644
index 50764f16822..00000000000
--- a/examples/libmsrpc/test/reg/regkeycreate.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*tests creating a registry key*/
-
-#include "libmsrpc.h"
-
-#define MAX_KEYS_PER_ENUM 3
-
-int main() {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- fstring key_name;
-
- fstring key_to_create;
-
- mem_ctx = talloc_init("regcreatekey");
-
- hnd = cac_NewServerHandle(True);
-
- printf("Enter server to connect to: ");
- fscanf(stdin, "%s", hnd->server);
-
- printf("Enter key to open: ");
- fscanf(stdin, "%s", key_name);
-
- printf("Enter key to create: ");
- fscanf(stdin, "%s", key_to_create);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s.\n errno: %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- printf("trying to open key %s...\n", key_name);
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- rok.in.parent_key = NULL;
- rok.in.name = key_name;
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s\n Error: %s\n", rok.in.name, nt_errstr(hnd->status));
- goto done;
- }
-
- printf("Creating key %s...\n", key_to_create);
-
- struct RegCreateKey rck;
- ZERO_STRUCT(rck);
-
- rck.in.parent_key = rok.out.key;
- rck.in.key_name = talloc_strdup(mem_ctx, key_to_create);
- rck.in.class_name = talloc_strdup(mem_ctx, "");
- rck.in.access = REG_KEY_ALL;
-
- if(!cac_RegCreateKey(hnd, mem_ctx, &rck)) {
- fprintf(stderr, "Could not create key. Error %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- if(!cac_RegClose(hnd, mem_ctx, rck.out.key)) {
- fprintf(stderr, "Could not close key. Error %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- /**enumerate all the subkeys*/
- printf("Enumerating all subkeys:\n");
-
- struct RegEnumKeys ek;
- ZERO_STRUCT(ek);
-
- ek.in.key = rok.out.key;
- ek.in.max_keys = 50;
-
- while(cac_RegEnumKeys(hnd, mem_ctx, &ek)) {
- int j;
-
- for(j = 0; j < ek.out.num_keys; j++) {
- printf(" Key name: %s\n", ek.out.key_names[j]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- fprintf(stderr, "Could not enumerate keys: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- printf("deleting key %s\n", key_to_create);
-
- struct RegDeleteKey rdk;
- ZERO_STRUCT(rdk);
-
- rdk.in.parent_key = rok.out.key;
- rdk.in.name = key_to_create;
-
- if(!cac_RegDeleteKey(hnd, mem_ctx, &rdk)) {
- fprintf(stderr, "Could not delete key. Error %s\n", nt_errstr(hnd->status));
- }
-
- printf("closing key %s...\n", key_name);
-
- if(!cac_RegClose(hnd, mem_ctx, rok.out.key)) {
- fprintf(stderr, "Could not close handle %s\n", nt_errstr(hnd->status));
- }
-
-done:
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-
-}
diff --git a/examples/libmsrpc/test/reg/regkeyenum.c b/examples/libmsrpc/test/reg/regkeyenum.c
deleted file mode 100644
index f140d95723a..00000000000
--- a/examples/libmsrpc/test/reg/regkeyenum.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*tests enumerating keys or values*/
-
-#include "libmsrpc.h"
-
-#define MAX_KEYS_PER_ENUM 3
-
-int main() {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- int num_keys;
-
- int max_enum;
-
- int i;
-
- fstring *key_names;
-
- mem_ctx = talloc_init("regkeyenum");
-
- hnd = cac_NewServerHandle(True);
-
- printf("Enter server to connect to: ");
- fscanf(stdin, "%s", hnd->server);
-
- printf("How many keys do you want to open?: ");
- fscanf(stdin, "%d", &num_keys);
-
- printf("How many keys per enum?: ");
- fscanf(stdin, "%d", &max_enum);
-
- key_names = TALLOC_ARRAY(mem_ctx, fstring , num_keys);
- if(!key_names) {
- fprintf(stderr, "No memory\n");
- exit(-1);
- }
-
- for(i = 0; i < num_keys; i++) {
- printf("Enter key to open: ");
- fscanf(stdin, "%s", key_names[i]);
- }
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s.\n errno: %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- for(i = 0; i < num_keys; i++) {
- printf("trying to open key %s...\n", key_names[i]);
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- rok.in.parent_key = NULL;
- rok.in.name = key_names[i];
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s\n Error: %s\n", rok.in.name, nt_errstr(hnd->status));
- continue;
- }
-
- /**enumerate all the subkeys*/
- printf("Enumerating all subkeys:\n");
-
- struct RegEnumKeys ek;
- ZERO_STRUCT(ek);
-
- ek.in.key = rok.out.key;
- ek.in.max_keys = max_enum;
-
- while(cac_RegEnumKeys(hnd, mem_ctx, &ek)) {
- int j;
-
- for(j = 0; j < ek.out.num_keys; j++) {
- printf(" Key name: %s\n", ek.out.key_names[j]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- fprintf(stderr, "Could not enumerate keys: %s\n", nt_errstr(hnd->status));
- continue;
- }
-
- printf("closing key %s...\n", key_names[i]);
-
- if(!cac_RegClose(hnd, mem_ctx, rok.out.key)) {
- fprintf(stderr, "Could not close handle %s\n", nt_errstr(hnd->status));
- }
- }
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-
-}
diff --git a/examples/libmsrpc/test/reg/regopen.c b/examples/libmsrpc/test/reg/regopen.c
deleted file mode 100644
index fedc52e40d5..00000000000
--- a/examples/libmsrpc/test/reg/regopen.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*opens and closes a registry handle*/
-
-#include "libmsrpc.h"
-
-int main() {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- POLICY_HND **keys = NULL;
-
- char roots[4][50] = { {CAC_HKCR}, {CAC_HKLM}, {CAC_HKU}, {CAC_HKPD} };
-
- int i;
-
-
- mem_ctx = talloc_init("regopen");
-
- hnd = cac_NewServerHandle(True);
-
- keys = TALLOC_ARRAY(mem_ctx, POLICY_HND *, 4);
-
- printf("Enter server to connect to: ");
- fscanf(stdin, "%s", hnd->server);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s.\n errno: %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- struct RegConnect rc;
- ZERO_STRUCT(rc);
-
- rc.in.access = SEC_RIGHT_MAXIMUM_ALLOWED;
-
- for(i = 0; i < 4; i++) {
- printf("opening: %s\n", roots[i]);
-
- rc.in.root = roots[i];
-
- if(!cac_RegConnect(hnd, mem_ctx, &rc)) {
- fprintf(stderr, " Could not connect to registry. %s\n", nt_errstr(hnd->status));
- continue;
- }
-
- keys[i] = rc.out.key;
- }
-
- for(i = 3; i >= 0; i--) {
- if(keys[i] == NULL)
- continue;
-
- printf("closing: %s\n", roots[i]);
-
- if(!cac_RegClose(hnd, mem_ctx, keys[i])) {
- fprintf(stderr, " Could not close handle. %s\n", nt_errstr(hnd->status));
- }
- }
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-
-}
diff --git a/examples/libmsrpc/test/reg/regopenkey.c b/examples/libmsrpc/test/reg/regopenkey.c
deleted file mode 100644
index 732da17ccf3..00000000000
--- a/examples/libmsrpc/test/reg/regopenkey.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*tests cac_RegOpenKey()*/
-
-#include "libmsrpc.h"
-
-int main() {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- int num_keys;
- int i;
-
- fstring *key_names;
-
- mem_ctx = talloc_init("regopenkey");
-
- hnd = cac_NewServerHandle(True);
-
- printf("Enter server to connect to: ");
- fscanf(stdin, "%s", hnd->server);
-
- printf("How many keys do you want to open?: ");
- fscanf(stdin, "%d", &num_keys);
-
- key_names = TALLOC_ARRAY(mem_ctx, fstring , num_keys);
- if(!key_names) {
- fprintf(stderr, "No memory\n");
- exit(-1);
- }
-
- for(i = 0; i < num_keys; i++) {
- printf("Enter key to open: ");
- fscanf(stdin, "%s", key_names[i]);
- }
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s.\n errno: %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- for(i = 0; i < num_keys; i++) {
- printf("trying to open key %s...\n", key_names[i]);
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- rok.in.parent_key = NULL;
- rok.in.name = key_names[i];
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s\n Error: %s\n", rok.in.name, nt_errstr(hnd->status));
- continue;
- }
-
- printf("closing key %s...\n", key_names[i]);
-
- if(!cac_RegClose(hnd, mem_ctx, rok.out.key)) {
- fprintf(stderr, "Could not close handle %s\n", nt_errstr(hnd->status));
- }
- }
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-
-}
diff --git a/examples/libmsrpc/test/reg/regqueryval.c b/examples/libmsrpc/test/reg/regqueryval.c
deleted file mode 100644
index 9989651898d..00000000000
--- a/examples/libmsrpc/test/reg/regqueryval.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*tests cac_RegQueryValue()*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-#define MAX_KEYS_PER_ENUM 3
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- fstring key_name;
-
- fstring val_name;
-
- mem_ctx = talloc_init("regqueryval");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- printf("Enter key to open: ");
- fscanf(stdin, "%s", key_name);
-
- printf("Enter value to query: ");
- fscanf(stdin, "%s", val_name);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s.\n errno: %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- printf("trying to open key %s...\n", key_name);
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- rok.in.parent_key = NULL;
- rok.in.name = key_name;
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s\n Error: %s\n", rok.in.name, nt_errstr(hnd->status));
- goto done;
- }
-
- struct RegQueryValue rqv;
- ZERO_STRUCT(rqv);
-
- rqv.in.key = rok.out.key;
- rqv.in.val_name = talloc_strdup(mem_ctx, val_name);
-
- printf("querying value %s...\n", rqv.in.val_name);
- if(!cac_RegQueryValue(hnd, mem_ctx, &rqv)) {
- fprintf(stderr, "Could not query value. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Queried value %s\n", rqv.in.val_name);
- print_value(rqv.out.type, rqv.out.data);
- }
-
-
- printf("closing key %s...\n", key_name);
-
- if(!cac_RegClose(hnd, mem_ctx, rok.out.key)) {
- fprintf(stderr, "Could not close handle %s\n", nt_errstr(hnd->status));
- }
-
-done:
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-
-}
diff --git a/examples/libmsrpc/test/reg/regsetval.c b/examples/libmsrpc/test/reg/regsetval.c
deleted file mode 100644
index e7327910c26..00000000000
--- a/examples/libmsrpc/test/reg/regsetval.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*tests cac_RegSetVal()*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- fstring tmp;
-
- mem_ctx = talloc_init("regsetval");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- printf("enter key to open: \n");
- scanf("%s", tmp);
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- rok.in.name = talloc_strdup(mem_ctx, tmp);
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s. Error %s\n", rok.in.name, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct RegSetValue rsv;
- ZERO_STRUCT(rsv);
-
- rsv.in.key = rok.out.key;
-
- cactest_reg_input_val(mem_ctx, &rsv.in.type, &rsv.in.val_name, &rsv.in.value);
-
- if(!cac_RegSetValue(hnd, mem_ctx, &rsv)) {
- fprintf(stderr, "Could not set value. Error: %s\n", nt_errstr(hnd->status));
- }
-
- cac_RegClose(hnd, mem_ctx, rok.out.key);
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
-
diff --git a/examples/libmsrpc/test/reg/regvalenum.c b/examples/libmsrpc/test/reg/regvalenum.c
deleted file mode 100644
index 9778f4e2b3c..00000000000
--- a/examples/libmsrpc/test/reg/regvalenum.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*tests enumerating registry values*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-#define MAX_KEYS_PER_ENUM 3
-
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- int num_keys;
-
- int max_enum;
-
- fstring *key_names;
-
- int i;
-
- mem_ctx = talloc_init("regvalenum");
-
- hnd = cac_NewServerHandle(True);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server.\n Error: %s.\n errno: %s\n", nt_errstr(hnd->status), strerror(errno));
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
- printf("How many keys do you want to open?: ");
- fscanf(stdin, "%d", &num_keys);
-
- printf("How many values per enum?: ");
- fscanf(stdin, "%d", &max_enum);
-
- key_names = TALLOC_ARRAY(mem_ctx, fstring , num_keys);
- if(!key_names) {
- fprintf(stderr, "No memory\n");
- exit(-1);
- }
-
- for(i = 0; i < num_keys; i++) {
- printf("Enter key to open: ");
- fscanf(stdin, "%s", key_names[i]);
- }
-
- for(i = 0; i < num_keys; i++) {
- printf("trying to open key %s...\n", key_names[i]);
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- rok.in.parent_key = NULL;
- rok.in.name = key_names[i];
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s\n Error: %s\n", rok.in.name, nt_errstr(hnd->status));
- continue;
- }
-
- /**enumerate all the subkeys*/
- printf("Enumerating all values:\n");
-
- struct RegEnumValues rev;
- ZERO_STRUCT(rev);
-
- rev.in.key = rok.out.key;
- rev.in.max_values = max_enum;
-
- while(cac_RegEnumValues(hnd, mem_ctx, &rev)) {
- int j;
-
- for(j = 0; j < rev.out.num_values; j++) {
- printf(" Value name: %s\n", rev.out.value_names[j]);
- print_value(rev.out.types[j], rev.out.values[j]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- fprintf(stderr, "Could not enumerate values: %s\n", nt_errstr(hnd->status));
- continue;
- }
-
- printf("closing key %s...\n", key_names[i]);
-
- if(!cac_RegClose(hnd, mem_ctx, rok.out.key)) {
- fprintf(stderr, "Could not close handle %s\n", nt_errstr(hnd->status));
- }
- }
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-
-}
diff --git a/examples/libmsrpc/test/reg/security.c b/examples/libmsrpc/test/reg/security.c
deleted file mode 100644
index 6808f8c1f34..00000000000
--- a/examples/libmsrpc/test/reg/security.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*tests cac_RegSetKeySecurity()*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- fstring tmp;
-
- mem_ctx = talloc_init("regsetval");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct RegOpenKey rok;
- ZERO_STRUCT(rok);
-
- printf("enter key to query: ");
- cactest_readline(stdin, tmp);
-
- rok.in.name = talloc_strdup(mem_ctx, tmp);
- rok.in.access = REG_KEY_ALL;
-
- if(!cac_RegOpenKey(hnd, mem_ctx, &rok)) {
- fprintf(stderr, "Could not open key %s. Error %s\n", rok.in.name, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct RegGetKeySecurity rks;
- ZERO_STRUCT(rks);
-
- rks.in.key = rok.out.key;
- rks.in.info_type = ALL_SECURITY_INFORMATION;
-
- if(!cac_RegGetKeySecurity(hnd, mem_ctx, &rks)) {
- fprintf(stderr, "Could not query security for %s. Error: %s\n", rok.in.name, nt_errstr(hnd->status));
- goto done;
- }
-
- printf("resetting key security...\n");
-
- struct RegSetKeySecurity rss;
- ZERO_STRUCT(rss);
-
- rss.in.key = rok.out.key;
- rss.in.info_type = ALL_SECURITY_INFORMATION;
- rss.in.size = rks.out.size;
- rss.in.descriptor = rks.out.descriptor;
-
- if(!cac_RegSetKeySecurity(hnd, mem_ctx, &rss)) {
- fprintf(stderr, "Could not set security. Error %s\n", nt_errstr(hnd->status));
- }
-
-done:
- cac_RegClose(hnd, mem_ctx, rok.out.key);
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
-
diff --git a/examples/libmsrpc/test/reg/shutdown.c b/examples/libmsrpc/test/reg/shutdown.c
deleted file mode 100644
index 6184fbd9762..00000000000
--- a/examples/libmsrpc/test/reg/shutdown.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*tries to shut down a remote pc*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- fstring tmp;
-
- mem_ctx = talloc_init("cac_shutdown");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- hnd->_internal.srv_level = SRV_WIN_NT4;
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct Shutdown s;
- ZERO_STRUCT(s);
-
- printf("Message: ");
- cactest_readline(stdin, tmp);
-
- s.in.message = talloc_strdup(mem_ctx, tmp);
-
- printf("timeout: ");
- scanf("%d", &s.in.timeout);
-
- printf("Reboot? [y/n]: ");
- cactest_readline(stdin, tmp);
-
- s.in.reboot = ( tmp[0] == 'y') ? True : False;
-
- printf("Force? [y/n]: ");
- cactest_readline(stdin, tmp);
-
- s.in.force = (tmp[0] == 'y') ? True : False;
-
- if(!cac_Shutdown(hnd, mem_ctx, &s)) {
- fprintf(stderr, "could not shut down server: error %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- printf("Server %s is shutting down. Would you like to try to abort? [y/n]: ", hnd->server);
- fscanf(stdin, "%s", tmp);
-
- if(tmp[0] == 'y') {
- if(!cac_AbortShutdown(hnd, mem_ctx)) {
- fprintf(stderr, "Could not abort shutdown. Error %s\n", nt_errstr(hnd->status));
- }
- }
-
-done:
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
-
- return 0;
-}
diff --git a/examples/libmsrpc/test/sam/adduser.c b/examples/libmsrpc/test/sam/adduser.c
deleted file mode 100644
index 94482d07041..00000000000
--- a/examples/libmsrpc/test/sam/adduser.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*add's a user to a domain*/
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- fstring tmp;
-
- struct SamOpenUser ou;
-
- POLICY_HND *user_hnd = NULL;
-
- mem_ctx = talloc_init("cac_adduser");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct SamOpenDomain sod;
- ZERO_STRUCT(sod);
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- struct SamCreateUser cdu;
- ZERO_STRUCT(cdu);
-
- printf("Enter account name: ");
- cactest_readline(stdin, tmp);
-
- cdu.in.dom_hnd = sod.out.dom_hnd;
- cdu.in.name = talloc_strdup(mem_ctx, tmp);
- cdu.in.acb_mask = ACB_NORMAL;
-
- if(!cac_SamCreateUser(hnd, mem_ctx, &cdu)) {
- fprintf(stderr, "Could not create user %s. Error: %s\n", cdu.in.name, nt_errstr(hnd->status));
- }
-
- printf("would you like to delete this user? [y/n]: ");
- cactest_readline(stdin, tmp);
-
- if(tmp[0] == 'y') {
-
- if(!cdu.out.user_hnd) {
- ZERO_STRUCT(ou);
- ou.in.dom_hnd = sod.out.dom_hnd;
- ou.in.access = MAXIMUM_ALLOWED_ACCESS;
- ou.in.name = talloc_strdup(mem_ctx, cdu.in.name);
-
- if(!cac_SamOpenUser(hnd, mem_ctx, &ou)) {
- fprintf(stderr, "Could not open user for deletion. Error: %s\n", nt_errstr(hnd->status));
- }
-
- user_hnd = ou.out.user_hnd;
- }
-
- else {
- user_hnd = cdu.out.user_hnd;
- }
-
- if(!cac_SamDeleteUser(hnd, mem_ctx, user_hnd))
- fprintf(stderr, "Could not delete user. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Nope..ok\n");
- }
-
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
- cac_SamClose(hnd, mem_ctx, sod.out.sam);
-
-done:
- talloc_destroy(mem_ctx);
-
- cac_FreeHandle(hnd);
-
- return 0;
-}
-
-/*TODO: add a function that will create a user and set userinfo and set the password*/
diff --git a/examples/libmsrpc/test/sam/disable.c b/examples/libmsrpc/test/sam/disable.c
deleted file mode 100644
index f140bad50bf..00000000000
--- a/examples/libmsrpc/test/sam/disable.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*disable a user*/
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- struct SamOpenUser ou;
-
- fstring tmp;
-
- mem_ctx = talloc_init("cac_disable");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct SamOpenDomain sod;
- ZERO_STRUCT(sod);
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- ZERO_STRUCT(ou);
- printf("Enter username: ");
- cactest_readline(stdin, tmp);
-
- ou.in.name = talloc_strdup(mem_ctx, tmp);
- ou.in.access = MAXIMUM_ALLOWED_ACCESS;
- ou.in.dom_hnd = sod.out.dom_hnd;
-
- if(!cac_SamOpenUser(hnd, mem_ctx, &ou)) {
- fprintf(stderr, "Could not open user. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- /*enable the user*/
- if(!cac_SamDisableUser(hnd, mem_ctx, ou.out.user_hnd)) {
- fprintf(stderr, "Could not disable user: %s\n", nt_errstr(hnd->status));
- }
-
-done:
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
diff --git a/examples/libmsrpc/test/sam/dominfo.c b/examples/libmsrpc/test/sam/dominfo.c
deleted file mode 100644
index cd2eccefbad..00000000000
--- a/examples/libmsrpc/test/sam/dominfo.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*gets domain info and prints it out*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- mem_ctx = talloc_init("cac_dominfo");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct SamOpenDomain sod;
- ZERO_STRUCT(sod);
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- struct SamGetDomainInfo gdi;
- ZERO_STRUCT(gdi);
-
- gdi.in.dom_hnd = sod.out.dom_hnd;
-
- if(!cac_SamGetDomainInfo(hnd, mem_ctx, &gdi)) {
- fprintf(stderr, "Could not get domain info. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- printf("Got domain info:\n");
- print_cac_domain_info(gdi.out.info);
-
-done:
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
diff --git a/examples/libmsrpc/test/sam/enable.c b/examples/libmsrpc/test/sam/enable.c
deleted file mode 100644
index bb91fb241c9..00000000000
--- a/examples/libmsrpc/test/sam/enable.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*enable a user*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- struct SamOpenUser ou;
-
- fstring tmp;
-
- mem_ctx = talloc_init("cac_samgroup");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct SamOpenDomain sod;
- ZERO_STRUCT(sod);
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- ZERO_STRUCT(ou);
- printf("Enter username: ");
- cactest_readline(stdin, tmp);
-
- ou.in.name = talloc_strdup(mem_ctx, tmp);
- ou.in.access = MAXIMUM_ALLOWED_ACCESS;
- ou.in.dom_hnd = sod.out.dom_hnd;
-
- if(!cac_SamOpenUser(hnd, mem_ctx, &ou)) {
- fprintf(stderr, "Could not open user. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- /*enable the user*/
- if(!cac_SamEnableUser(hnd, mem_ctx, ou.out.user_hnd)) {
- fprintf(stderr, "Could not enable user: %s\n", nt_errstr(hnd->status));
- }
-
-done:
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
-
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
diff --git a/examples/libmsrpc/test/sam/samenum.c b/examples/libmsrpc/test/sam/samenum.c
deleted file mode 100644
index f1b9ebdf842..00000000000
--- a/examples/libmsrpc/test/sam/samenum.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*enumerate users/groups/aliases*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
-
- struct SamEnumUsers eu;
- struct SamEnumGroups eg;
- struct SamEnumAliases ea;
-
- fstring tmp;
-
- int i;
-
- mem_ctx = talloc_init("cac_samenum");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct SamOpenDomain sod;
- ZERO_STRUCT(sod);
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- tmp[0] = 0x00;
- while(tmp[0] != 'q') {
- printf("Enumerate [u]sers, [g]roups or [a]liases or [q]uit: ");
- cactest_readline(stdin, tmp);
-
- switch(tmp[0]) {
- case 'u':
- ZERO_STRUCT(eu);
-
- eu.in.dom_hnd = sod.out.dom_hnd;
-
- printf("ACB mask (can be 0): ");
- scanf("%x", &eu.in.acb_mask);
-
- while(cac_SamEnumUsers(hnd, mem_ctx, &eu)) {
- printf("Enumerated %d users:\n", eu.out.num_users);
- for(i = 0; i < eu.out.num_users; i++) {
- printf(" Name: %s\n", eu.out.names[i]);
- printf(" RID: %d\n", eu.out.rids[i]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Could not enumerate users. Error: %s\n", nt_errstr(hnd->status));
- }
- break;
- case 'g':
- ZERO_STRUCT(eg);
- eg.in.dom_hnd = sod.out.dom_hnd;
-
- printf("Enumerating groups...\n");
- while(cac_SamEnumGroups(hnd, mem_ctx, &eg)) {
- printf("Enumerated %d groups:\n", eg.out.num_groups);
- for(i = 0; i < eg.out.num_groups; i++) {
- printf("RID: %d\n", eg.out.rids[i]);
- printf("Name: %s\n", eg.out.names[i]);
- printf("Desc: %s\n", eg.out.descriptions[i]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Could not enumerate Groups. Error: %s\n", nt_errstr(hnd->status));
- }
- break;
- case 'a':
- ZERO_STRUCT(ea);
- ea.in.dom_hnd = sod.out.dom_hnd;
-
- printf("Enumerating Aliases...\n");
- while(cac_SamEnumAliases(hnd, mem_ctx, &ea)) {
- printf("Enumerated %d aliases:\n", ea.out.num_aliases);
-
- for(i = 0; i < ea.out.num_aliases; i++) {
- printf("RID: %d\n", ea.out.rids[i]);
- printf("Name: %s\n", ea.out.names[i]);
- printf("Desc: %s\n", ea.out.descriptions[i]);
- }
- }
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Could not enumerate Aliases. Error: %s\n", nt_errstr(hnd->status));
- }
- break;
- }
- }
-
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
- cac_SamClose(hnd, mem_ctx, sod.out.sam);
-
-done:
- talloc_destroy(mem_ctx);
- cac_FreeHandle(hnd);
-
- return 0;
-
-}
-
diff --git a/examples/libmsrpc/test/sam/samgroup.c b/examples/libmsrpc/test/sam/samgroup.c
deleted file mode 100644
index 39d9fa1137d..00000000000
--- a/examples/libmsrpc/test/sam/samgroup.c
+++ /dev/null
@@ -1,480 +0,0 @@
-/*Some group management stuff*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
-
- struct SamEnumGroups eg;
- struct SamEnumUsers eu;
- struct SamCreateGroup cg;
- struct SamOpenGroup og;
- struct SamGetGroupMembers ggm;
- struct SamGetNamesFromRids gn;
- struct SamAddGroupMember add;
- struct SamRemoveGroupMember del;
- struct SamSetGroupMembers set;
- struct SamGetGroupsForUser gg;
- struct SamOpenUser ou;
- struct SamGetGroupInfo gi;
- struct SamSetGroupInfo si;
- struct SamRenameGroup rg;
- struct SamGetSecurityObject gso;
-
- POLICY_HND *group_hnd = NULL;
-
- fstring tmp;
- fstring input;
-
- int i;
-
- mem_ctx = talloc_init("cac_samgroup");
-
- hnd = cac_NewServerHandle(True);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct SamOpenDomain sod;
- ZERO_STRUCT(sod);
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- tmp[0] = 0x00;
- while(tmp[0] != 'q') {
- printf("\n");
- printf("[l]ist groups\n");
- printf("[c]reate group\n");
- printf("[o]pen group\n");
- printf("[d]elete group\n");
- printf("list [m]embers\n");
- printf("list [u]sers\n");
- printf("list [g]roup for users\n");
- printf("[a]dd member\n");
- printf("[r]emove member\n");
- printf("[x] clear members\n");
- printf("get group [i]nfo\n");
- printf("[e]dit group info\n");
- printf("[s]et members\n");
- printf("re[n]ame group\n");
- printf("[z] close group\n");
- printf("[t] get security info\n");
-
- printf("[q]uit\n\n");
- printf("Enter option: ");
- cactest_readline(stdin, tmp);
-
- printf("\n");
-
- switch(tmp[0]) {
- case 'c': /*create group*/
- if(group_hnd != NULL) {
- /*then we have an open handle.. close it*/
- cac_SamClose(hnd, mem_ctx, group_hnd);
- group_hnd = NULL;
- }
-
- printf("Enter group name: ");
- cactest_readline(stdin, input);
-
- ZERO_STRUCT(cg);
-
- cg.in.name = talloc_strdup(mem_ctx, input);
- cg.in.access = MAXIMUM_ALLOWED_ACCESS;
- cg.in.dom_hnd = sod.out.dom_hnd;
-
- if(!cac_SamCreateGroup(hnd, mem_ctx, &cg)) {
- fprintf(stderr, "Could not create group. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Created group %s\n", cg.in.name);
-
- group_hnd = cg.out.group_hnd;
- }
- break;
-
- case 'o': /*open group*/
- if(group_hnd != NULL) {
- /*then we have an open handle.. close it*/
- cac_SamClose(hnd, mem_ctx, group_hnd);
- group_hnd = NULL;
- }
-
- ZERO_STRUCT(og);
-
- og.in.dom_hnd = sod.out.dom_hnd;
- og.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- printf("Enter RID: 0x");
- scanf("%x", &og.in.rid);
-
- if(!cac_SamOpenGroup(hnd, mem_ctx, &og)) {
- fprintf(stderr, "Could not open group. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Opened group\n");
- group_hnd = og.out.group_hnd;
- }
-
- break;
-
- case 'l': /*list groups*/
- ZERO_STRUCT(eg);
- eg.in.dom_hnd = sod.out.dom_hnd;
-
- while(cac_SamEnumGroups(hnd, mem_ctx, &eg)) {
- for(i = 0; i < eg.out.num_groups; i++) {
- printf("RID: 0x%x Name: %s\n", eg.out.rids[i], eg.out.names[i]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Could not enumerate Groups. Error: %s\n", nt_errstr(hnd->status));
- }
-
- break;
-
- case 'm': /*list group members*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- ZERO_STRUCT(ggm);
- ggm.in.group_hnd = group_hnd;
-
- if(!cac_SamGetGroupMembers(hnd, mem_ctx, &ggm)) {
- fprintf(stderr, "Could not get group members. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- printf("Group has %d members:\n", ggm.out.num_members);
-
- if(ggm.out.num_members == 0) /*just skip the rest of this case*/
- break;
-
- /**get the user names*/
- gn.in.dom_hnd = sod.out.dom_hnd;
- gn.in.num_rids = ggm.out.num_members;
- gn.in.rids = ggm.out.rids;
-
- if(!cac_SamGetNamesFromRids(hnd, mem_ctx, &gn)) {
- fprintf(stderr, "Could not lookup names. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- for(i = 0; i < gn.out.num_names; i++) {
- printf("RID: 0x%x Name: %s\n", gn.out.map[i].rid, gn.out.map[i].name);
- }
-
- break;
-
- case 'd': /*delete group*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- if(!cac_SamDeleteGroup(hnd, mem_ctx, group_hnd)) {
- fprintf(stderr, "Could not delete group. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Deleted group.\n");
- group_hnd = NULL;
- }
- break;
-
- case 'u': /*list users*/
- ZERO_STRUCT(eu);
-
- eu.in.dom_hnd = sod.out.dom_hnd;
-
- while(cac_SamEnumUsers(hnd, mem_ctx, &eu)) {
- for(i = 0; i < eu.out.num_users; i++) {
- printf(" RID: 0x%x Name: %s\n", eu.out.rids[i], eu.out.names[i]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Could not enumerate users. Error: %s\n", nt_errstr(hnd->status));
- }
-
- break;
-
- case 'a': /*add member to group*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- ZERO_STRUCT(add);
-
- add.in.group_hnd = group_hnd;
-
- printf("Enter user RID: 0x");
- scanf("%x", &add.in.rid);
-
- if(!cac_SamAddGroupMember(hnd, mem_ctx, &add)) {
- fprintf(stderr, "Could not add user to group. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Successfully added user to group\n");
- }
- break;
-
- case 'r': /*remove user from group*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- ZERO_STRUCT(del);
- del.in.group_hnd = group_hnd;
-
- printf("Enter RID: 0x");
- scanf("%x", &del.in.rid);
-
- if(!cac_SamRemoveGroupMember(hnd, mem_ctx, &del)) {
- fprintf(stderr, "Could not remove user from group. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Removed user from group.\n");
- }
-
- break;
-
- case 'x': /*clear group members*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- if(!cac_SamClearGroupMembers(hnd, mem_ctx, group_hnd)) {
- fprintf(stderr, "Could not clear group members. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Cleared group members\n");
- }
-
- break;
-
- case 's': /*set members*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- ZERO_STRUCT(set);
-
- set.in.group_hnd = group_hnd;
-
- printf("Enter the number of members: ");
- scanf("%d", &set.in.num_members);
-
- set.in.rids = TALLOC_ARRAY(mem_ctx, uint32, set.in.num_members);
-
- for(i = 0; i < set.in.num_members; i++) {
- printf("Enter RID #%d: 0x", (i+1));
- scanf("%x", (set.in.rids + i));
- }
-
- if(!cac_SamSetGroupMembers(hnd, mem_ctx, &set)) {
- printf("could not set members. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Set users\n");
- }
-
- break;
-
- case 'g': /*list groups for user*/
- ZERO_STRUCT(ou);
- ZERO_STRUCT(gg);
-
- printf("Enter username: ");
- cactest_readline(stdin, input);
-
- if(input[0] != '\0') {
- ou.in.name = talloc_strdup(mem_ctx, input);
- }
- else {
- printf("Enter RID: 0x");
- scanf("%x", &ou.in.rid);
- }
-
- ou.in.access = MAXIMUM_ALLOWED_ACCESS;
- ou.in.dom_hnd = sod.out.dom_hnd;
-
- if(!cac_SamOpenUser(hnd, mem_ctx, &ou)) {
- fprintf(stderr, "Could not open user %s. Error: %s\n", ou.in.name, nt_errstr(hnd->status));
- break;
- }
-
- /*now find the groups*/
- gg.in.user_hnd = ou.out.user_hnd;
-
- if(!cac_SamGetGroupsForUser(hnd, mem_ctx, &gg)) {
- fprintf(stderr, "Could not get groups for user. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- cac_SamClose(hnd, mem_ctx, ou.out.user_hnd);
-
- ZERO_STRUCT(gn);
-
- gn.in.dom_hnd = sod.out.dom_hnd;
- gn.in.num_rids = gg.out.num_groups;
- gn.in.rids = gg.out.rids;
-
- if(!cac_SamGetNamesFromRids(hnd, mem_ctx, &gn)) {
- fprintf(stderr, "Could not get names from RIDs. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- printf("%d groups: \n", gn.out.num_names);
-
- for(i = 0; i < gn.out.num_names; i++) {
- printf("RID: 0x%x ", gn.out.map[i].rid);
-
- if(gn.out.map[i].found)
- printf("Name: %s\n", gn.out.map[i].name);
- else
- printf("Unknown RID\n");
- }
-
- break;
-
- case 'z': /*close group*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- if(!cac_SamClose(hnd, mem_ctx, group_hnd)) {
- printf("Could not close group\n");
- break;
- }
-
- group_hnd = NULL;
- break;
-
- case 'i': /*get group info*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- ZERO_STRUCT(gi);
- gi.in.group_hnd = group_hnd;
-
- if(!cac_SamGetGroupInfo(hnd, mem_ctx, &gi)) {
- printf("Could not get group info. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Retrieved Group info\n");
- print_cac_group_info(gi.out.info);
- }
-
- break;
-
- case 'e': /*edit group info*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- ZERO_STRUCT(gi);
- ZERO_STRUCT(si);
-
- gi.in.group_hnd = group_hnd;
-
- if(!cac_SamGetGroupInfo(hnd, mem_ctx, &gi)) {
- printf("Could not get group info. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- edit_cac_group_info(mem_ctx, gi.out.info);
-
- si.in.group_hnd = group_hnd;
- si.in.info = gi.out.info;
-
- if(!cac_SamSetGroupInfo(hnd, mem_ctx, &si)) {
- printf("Could not set group info. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf(" Done.\n");
- }
-
- break;
-
- case 'n': /*rename group*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- ZERO_STRUCT(rg);
-
- printf("Enter new group name: ");
- cactest_readline(stdin, tmp);
-
- rg.in.group_hnd = group_hnd;
- rg.in.new_name = talloc_strdup(mem_ctx, tmp);
-
- if(!cac_SamRenameGroup(hnd, mem_ctx, &rg))
- printf("Could not rename group. Error: %s\n", nt_errstr(hnd->status));
- else
- printf("Done.\n");
-
- break;
- case 't': /*get security info*/
- if(!group_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- ZERO_STRUCT(gso);
-
- gso.in.pol = group_hnd;
-
- if(!cac_SamGetSecurityObject(hnd, mem_ctx, &gso)) {
- printf("Could not get security descriptor info. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Got it.\n");
- }
- break;
-
- case 'q':
- break;
-
- default:
- printf("Invalid command\n");
- }
- }
-
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
-
- if(group_hnd)
- cac_SamClose(hnd, mem_ctx, group_hnd);
-
-done:
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
diff --git a/examples/libmsrpc/test/sam/samlookup.c b/examples/libmsrpc/test/sam/samlookup.c
deleted file mode 100644
index 32be50d4b92..00000000000
--- a/examples/libmsrpc/test/sam/samlookup.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*lookup names or rids*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
-
- struct SamGetNamesFromRids sgn;
- struct SamGetRidsFromNames sgr;
-
- fstring tmp;
- fstring input;
-
- int i;
-
- mem_ctx = talloc_init("cac_samenum");
-
- hnd = cac_NewServerHandle(True);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct SamOpenDomain sod;
- ZERO_STRUCT(sod);
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- tmp[0] = 0x00;
- while(tmp[0] != 'q') {
- printf("get [n]ames or get [r]ids or [q]uit: ");
- cactest_readline(stdin, tmp);
-
- switch(tmp[0]) {
- case 'n':
- ZERO_STRUCT(sgn);
-
- sgn.in.dom_hnd = sod.out.dom_hnd;
-
- printf("How many rids will you enter: ");
- scanf("%d", &sgn.in.num_rids);
-
- sgn.in.rids = talloc_array(mem_ctx, int, sgn.in.num_rids);
-
- for(i = 0; i < sgn.in.num_rids; i++) {
- printf(" Enter RID %d: 0x", i);
- scanf("%x", &sgn.in.rids[i]);
- }
-
- printf("Getting names...\n");
-
- if(!cac_SamGetNamesFromRids(hnd, mem_ctx, &sgn)) {
- fprintf(stderr, "could not lookup names. Error: %s\n", nt_errstr(hnd->status));
- talloc_free(sgn.in.rids);
- continue;
- }
-
- printf("Found %d names:\n", sgn.out.num_names);
-
- for(i = 0; i < sgn.out.num_names; i++) {
- printf(" RID: 0x%x ", sgn.out.map[i].rid);
-
- if(sgn.out.map[i].found) {
- printf("Name: %s\n", sgn.out.map[i].name);
- }
- else {
- printf("Unknown RID\n");
- }
-
- }
-
- break;
-
- case 'r':
- ZERO_STRUCT(sgr);
-
- sgr.in.dom_hnd = sod.out.dom_hnd;
-
- printf("How many names will you enter: ");
- scanf("%d", &sgr.in.num_names);
-
- sgr.in.names = talloc_array(mem_ctx, char *, sgr.in.num_names);
-
- for(i = 0; i < sgr.in.num_names; i++) {
- printf(" Enter name %d: ", (i+1));
- cactest_readline(stdin, input);
-
- sgr.in.names[i] = talloc_strdup(mem_ctx, input);
- }
-
- if(!cac_SamGetRidsFromNames(hnd, mem_ctx, &sgr)) {
- fprintf(stderr, "Could not lookup names. Error: %s\n", nt_errstr(hnd->status));
- continue;
- }
-
- printf("Found %d RIDs:\n", sgr.out.num_rids);
-
- for(i = 0; i < sgr.out.num_rids; i++) {
- printf(" Name: %s ", sgr.out.map[i].name);
-
- if(sgr.out.map[i].found) {
- printf("RID: 0x%x\n", sgr.out.map[i].rid);
- }
- else {
- printf("Unknown name\n");
- }
- }
-
- break;
- case 'q':
- printf("\n");
- break;
- default:
- printf("Invalid command!\n");
- }
- }
-
-
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
- cac_SamClose(hnd, mem_ctx, sod.out.sam);
-
-done:
- talloc_destroy(mem_ctx);
- cac_FreeHandle(hnd);
-
- return 0;
-
-}
-
diff --git a/examples/libmsrpc/test/sam/samuser.c b/examples/libmsrpc/test/sam/samuser.c
deleted file mode 100644
index df56a2d991c..00000000000
--- a/examples/libmsrpc/test/sam/samuser.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*Some user management stuff*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
-
- struct SamOpenUser ou;
- struct SamEnumUsers eu;
- struct SamCreateUser cu;
- struct SamGetUserInfo gi;
- struct SamSetUserInfo si;
- struct SamRenameUser ru;
- struct SamSetPassword sp;
-
- POLICY_HND *user_hnd = NULL;
-
- fstring tmp;
- fstring input;
-
- char *pass1 = NULL;
- char *pass2 = NULL;
-
- int i;
-
- mem_ctx = talloc_init("cac_samgroup");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- struct SamOpenDomain sod;
- ZERO_STRUCT(sod);
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
- fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- tmp[0] = 0x00;
- while(tmp[0] != 'q') {
- printf("\n");
- printf("[l]ist users\n");
- printf("[c]reate user\n");
- printf("[o]pen user\n");
- printf("[d]elete user\n");
- printf("[g]et user info\n");
- printf("[e]dit user info\n");
- printf("[r]ename user\n");
- printf("reset [p]assword\n");
- printf("[n] close user\n");
-
- printf("[q]uit\n\n");
- printf("Enter option: ");
- cactest_readline(stdin, tmp);
-
- printf("\n");
-
- switch(tmp[0]) {
- case 'c': /*create user*/
- if(user_hnd != NULL) {
- /*then we have an open handle.. close it*/
- cac_SamClose(hnd, mem_ctx, user_hnd);
- user_hnd = NULL;
- }
-
- printf("Enter user name: ");
- cactest_readline(stdin, input);
-
- ZERO_STRUCT(cu);
-
- cu.in.name = talloc_strdup(mem_ctx, input);
- cu.in.dom_hnd = sod.out.dom_hnd;
- cu.in.acb_mask = ACB_NORMAL;
-
- if(!cac_SamCreateUser(hnd, mem_ctx, &cu)) {
- printf("Could not create user. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Created user %s with RID 0x%x\n", cu.in.name, cu.out.rid);
- user_hnd = cu.out.user_hnd;
- }
-
- break;
-
- case 'o': /*open group*/
- if(user_hnd != NULL) {
- /*then we have an open handle.. close it*/
- cac_SamClose(hnd, mem_ctx, user_hnd);
- user_hnd = NULL;
- }
-
- ZERO_STRUCT(ou);
-
- ou.in.dom_hnd = sod.out.dom_hnd;
- ou.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- printf("Enter RID: 0x");
- scanf("%x", &ou.in.rid);
-
- if(!cac_SamOpenUser(hnd, mem_ctx, &ou)) {
- fprintf(stderr, "Could not open user. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Opened user\n");
- user_hnd = ou.out.user_hnd;
- }
-
- break;
-
- case 'l': /*list users*/
- ZERO_STRUCT(eu);
- eu.in.dom_hnd = sod.out.dom_hnd;
-
- while(cac_SamEnumUsers(hnd, mem_ctx, &eu)) {
- for(i = 0; i < eu.out.num_users; i++) {
- printf("RID: 0x%x Name: %s\n", eu.out.rids[i], eu.out.names[i]);
- }
- }
-
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Could not enumerate Users. Error: %s\n", nt_errstr(hnd->status));
- }
-
- break;
-
- break;
-
- case 'd': /*delete group*/
- if(!user_hnd) {
- printf("Must open group first!\n");
- break;
- }
-
- if(!cac_SamDeleteGroup(hnd, mem_ctx, user_hnd)) {
- fprintf(stderr, "Could not delete group. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Deleted group.\n");
- user_hnd = NULL;
- }
- break;
-
-
- case 'n':
- if(!user_hnd) {
- printf("Must open user first!\n");
- break;
- }
-
- if(!cac_SamClose(hnd, mem_ctx, user_hnd)) {
- printf("Could not user group\n");
- break;
- }
-
- user_hnd = NULL;
- break;
-
- case 'g': /*get user info*/
- if(!user_hnd) {
- printf("Must open user first!\n");
- break;
- }
-
- ZERO_STRUCT(gi);
- gi.in.user_hnd = ou.out.user_hnd;
-
- if(!cac_SamGetUserInfo(hnd, mem_ctx, &gi)) {
- printf("Could not get user info. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Retrieved User information:\n");
- print_cac_user_info(gi.out.info);
- }
-
- break;
-
- case 'e': /*edit user info*/
- if(!user_hnd) {
- printf("Must Open user first!\n");
- break;
- }
-
- ZERO_STRUCT(gi);
- gi.in.user_hnd = ou.out.user_hnd;
- if(!cac_SamGetUserInfo(hnd, mem_ctx, &gi)) {
- printf("Could not get user info. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- edit_cac_user_info(mem_ctx, gi.out.info);
-
- printf("setting following info:\n");
- print_cac_user_info(gi.out.info);
-
- ZERO_STRUCT(si);
-
- si.in.user_hnd = user_hnd;
- si.in.info = gi.out.info;
-
- if(!cac_SamSetUserInfo(hnd, mem_ctx, &si)) {
- printf("Could not set user info. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Done.\n");
- }
-
- break;
-
- case 'r': /*rename user*/
- if(!user_hnd) {
- printf("Must open user first!\n");
- break;
- }
-
- ZERO_STRUCT(ru);
-
- printf("Enter new username: ");
- cactest_readline(stdin, tmp);
-
- ru.in.user_hnd = user_hnd;
- ru.in.new_name = talloc_strdup(mem_ctx, tmp);
-
- if(!cac_SamRenameUser(hnd, mem_ctx, &ru)) {
- printf("Could not rename user. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Renamed user\n");
- }
-
- break;
-
- case 'p': /*reset password*/
-
- if(!user_hnd) {
- printf("Must open user first!\n");
- break;
- }
-
- do {
- if(pass1 && pass2) {
- printf("Passwords do not match. Please try again\n");
- }
-
- pass1 = getpass("Enter new password: ");
- pass2 = getpass("Re-enter new password: ");
- } while(strncmp(pass1, pass2, MAX_PASS_LEN));
-
- ZERO_STRUCT(sp);
- sp.in.user_hnd = user_hnd;
- sp.in.password = talloc_strdup(mem_ctx, pass1);
-
- if(!cac_SamSetPassword(hnd, mem_ctx, &sp)) {
- printf("Could not set password. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Done.\n");
- }
-
- break;
-
- case 'q':
- break;
-
- default:
- printf("Invalid command\n");
- }
- }
-
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
-
- if(user_hnd)
- cac_SamClose(hnd, mem_ctx, user_hnd);
-
-done:
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
diff --git a/examples/libmsrpc/test/smbc_test/smbc.c b/examples/libmsrpc/test/smbc_test/smbc.c
deleted file mode 100644
index 3db3ceadc65..00000000000
--- a/examples/libmsrpc/test/smbc_test/smbc.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*simple test for libsmbclient compatibility. initialize a smbc context, open sessions on a couple pipes and quit*/
-
-#include "libmsrpc.h"
-#include "libsmbclient.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- SMBCCTX *ctx = NULL;
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
- struct LsaOpenPolicy lop;
- struct RegConnect rc;
- struct SamOpenDomain sod;
-
- ZERO_STRUCT(lop);
- ZERO_STRUCT(rc);
- ZERO_STRUCT(sod);
-
- mem_ctx = talloc_init("cac_smbc");
- if(!mem_ctx) {
- printf("Could not initialize talloc context\n");
- exit(-1);
- }
-
- hnd = cac_NewServerHandle(True);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- /*initialize smbc context*/
- if( (ctx = smbc_new_context()) == NULL) {
- exit(1);
- }
-
- /*this probably isn't what someone would want to do, but it initializes the values we need*/
- ctx->debug = hnd->debug;
- ctx->callbacks.auth_fn = cac_GetAuthDataFn;
-
-
- if(smbc_init_context(ctx) == NULL)
- exit(1);
-
- cac_SetSmbcContext(hnd, ctx);
-
- /*still have to call cac_Connect()*/
- if(!cac_Connect(hnd, NULL)) {
- printf("Could not connect to server\n");
- exit(1);
- }
-
- lop.in.access = MAXIMUM_ALLOWED_ACCESS;
- if(!cac_LsaOpenPolicy(hnd, mem_ctx, &lop))
- printf("Could not open LSA policy. Error: %s\n", nt_errstr(hnd->status));
-
- printf("Opened LSA policy.\n");
-
- rc.in.access = MAXIMUM_ALLOWED_ACCESS;
- rc.in.root = HKEY_LOCAL_MACHINE;
- if(!cac_RegConnect(hnd, mem_ctx, &rc))
- printf("Could not connect to registry. Error: %s\n", nt_errstr(hnd->status));
-
- printf("Connceted to Registry.\n");
-
- sod.in.access = MAXIMUM_ALLOWED_ACCESS;
-
- if(!cac_SamOpenDomain(hnd, mem_ctx, &sod))
- printf("Could not open domain SAM. Error: %s\n", nt_errstr(hnd->status));
-
- printf("Opened domain.\n");
-
- if(lop.out.pol)
- cac_LsaClosePolicy(hnd, mem_ctx, lop.out.pol);
-
- if(rc.out.key)
- cac_RegClose(hnd, mem_ctx, rc.out.key);
-
- if(sod.out.sam)
- cac_SamClose(hnd, mem_ctx, sod.out.sam);
-
- if(sod.out.dom_hnd)
- cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
-
- cac_FreeHandle(hnd);
- talloc_destroy(mem_ctx);
-
- return 0;
-}
diff --git a/examples/libmsrpc/test/svcctl/svc.c b/examples/libmsrpc/test/svcctl/svc.c
deleted file mode 100644
index db5fa278953..00000000000
--- a/examples/libmsrpc/test/svcctl/svc.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*Tests all of the svcctl calls (at least at time of writing)*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-int main(int argc, char **argv) {
- CacServerHandle *hnd = NULL;
- TALLOC_CTX *mem_ctx = NULL;
-
-
- struct SvcOpenScm sos;
- struct SvcEnumServices es;
- struct SvcOpenService os;
- struct SvcGetStatus gs;
- struct SvcStartService start;
- struct SvcStopService stop;
- struct SvcPauseService pause;
- struct SvcContinueService res;
- struct SvcGetDisplayName gdn;
- struct SvcGetServiceConfig sgc;
-
- POLICY_HND *svc_hnd = NULL;
-
- fstring tmp;
- fstring input;
-
- int i;
-
- mem_ctx = talloc_init("cac_samgroup");
-
- hnd = cac_NewServerHandle(True);
-
- cac_SetAuthDataFn(hnd, cactest_GetAuthDataFn);
-
- cac_parse_cmd_line(argc, argv, hnd);
-
- if(!cac_Connect(hnd, NULL)) {
- fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
- exit(-1);
- }
-
- /*open a handle to the scm*/
- ZERO_STRUCT(sos);
-
- sos.in.access = SC_MANAGER_ALL_ACCESS;
-
- if(!cac_SvcOpenScm(hnd, mem_ctx, &sos)) {
- fprintf(stderr, "Could not open SCM. Error: %s\n", nt_errstr(hnd->status));
- goto done;
- }
-
- printf("Opened SCM\n");
-
- tmp[0] = 0x00;
- while(tmp[0] != 'q') {
- printf("\n");
- printf("[e] Enum Services\n");
- printf("[o] Open Service\n");
- printf("[x] Close Service\n");
- printf("[g] Get service status\n");
- printf("[s] Start service\n");
- printf("[t] Stop service\n");
- printf("[p] Pause service\n");
- printf("[r] Resume service\n");
- printf("[c] Get service config\n");
-
- printf("[d] Get display name\n");
-
- printf("[q]uit\n\n");
- printf("Enter option: ");
- cactest_readline(stdin, tmp);
-
- printf("\n");
-
- switch(tmp[0]) {
- case 'e': /*enum services*/
- ZERO_STRUCT(es);
- es.in.scm_hnd = sos.out.scm_hnd;
-
- if(!cac_SvcEnumServices(hnd, mem_ctx, &es)) {
- printf("Could not enumerate services. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- for(i = 0; i < es.out.num_services; i++) {
- print_cac_service(es.out.services[i]);
- }
- printf("Enumerated %d services:\n", es.out.num_services);
-
- break;
-
- case 'o': /*Open service*/
- ZERO_STRUCT(os);
-
- printf("Enter service name: ");
- cactest_readline(stdin, tmp);
-
- os.in.name = talloc_strdup(mem_ctx, tmp);
- os.in.scm_hnd = sos.out.scm_hnd;
- os.in.access = SERVICE_ALL_ACCESS;
-
- if(!cac_SvcOpenService(hnd, mem_ctx, &os)) {
- printf("Could not open service. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- printf("Opened service.\n");
- svc_hnd = os.out.svc_hnd;
-
- break;
- case 'x': /*close service*/
- if(!svc_hnd) {
- printf("Must open service first!\n");
- break;
- }
-
- cac_SvcClose(hnd, mem_ctx, svc_hnd);
- svc_hnd = NULL;
- break;
- case 'g': /*get svc status*/
-
- if(!svc_hnd) {
- printf("Must open service first!\n");
- break;
- }
-
- ZERO_STRUCT(gs);
-
- gs.in.svc_hnd = svc_hnd;
-
- if(!cac_SvcGetStatus(hnd, mem_ctx, &gs)) {
- printf("Could not get status. Error: %s\n", nt_errstr(hnd->status));
- break;
- }
-
- print_service_status(gs.out.status);
- break;
- case 's': /*start service*/
- if(!svc_hnd) {
- printf("Must open service first!\n");
- break;
- }
-
- ZERO_STRUCT(start);
-
- start.in.svc_hnd = svc_hnd;
-
- printf("Enter number of parameters: ");
- scanf("%d", &start.in.num_parms);
-
- start.in.parms = talloc_array(mem_ctx, char *, start.in.num_parms);
-
- for(i = 0; i < start.in.num_parms; i++) {
- printf("Parm %d: ", i);
- cactest_readline(stdin, tmp);
- start.in.parms[i] = talloc_strdup(mem_ctx, tmp);
- }
-
- printf("Timeout (seconds): ");
- scanf("%d", &start.in.timeout);
-
- if(!cac_SvcStartService(hnd, mem_ctx, &start)) {
- printf("Could not start service. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Started service.\n");
- }
-
- break;
- case 't': /*stop service*/
- if(!svc_hnd) {
- printf("Must open service first!\n");
- break;
- }
-
- ZERO_STRUCT(stop);
- stop.in.svc_hnd = svc_hnd;
-
- printf("Timeout (seconds): ");
- scanf("%d", &stop.in.timeout);
-
- if(!cac_SvcStopService(hnd, mem_ctx, &stop)) {
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Error occured: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Service was not stopped within %d seconds.\n", stop.in.timeout);
- print_service_status(stop.out.status);
- }
- }
- else {
- printf("Done.\n");
- print_service_status(stop.out.status);
- }
- break;
- case 'd': /*get display name*/
- if(!svc_hnd) {
- printf("Must open service first!\n");
- break;
- }
-
- ZERO_STRUCT(gdn);
- gdn.in.svc_hnd = svc_hnd;
-
- if(!cac_SvcGetDisplayName(hnd, mem_ctx, &gdn)) {
- printf("Could not get display name. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("\tDisplay Name: %s\n", gdn.out.display_name);
- }
- break;
-
- case 'p': /*pause service*/
- if(!svc_hnd) {
- printf("Must open service first!\n");
- break;
- }
-
- ZERO_STRUCT(pause);
- pause.in.svc_hnd = svc_hnd;
-
- printf("Timeout (seconds): ");
- scanf("%d", &pause.in.timeout);
-
- if(!cac_SvcPauseService(hnd, mem_ctx, &pause)) {
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Error occured: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Service was not paused within %d seconds.\n", pause.in.timeout);
- print_service_status(pause.out.status);
- }
- }
- else {
- printf("Done.\n");
- print_service_status(pause.out.status);
- }
-
- break;
-
- case 'r': /*resume service*/
- if(!svc_hnd) {
- printf("Must open service first!\n");
- break;
- }
-
- ZERO_STRUCT(res);
- res.in.svc_hnd = svc_hnd;
-
- printf("Timeout (seconds): ");
- scanf("%d", &res.in.timeout);
-
- if(!cac_SvcContinueService(hnd, mem_ctx, &res)) {
- if(CAC_OP_FAILED(hnd->status)) {
- printf("Error occured: %s\n", nt_errstr(hnd->status));
- }
- else {
- printf("Service was not resumed within %d seconds.\n", res.in.timeout);
- print_service_status(res.out.status);
- }
- }
- else {
- printf("Done.\n");
- print_service_status(res.out.status);
- }
-
- break;
-
- case 'c': /*get service config*/
- if(!svc_hnd) {
- printf("Must open service first!\n");
- break;
- }
-
- ZERO_STRUCT(sgc);
-
- sgc.in.svc_hnd = svc_hnd;
-
- if(!cac_SvcGetServiceConfig(hnd, mem_ctx, &sgc)) {
- printf("Could not get service config. Error: %s\n", nt_errstr(hnd->status));
- }
- else {
- print_service_config(&sgc.out.config);
- }
- break;
-
- case 'q': /*quit*/
- break;
- default:
- printf("Invalid command\n");
- }
- }
-
- cac_SvcClose(hnd, mem_ctx, sos.out.scm_hnd);
-
- done:
- cac_FreeHandle(hnd);
-
- talloc_destroy(mem_ctx);
-
- return 0;
-}
-
diff --git a/examples/libmsrpc/test/test_util.c b/examples/libmsrpc/test/test_util.c
deleted file mode 100644
index 81a9c9203d4..00000000000
--- a/examples/libmsrpc/test/test_util.c
+++ /dev/null
@@ -1,408 +0,0 @@
-/*some utility functions for the registry tests*/
-
-#include "libmsrpc.h"
-#include "test_util.h"
-
-
-void cactest_print_usage(char **argv) {
- printf("Usage:\n");
- printf(" %s server [-U username] [-W domain] [-P passwprd] [-N netbios_name]\n", argv[0]);
-}
-
-/*allocates memory for auth info and parses domain/user/server out of command line*/
-void cac_parse_cmd_line(int argc, char **argv, CacServerHandle *hnd) {
- int i = 0;
-
- ZERO_STRUCTP(hnd->username);
- ZERO_STRUCTP(hnd->domain);
- ZERO_STRUCTP(hnd->netbios_name);
- ZERO_STRUCTP(hnd->password);
-
- for(i = 1; i < argc; i++) {
- if( strncmp(argv[i], "-U", sizeof(fstring)) == 0) {
- strncpy(hnd->username, argv[i+1], sizeof(fstring));
- i++;
- }
-
- else if(strncmp(argv[i], "-W", sizeof(fstring)) == 0) {
- strncpy(hnd->domain, argv[i+1], sizeof(fstring));
- i++;
-
- }
-
- else if(strncmp(argv[i], "-P", sizeof(fstring)) == 0) {
- strncpy(hnd->password, argv[i+1], sizeof(fstring));
- i++;
-
- }
-
- else if(strncmp(argv[i], "-N", sizeof(fstring)) == 0) {
- strncpy(hnd->netbios_name, argv[i+1], sizeof(fstring));
- i++;
- }
-
- else if(strncmp(argv[i], "-d", sizeof(fstring)) == 0) {
- sscanf(argv[i+1], "%d", &hnd->debug);
- i++;
- }
-
- else { /*assume this is the server name*/
- strncpy(hnd->server, argv[i], sizeof(fstring));
- }
- }
-
- if(!hnd->server) {
- cactest_print_usage(argv);
- cac_FreeHandle(hnd);
- exit(-1);
- }
-
-}
-
-void print_value(uint32 type, REG_VALUE_DATA *data) {
- int i = 0;
-
- switch(type) {
- case REG_SZ:
- printf(" Type: REG_SZ\n");
- printf(" Value: %s\n", data->reg_sz);
- break;
- case REG_EXPAND_SZ:
- printf(" Type: REG_EXPAND_SZ\n");
- printf(" Value: %s\n", data->reg_expand_sz);
- break;
- case REG_MULTI_SZ:
- printf(" Type: REG_MULTI_SZ\n");
- printf(" Values: ");
-
- for(i = 0; i < data->reg_multi_sz.num_strings; i++) {
- printf(" %d: %s\n", i, data->reg_multi_sz.strings[i]);
- }
- break;
- case REG_DWORD:
- printf(" Type: REG_DWORD\n");
- printf(" Value: %d\n", data->reg_dword);
- break;
- case REG_DWORD_BE:
- printf(" Type: REG_DWORD_BE\n");
- printf(" Value: 0x%x\n", data->reg_dword_be);
- break;
- case REG_BINARY:
- printf(" Type: REG_BINARY\n");
- break;
- default:
- printf(" Invalid type: %d\n", type);
-
- }
-
- printf("\n");
-
-}
-
-void cactest_readline(FILE *in, fstring line) {
-
- int c;
-
- c = fgetc(in);
- if(c != '\n')
- ungetc(c, in);
-
- fgets(line, sizeof(fstring), in);
-
- if(line[strlen(line) - 1] == '\n')
- line[strlen(line) - 1] = '\0';
-
-}
-
-void cactest_GetAuthDataFn(const char * pServer,
- const char * pShare,
- char * pWorkgroup,
- int maxLenWorkgroup,
- char * pUsername,
- int maxLenUsername,
- char * pPassword,
- int maxLenPassword)
-
-{
- char temp[sizeof(fstring)];
-
- static char authUsername[sizeof(fstring)];
- static char authWorkgroup[sizeof(fstring)];
- static char authPassword[sizeof(fstring)];
- static char authSet = 0;
-
- char *pass = NULL;
-
- if (authSet)
- {
- strncpy(pWorkgroup, authWorkgroup, maxLenWorkgroup - 1);
- strncpy(pUsername, authUsername, maxLenUsername - 1);
- strncpy(pPassword, authPassword, maxLenPassword - 1);
- }
- else
- {
- if(pWorkgroup[0] != '\0') {
- strncpy(authWorkgroup, pWorkgroup, maxLenWorkgroup - 1);
- }
- else {
- d_printf("Domain: [%s] ", pWorkgroup);
- fscanf(stdin, "%s", temp);
-
- if (temp[0] != '\0')
- {
- strncpy(pWorkgroup, temp, maxLenWorkgroup - 1);
- strncpy(authWorkgroup, temp, maxLenWorkgroup - 1);
- }
- }
-
-
- if(pUsername[0] != '\0') {
- strncpy(authUsername, pUsername, maxLenUsername - 1);
- }
- else {
- d_printf("Username: [%s] ", pUsername);
- fscanf(stdin, "%s", temp);
-
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
- {
- temp[strlen(temp) - 1] = '\0';
- }
-
- if (temp[0] != '\0')
- {
- strncpy(pUsername, temp, maxLenUsername - 1);
- strncpy(authUsername, pUsername, maxLenUsername - 1);
- }
- }
- if(pPassword[0] != '\0') {
- strncpy(authPassword, pPassword, maxLenPassword - 1);
- }
- else {
- pass = getpass("Password: ");
- if (pass)
- fstrcpy(temp, pass);
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
- {
- temp[strlen(temp) - 1] = '\0';
- }
- if (temp[0] != '\0')
- {
- strncpy(pPassword, temp, maxLenPassword - 1);
- strncpy(authPassword, pPassword, maxLenPassword - 1);
- }
- }
- authSet = 1;
- }
-}
-
-void cactest_reg_input_val(TALLOC_CTX *mem_ctx, int *type, char **name, REG_VALUE_DATA *data) {
- fstring tmp;
- int i;
-
- printf("Enter value name: \n");
- cactest_readline(stdin, tmp);
- *name = talloc_strdup(mem_ctx, tmp);
-
- do {
- printf("Enter type. %d = REG_SZ, %d = REG_DWORD, %d = REG_MULTI_SZ: ", REG_SZ, REG_DWORD, REG_MULTI_SZ);
- scanf("%d", type);
- } while(*type != REG_SZ && *type != REG_DWORD && *type != REG_MULTI_SZ);
-
- switch(*type) {
- case REG_SZ:
- printf("Enter string:\n");
- cactest_readline(stdin, tmp);
-
- data->reg_sz = talloc_strdup(mem_ctx, tmp);
- break;
-
- case REG_DWORD:
- printf("Enter dword: ");
- scanf("%d", &data->reg_dword);
- break;
-
- case REG_MULTI_SZ:
- printf("Enter number of strings: ");
- scanf("%d", &data->reg_multi_sz.num_strings);
-
- data->reg_multi_sz.strings = talloc_array(mem_ctx, char *, data->reg_multi_sz.num_strings);
-
- for(i = 0; i < data->reg_multi_sz.num_strings; i++) {
- printf("String %d: ", i+1);
- cactest_readline(stdin, tmp);
-
- data->reg_multi_sz.strings[i] = talloc_strdup(mem_ctx, tmp);
- }
- break;
- }
-}
-
-void print_cac_user_info(CacUserInfo *info) {
- printf(" User Name : %s\n", info->username);
- printf(" Full Name : %s\n", info->full_name);
- printf(" Home Dir : %s\n", info->home_dir);
- printf(" Home Drive : %s\n", info->home_drive);
- printf(" Profile Path : %s\n", info->profile_path);
- printf(" Logon Script : %s\n", info->logon_script);
- printf(" Description : %s\n", info->description);
- printf(" Workstations : %s\n", info->workstations);
- printf(" Remote Dial : %s\n", info->dial);
-
- printf(" Logon Time : %s\n", http_timestring(info->logon_time));
- printf(" Logoff Time : %s\n", http_timestring(info->logoff_time));
- printf(" Kickoff Time : %s\n", http_timestring(info->kickoff_time));
- printf(" Pass last set: %s\n", http_timestring(info->pass_last_set_time));
- printf(" Pass can set : %s\n", http_timestring(info->pass_can_change_time));
- printf(" Pass must set: %s\n", http_timestring(info->pass_must_change_time));
-
- printf(" User RID : 0x%x\n", info->rid);
- printf(" Group RID : 0x%x\n", info->group_rid);
- printf(" ACB Mask : 0x%x\n", info->acb_mask);
-
- printf(" Bad pwd count: %d\n", info->bad_passwd_count);
- printf(" Logon Cuont : %d\n", info->logon_count);
-
- printf(" NT Password : %s\n", info->nt_password);
- printf(" LM Password : %s\n", info->lm_password);
-
-}
-
-void edit_readline(fstring line) {
- fgets(line, sizeof(fstring), stdin);
-
- if(line[strlen(line)-1] == '\n')
- line[strlen(line)-1] = '\0';
-}
-void edit_cac_user_info(TALLOC_CTX *mem_ctx, CacUserInfo *info) {
- fstring tmp;
-
- printf(" User Name [%s]: ", info->username);
- edit_readline(tmp);
-
- if(tmp[0] != '\0')
- info->username = talloc_strdup(mem_ctx, tmp);
-
- printf(" Full Name [%s]: ", info->full_name);
-
- edit_readline(tmp);
- if(tmp[0] != '\0')
- info->full_name = talloc_strdup(mem_ctx, tmp);
-
- printf(" Description [%s]: ", info->description);
- edit_readline(tmp);
- if(tmp[0] != '\0')
- info->description = talloc_strdup(mem_ctx, tmp);
-
- printf(" Remote Dial [%s]: ", info->dial);
- edit_readline(tmp);
- if(tmp[0] != '\0')
- info->dial = talloc_strdup(mem_ctx, tmp);
-
- printf(" ACB Mask [0x%x]: ", info->acb_mask);
- edit_readline(tmp);
- if(tmp[0] != '\0')
- sscanf(tmp, "%x", &info->acb_mask);
-
- printf(" Must change pass at next logon? [y/N]: ");
- edit_readline(tmp);
-
- if(tmp[0] == 'y' || tmp[0] == 'Y')
- info->pass_must_change= True;
-
-}
-
-void print_cac_group_info(CacGroupInfo *info) {
- printf(" Group Name : %s\n", info->name);
- printf(" Description : %s\n", info->description);
- printf(" Num Members : %d\n", info->num_members);
-}
-
-void edit_cac_group_info(TALLOC_CTX *mem_ctx, CacGroupInfo *info) {
- fstring tmp;
-
- printf("Group Name [%s]: ", info->name);
- edit_readline(tmp);
- if(tmp[0] != '\0')
- info->name = talloc_strdup(mem_ctx, tmp);
-
- printf("Description [%s]: ", info->description);
- edit_readline(tmp);
- if(tmp[0] != '\0')
- info->description = talloc_strdup(mem_ctx, tmp);
-}
-
-char *srv_role_str(uint32 role) {
- switch(role) {
- case ROLE_STANDALONE:
- return "STANDALONE";
- break;
- case ROLE_DOMAIN_MEMBER:
- return "DOMAIN_MEMBER";
- break;
- case ROLE_DOMAIN_BDC:
- return "DOMAIN_BDC";
- break;
- case ROLE_DOMAIN_PDC:
- return "DOMAIN_PDC";
- break;
- }
-
- return "Invalid role!\n";
-}
-
-char *cactime_str(CacTime ctime, fstring tmp) {
-
- snprintf(tmp, sizeof(fstring), "%u Days, %u Hours, %u Minutes, %u Seconds", ctime.days, ctime.hours, ctime.minutes, ctime.seconds);
-
- return tmp;
-}
-
-void print_cac_domain_info(CacDomainInfo *info) {
- fstring tmp;
-
- printf(" Server Role : %s\n", srv_role_str(info->server_role));
- printf(" Num Users : %d\n", info->num_users);
- printf(" Num Domain Groups: %d\n", info->num_domain_groups);
- printf(" Num Local Groups : %d\n", info->num_local_groups);
- printf(" Comment : %s\n", info->comment);
- printf(" Domain Name : %s\n", info->domain_name);
- printf(" Server Name : %s\n", info->server_name);
- printf(" Min. Pass. Length: %d\n", info->min_pass_length);
- printf(" Password History : %d\n", info->pass_history);
- printf("\n");
- printf(" Passwords Expire In : %s\n", cactime_str(info->expire, tmp));
- printf(" Passwords Can Change in: %s\n", cactime_str(info->min_pass_age, tmp));
- printf(" Lockouts last : %s\n", cactime_str(info->lockout_duration, tmp));
- printf(" Allowed Bad Attempts : %d\n", info->num_bad_attempts);
-}
-
-void print_cac_service(CacService svc) {
- printf("\tService Name: %s\n", svc.service_name);
- printf("\tDisplay Name: %s\n", svc.display_name);
- print_service_status(svc.status);
-}
-
-void print_service_status(SERVICE_STATUS status) {
- printf("\tStatus:\n");
- printf("\t Type: 0x%x\n", status.type);
- printf("\t State: 0x%x\n", status.state);
- printf("\t Controls: 0x%x\n", status.controls_accepted);
- printf("\t W32 Exit Code: 0x%x\n", status.win32_exit_code);
- printf("\t SVC Exit Code: 0x%x\n", status.service_exit_code);
- printf("\t Checkpoint: 0x%x\n", status.check_point);
- printf("\t Wait Hint: 0x%x\n", status.wait_hint);
- printf("\n");
-}
-
-void print_service_config(CacServiceConfig *config) {
- printf("\tConfig:\n");
- printf("\tType: 0x%x\n", config->type);
- printf("\tStart Type: 0x%x\n", config->start_type);
- printf("\tError config: 0x%x\n", config->error_control);
- printf("\tExecutable Path: %s\n", config->exe_path);
- printf("\tLoad Order Group: %s\n", config->load_order_group);
- printf("\tTag ID: 0x%x\n", config->tag_id);
- printf("\tDependencies: %s\n", config->dependencies);
- printf("\tStart Name: %s\n", config->start_name);
- printf("\tDisplay Name: %s\n", config->display_name);
-}
diff --git a/examples/libmsrpc/test/test_util.h b/examples/libmsrpc/test/test_util.h
deleted file mode 100644
index 9b27599da19..00000000000
--- a/examples/libmsrpc/test/test_util.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef TEST_UTIL_H
-#define TEST_UTIL_H
-
-#include "libmsrpc.h"
-
-/*prototypes*/
-void cactest_GetAuthDataFn(const char * pServer,
- const char * pShare,
- char * pWorkgroup,
- int maxLenWorkgroup,
- char * pUsername,
- int maxLenUsername,
- char * pPassword,
- int maxLenPassword);
-
-
-void cactest_print_usage(char **argv);
-void cac_parse_cmd_line(int argc, char **argv, CacServerHandle *hnd);
-void print_value(uint32 type, REG_VALUE_DATA *data);
-void cactest_readline(FILE *in, fstring line);
-void cactest_reg_input_val(TALLOC_CTX *mem_ctx, int *type, char **name, REG_VALUE_DATA *data);
-void print_cac_user_info(CacUserInfo *info);
-void edit_cac_user_info(TALLOC_CTX *mem_ctx, CacUserInfo *info);
-void print_cac_group_info(CacGroupInfo *info);
-void edit_cac_group_info(TALLOC_CTX *mem_ctx, CacGroupInfo *info);
-void print_cac_domain_info(CacDomainInfo *info);
-void print_cac_service(CacService svc);
-void print_service_status(SERVICE_STATUS status);
-void print_service_config(CacServiceConfig *config);
-
-#endif /*TEST_UTIL_H*/
diff --git a/source/Makefile.in b/source/Makefile.in
index c775cc6a608..fb2f719d54f 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -500,7 +500,7 @@ AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/token_util.o \
auth/auth_compat.o auth/auth_ntlmssp.o \
$(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ)
-MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_map.o smbd/mangle_hash2.o
+MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_hash2.o
SMBD_OBJ_MAIN = smbd/server.o
@@ -835,32 +835,30 @@ PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_
$(SECRETS_OBJ) $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
$(RPC_PARSE_OBJ1) $(DOSERR_OBJ) $(LDB_OBJ) $(ERRORMAP_OBJ)
-IDMAP_OBJ = nsswitch/idmap.o nsswitch/idmap_cache.o nsswitch/idmap_util.o @IDMAP_STATIC@
+IDMAP_OBJ = winbindd/idmap.o winbindd/idmap_cache.o winbindd/idmap_util.o @IDMAP_STATIC@
-NSS_INFO_OBJ = nsswitch/nss_info.o @NSS_INFO_STATIC@
-
-IDMAP_NSS_OBJ = sam/idmap_nss.o @IDMAP_NSS_STATIC@
+NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@
WINBINDD_OBJ1 = \
- nsswitch/winbindd.o \
- nsswitch/winbindd_user.o \
- nsswitch/winbindd_group.o \
- nsswitch/winbindd_util.o \
- nsswitch/winbindd_cache.o \
- nsswitch/winbindd_pam.o \
- nsswitch/winbindd_sid.o \
- nsswitch/winbindd_misc.o \
- nsswitch/winbindd_cm.o \
- nsswitch/winbindd_wins.o \
- nsswitch/winbindd_rpc.o \
- nsswitch/winbindd_reconnect.o \
- nsswitch/winbindd_ads.o \
- nsswitch/winbindd_passdb.o \
- nsswitch/winbindd_dual.o \
- nsswitch/winbindd_async.o \
- nsswitch/winbindd_creds.o \
- nsswitch/winbindd_cred_cache.o \
- nsswitch/winbindd_ccache_access.o \
+ winbindd/winbindd.o \
+ winbindd/winbindd_user.o \
+ winbindd/winbindd_group.o \
+ winbindd/winbindd_util.o \
+ winbindd/winbindd_cache.o \
+ winbindd/winbindd_pam.o \
+ winbindd/winbindd_sid.o \
+ winbindd/winbindd_misc.o \
+ winbindd/winbindd_cm.o \
+ winbindd/winbindd_wins.o \
+ winbindd/winbindd_rpc.o \
+ winbindd/winbindd_reconnect.o \
+ winbindd/winbindd_ads.o \
+ winbindd/winbindd_passdb.o \
+ winbindd/winbindd_dual.o \
+ winbindd/winbindd_async.o \
+ winbindd/winbindd_creds.o \
+ winbindd/winbindd_cred_cache.o \
+ winbindd/winbindd_ccache_access.o \
auth/token_util.o
WINBINDD_OBJ = \
@@ -1504,19 +1502,19 @@ bin/smbpasswd.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_smbpasswd.o
@$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_smbpasswd.o \
@SONAMEFLAG@`basename $@`
-bin/rid.@SHLIBEXT@: $(BINARY_PREREQS) nsswitch/idmap_rid.o
+bin/rid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_rid.o
@echo "Building plugin $@"
- @$(SHLD) $(LDSHFLAGS) -o $@ nsswitch/idmap_rid.o \
+ @$(SHLD) $(LDSHFLAGS) -o $@ winbindd/idmap_rid.o \
@SONAMEFLAG@`basename $@`
-bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) nsswitch/idmap_ad.o
+bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o
@echo "Building plugin $@"
- @$(SHLD) $(LDSHFLAGS) -o $@ nsswitch/idmap_ad.o \
+ @$(SHLD) $(LDSHFLAGS) -o $@ winbindd/idmap_ad.o \
@SONAMEFLAG@`basename $@`
-bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) nsswitch/idmap_ldap.o
+bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o
@echo "Building plugin $@"
- @$(SHLD) $(LDSHFLAGS) -o $@ nsswitch/idmap_ldap.o \
+ @$(SHLD) $(LDSHFLAGS) -o $@ winbindd/idmap_ldap.o \
@SONAMEFLAG@`basename $@`
bin/weird.@SHLIBEXT@: $(BINARY_PREREQS) $(DEVEL_HELP_WEIRD_OBJ)
@@ -1919,14 +1917,14 @@ clean: delheaders
# removed by "make clean" this will always be run when you do anything
# afterwards.
proto_exists: include/proto.h include/build_env.h \
- nsswitch/winbindd_proto.h web/swat_proto.h \
+ winbindd/winbindd_proto.h web/swat_proto.h \
client/client_proto.h utils/net_proto.h utils/ntlm_auth_proto.h smbd/build_options.c
@touch proto_exists
delheaders:
@echo Removing prototype headers
@rm -f include/proto.h include/build_env.h \
- nsswitch/winbindd_proto.h web/swat_proto.h \
+ winbindd/winbindd_proto.h web/swat_proto.h \
client/client_proto.h utils/net_proto.h \
smbd/build_options.c utils/ntlm_auth_proto.h \
utils/passwd_proto.h
@@ -1944,9 +1942,9 @@ include/build_env.h: script/build_env.sh
@$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \
> $(builddir)/include/build_env.h
-nsswitch/winbindd_proto.h:
+winbindd/winbindd_proto.h:
@cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
- -h _WINBINDD_PROTO_H_ $(builddir)/nsswitch/winbindd_proto.h \
+ -h _WINBINDD_PROTO_H_ $(builddir)/winbindd/winbindd_proto.h \
$(WINBINDD_OBJ1)
web/swat_proto.h:
@@ -1982,7 +1980,7 @@ headers:
$(MAKE) smbd/build_options.c; \
$(MAKE) include/proto.h; \
$(MAKE) include/build_env.h; \
- $(MAKE) nsswitch/winbindd_proto.h; \
+ $(MAKE) winbindd/winbindd_proto.h; \
$(MAKE) web/swat_proto.h; \
$(MAKE) client/client_proto.h; \
$(MAKE) utils/ntlm_auth_proto.h; \
diff --git a/source/VERSION b/source/VERSION
index 72764299f50..527f09db9e3 100644
--- a/source/VERSION
+++ b/source/VERSION
@@ -68,7 +68,7 @@ SAMBA_VERSION_RC_RELEASE=
# e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes #
# -> "3.0.0-SVN-build-199" #
########################################################
-SAMBA_VERSION_IS_SVN_SNAPSHOT=yes
+SAMBA_VERSION_IS_SVN_SNAPSHOT=
########################################################
# This can be set by vendors if they want... #
diff --git a/source/client/client.c b/source/client/client.c
index 9f3e5d1b03e..171d413b0ae 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -193,6 +193,10 @@ static void send_message(void)
msg[l] = c;
}
+ if ((total_len > 0) && (strlen(msg) == 0)) {
+ break;
+ }
+
if (!cli_message_text(cli, msg, l, grp_id)) {
d_printf("SMBsendtxt failed (%s)\n",cli_errstr(cli));
return;
diff --git a/source/configure.in b/source/configure.in
index 9562d473953..3e960fb8cb9 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -634,6 +634,10 @@ UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown"
AC_MSG_CHECKING(uname -p)
AC_MSG_RESULT(${UNAME_P})
+UNAME_I=`(uname -i) 2>/dev/null` || UNAME_I="unknown"
+AC_MSG_CHECKING(uname -i)
+AC_MSG_RESULT(${UNAME_I})
+
dnl Add #include for broken IRIX header files
case "$host_os" in
*irix6*)
@@ -683,24 +687,9 @@ case "$host_os" in
# password hashing - hence the USE_BOTH_CRYPT_CALLS define.
#
case `uname -r` in
- *9*|*10*)
- CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL"
- AC_DEFINE(USE_BOTH_CRYPT_CALLS, 1, [Whether to use both of HPUX' crypt calls])
- AC_DEFINE(_HPUX_SOURCE, 1, [Whether to use HPUX extensions])
- AC_DEFINE(_POSIX_SOURCE, 1, [Whether to use POSIX compatible functions])
- AC_DEFINE(_ALIGNMENT_REQUIRED,1,[Required alignment])
- AC_DEFINE(_MAX_ALIGNMENT,4,[Maximum alignment])
- ;;
- *11*)
- CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL"
- AC_DEFINE(USE_BOTH_CRYPT_CALLS, 1, [Whether to use both of HPUX' crypt calls])
- AC_DEFINE(_HPUX_SOURCE, 1, [Whether to use HPUX extensions])
- AC_DEFINE(_POSIX_SOURCE, 1, [Whether to use POSIX compatible functions])
- AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to use large file support])
- AC_DEFINE(_ALIGNMENT_REQUIRED, 1, [Required alignment])
- AC_DEFINE(_MAX_ALIGNMENT, 4, [Maximum alignment])
- AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Unix 98 sources -- needed for socklen_t in getsockopt on HP/UX 11])
- ;;
+ *9*|*10*|*11)
+ AC_DEFINE(USE_BOTH_CRYPT_CALLS, 1, [Whether to use both of HPUX' crypt calls])
+ ;;
esac
;;
@@ -1086,19 +1075,6 @@ if test x"$samba_cv_unixsocket" = x"yes"; then
fi
-AC_CACHE_CHECK([for socklen_t type],samba_cv_socklen_t, [
- AC_TRY_COMPILE([
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#include <sys/socket.h>],[socklen_t i = 0],
- samba_cv_socklen_t=yes,samba_cv_socklen_t=no)])
-if test x"$samba_cv_socklen_t" = x"yes"; then
- AC_DEFINE(HAVE_SOCKLEN_T_TYPE,1,[Whether we have the variable type socklen_t])
-fi
-
AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [
AC_TRY_COMPILE([
#include <sys/types.h>
@@ -1337,15 +1313,33 @@ LIBS="$save_LIBS"
# any of them.
AC_MSG_CHECKING([for libunwind])
save_LIBS=$LIBS
-if test x"$UNAME_P" = xunknown ; then
- # This probably won't link without the platform-specific libunwind.
- LIBS="$LIBS -lunwind"
-else
- # Add the platform-specific libunwind module. uname -p seems the most
- # plausible option and works for ia64, where libunwind is most useful.
- LIBS="$LIBS -lunwind -lunwind-$UNAME_P"
+
+UNWIND_ARCH="unknown"
+if test x"$UNAME_I" != x"unknown"; then
+ UNWIND_ARCH="$UNAME_I"
+elif test x"$UNAME_M" != x"unknown"; then
+ UNWIND_ARCH="$UNAME_M"
+elif test x"$UNAME_P" != x"unknown"; then
+ UNWIND_ARCH="$UNAME_P"
fi
+case "$UNWIND_ARCH" in
+ unknown)
+ # This probably won't link without
+ # the platform-specific libunwind.
+ LIBS="$LIBS -lunwind"
+ ;;
+ i386|i586|i686)
+ # Add the platform-specific libunwind module.
+ LIBS="$LIBS -lunwind -lunwind-x86"
+ ;;
+ *)
+ # Add the platform-specific libunwind module.
+ # based on uname -i, uname -m or uname -p
+ LIBS="$LIBS -lunwind -lunwind-$UNWIND_ARCH"
+ ;;
+esac
+
AC_TRY_LINK(
[
#ifdef HAVE_LIBUNWIND_H
@@ -6148,16 +6142,16 @@ SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC)
SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_rpcecho.$SHLIBEXT", RPC)
SMB_SUBSYSTEM(RPC,smbd/server.o)
-SMB_MODULE(idmap_ldap, nsswitch/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP)
-SMB_MODULE(idmap_tdb, nsswitch/idmap_tdb.o, "bin/tdb.$SHLIBEXT", IDMAP)
-SMB_MODULE(idmap_passdb, nsswitch/idmap_passdb.o, "bin/passdb.$SHLIBEXT", IDMAP)
-SMB_MODULE(idmap_nss, nsswitch/idmap_nss.o, "bin/nss.$SHLIBEXT", IDMAP)
-SMB_MODULE(idmap_rid, nsswitch/idmap_rid.o, "bin/rid.$SHLIBEXT", IDMAP)
-SMB_MODULE(idmap_ad, nsswitch/idmap_ad.o, "bin/ad.$SHLIBEXT", IDMAP)
-SMB_SUBSYSTEM(IDMAP, nsswitch/idmap.o)
+SMB_MODULE(idmap_ldap, winbindd/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP)
+SMB_MODULE(idmap_tdb, winbindd/idmap_tdb.o, "bin/tdb.$SHLIBEXT", IDMAP)
+SMB_MODULE(idmap_passdb, winbindd/idmap_passdb.o, "bin/passdb.$SHLIBEXT", IDMAP)
+SMB_MODULE(idmap_nss, winbindd/idmap_nss.o, "bin/nss.$SHLIBEXT", IDMAP)
+SMB_MODULE(idmap_rid, winbindd/idmap_rid.o, "bin/rid.$SHLIBEXT", IDMAP)
+SMB_MODULE(idmap_ad, winbindd/idmap_ad.o, "bin/ad.$SHLIBEXT", IDMAP)
+SMB_SUBSYSTEM(IDMAP, winbindd/idmap.o)
-SMB_MODULE(nss_info_template, nsswitch/nss_info_template.o, "bin/template.$SHLIBEXT", NSS_INFO)
-SMB_SUBSYSTEM(NSS_INFO, nsswitch/nss_info.o)
+SMB_MODULE(nss_info_template, winbindd/nss_info_template.o, "bin/template.$SHLIBEXT", NSS_INFO)
+SMB_SUBSYSTEM(NSS_INFO, winbindd/nss_info.o)
SMB_MODULE(charset_weird, modules/weird.o, "bin/weird.$SHLIBEXT", CHARSET)
SMB_MODULE(charset_CP850, modules/CP850.o, "bin/CP850.$SHLIBEXT", CHARSET)
diff --git a/source/groupdb/mapping.c b/source/groupdb/mapping.c
index 0a733dded91..2e9658fec99 100644
--- a/source/groupdb/mapping.c
+++ b/source/groupdb/mapping.c
@@ -37,20 +37,8 @@ static BOOL init_group_mapping(void)
return True;
}
- /* default to using the ldb backend. This parameter should
- disappear in future versions of Samba3, but for now it
- provides a safety net in case any major problems are
- discovered with ldb after the release */
- backend_string = lp_parm_const_string(-1, "groupdb", "backend", "ldb");
-
- if (strcmp(backend_string, "ldb") == 0) {
- backend = groupdb_ldb_init();
- } else if (strcmp(backend_string, "tdb") == 0) {
- backend = groupdb_tdb_init();
- } else {
- DEBUG(0,("Unknown groupdb backend '%s'\n", backend_string));
- smb_panic("Unknown groupdb backend");
- }
+ backend = groupdb_ldb_init();
+
return backend != NULL;
}
diff --git a/source/include/gpo.h b/source/include/gpo.h
index 6ca159149fe..9b1a6726408 100644
--- a/source/include/gpo.h
+++ b/source/include/gpo.h
@@ -93,6 +93,6 @@ struct GP_EXT {
#define GPO_CACHE_DIR "gpo_cache"
#define GPT_INI "GPT.INI"
-#define GP_EXT_SECURITY "827D319E-6EAC-11D2-A4EA-00C04F79F83A"
-#define GP_EXT_REGISTRY "35378EAC-683F-11D2-A89A-00C04FBBCFA2"
-#define GP_EXT_SCRIPTS "42B5FAAE-6536-11D2-AE5A-0000F87571E3"
+#define GP_EXT_GUID_SECURITY "827D319E-6EAC-11D2-A4EA-00C04F79F83A"
+#define GP_EXT_GUID_REGISTRY "35378EAC-683F-11D2-A89A-00C04FBBCFA2"
+#define GP_EXT_GUID_SCRIPTS "42B5FAAE-6536-11D2-AE5A-0000F87571E3"
diff --git a/source/include/includes.h b/source/include/includes.h
index ef0c2455962..a57891b7631 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -303,12 +303,6 @@ typedef sig_atomic_t VOLATILE SIG_ATOMIC_T;
typedef int VOLATILE SIG_ATOMIC_T;
#endif
-#ifndef HAVE_SOCKLEN_T_TYPE
-#define HAVE_SOCKLEN_T_TYPE
-typedef int socklen_t;
-#endif
-
-
#ifndef uchar
#define uchar unsigned char
#endif
diff --git a/source/include/mangle.h b/source/include/mangle.h
index 3d19ef9ed4f..382bf1c6305 100644
--- a/source/include/mangle.h
+++ b/source/include/mangle.h
@@ -7,12 +7,17 @@
struct mangle_fns {
void (*reset)(void);
BOOL (*is_mangled)(const char *s, const struct share_params *p);
+ BOOL (*must_mangle)(const char *s, const struct share_params *p);
BOOL (*is_8_3)(const char *fname, BOOL check_case, BOOL allow_wildcards,
const struct share_params *p);
- BOOL (*check_cache)(char *s, size_t maxlen,
- const struct share_params *p);
- void (*name_map)(char *OutName, BOOL need83, BOOL cache83,
- int default_case,
- const struct share_params *p);
+ BOOL (*lookup_name_from_8_3)(TALLOC_CTX *ctx,
+ const char *in,
+ char **out, /* talloced on the given context. */
+ const struct share_params *p);
+ BOOL (*name_to_8_3)(const char *in,
+ char out[13],
+ BOOL cache83,
+ int default_case,
+ const struct share_params *p);
};
#endif /* _MANGLE_H_ */
diff --git a/source/include/msdfs.h b/source/include/msdfs.h
index f78f76ba27f..717bc85ed54 100644
--- a/source/include/msdfs.h
+++ b/source/include/msdfs.h
@@ -44,23 +44,23 @@ typedef struct _client_referral {
} CLIENT_DFS_REFERRAL;
struct referral {
- pstring alternate_path; /* contains the path referred */
+ char *alternate_path; /* contains the path referred */
uint32 proximity;
uint32 ttl; /* how long should client cache referral */
};
struct junction_map {
- fstring service_name;
- pstring volume_name;
- pstring comment;
+ char *service_name;
+ char *volume_name;
+ char *comment;
int referral_count;
struct referral* referral_list;
};
struct dfs_path {
- fstring hostname;
- fstring servicename;
- pstring reqpath;
+ char *hostname;
+ char *servicename;
+ char *reqpath;
BOOL posix_path;
};
diff --git a/source/include/ntdomain.h b/source/include/ntdomain.h
index c7c0b04b0a2..6ce0ef64646 100644
--- a/source/include/ntdomain.h
+++ b/source/include/ntdomain.h
@@ -329,7 +329,7 @@ typedef struct smb_np_struct {
* returns: state information representing the connection.
* is stored in np_state, above.
*/
- void * (*namedpipe_create)(char *pipe_name,
+ void * (*namedpipe_create)(const char *pipe_name,
connection_struct *conn, uint16 vuid);
/* call to perform a write / read namedpipe transaction.
diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h
index 1f443186e13..aea429d2ea1 100644
--- a/source/include/smb_macros.h
+++ b/source/include/smb_macros.h
@@ -271,9 +271,6 @@ copy an IP address from one buffer to another
#define SMB_XMALLOC_P(type) (type *)smb_xmalloc_array(sizeof(type),1)
#define SMB_XMALLOC_ARRAY(type,count) (type *)smb_xmalloc_array(sizeof(type),(count))
-/* limiting size of ipc replies */
-#define SMB_REALLOC_LIMIT(ptr,size) (char *)SMB_REALLOC(ptr,MAX((size),4*1024))
-
/* The new talloc is paranoid malloc checker safe. */
#if 0
diff --git a/source/include/smbldap.h b/source/include/smbldap.h
index bc438a98de4..c05f53ae312 100644
--- a/source/include/smbldap.h
+++ b/source/include/smbldap.h
@@ -40,6 +40,7 @@ struct smbldap_state;
#define LDAP_OBJ_IDMAP_ENTRY "sambaIdmapEntry"
#define LDAP_OBJ_SID_ENTRY "sambaSidEntry"
#define LDAP_OBJ_TRUST_PASSWORD "sambaTrustPassword"
+#define LDAP_OBJ_TRUSTDOM_PASSWORD "sambaTrustedDomainPassword"
#define LDAP_OBJ_ACCOUNT "account"
#define LDAP_OBJ_POSIXACCOUNT "posixAccount"
diff --git a/source/lib/adt_tree.c b/source/lib/adt_tree.c
index f26f924d61f..cf305d7307e 100644
--- a/source/lib/adt_tree.c
+++ b/source/lib/adt_tree.c
@@ -278,31 +278,41 @@ done:
Recursive routine to print out all children of a TREE_NODE
*************************************************************************/
-static void pathtree_print_children( TREE_NODE *node, int debug, const char *path )
+static void pathtree_print_children(TALLOC_CTX *ctx,
+ TREE_NODE *node,
+ int debug,
+ const char *path )
{
int i;
int num_children;
- pstring path2;
-
+ char *path2 = NULL;
+
if ( !node )
return;
-
-
+
if ( node->key )
DEBUG(debug,("%s: [%s] (%s)\n", path ? path : "NULL", node->key,
node->data_p ? "data" : "NULL" ));
- *path2 = '\0';
- if ( path )
- pstrcpy( path2, path );
- pstrcat( path2, node->key ? node->key : "NULL" );
- pstrcat( path2, "/" );
-
- num_children = node->num_children;
- for ( i=0; i<num_children; i++ )
- pathtree_print_children( node->children[i], debug, path2 );
-
+ if ( path ) {
+ path2 = talloc_strdup(ctx, path);
+ if (!path2) {
+ return;
+ }
+ }
+
+ path2 = talloc_asprintf(ctx,
+ "%s%s/",
+ path ? path : "",
+ node->key ? node->key : "NULL");
+ if (!path2) {
+ return;
+ }
+ num_children = node->num_children;
+ for ( i=0; i<num_children; i++ ) {
+ pathtree_print_children(ctx, node->children[i], debug, path2 );
+ }
}
/**************************************************************************
@@ -313,21 +323,23 @@ static void pathtree_print_children( TREE_NODE *node, int debug, const char *pat
{
int i;
int num_children = tree->root->num_children;
-
+
if ( tree->root->key )
DEBUG(debug,("ROOT/: [%s] (%s)\n", tree->root->key,
tree->root->data_p ? "data" : "NULL" ));
-
+
for ( i=0; i<num_children; i++ ) {
- pathtree_print_children( tree->root->children[i], debug,
+ TALLOC_CTX *ctx = talloc_stackframe();
+ pathtree_print_children(ctx, tree->root->children[i], debug,
tree->root->key ? tree->root->key : "ROOT/" );
+ TALLOC_FREE(ctx);
}
-
+
}
/**************************************************************************
return the data_p for for the node in tree matching the key string
- The key string is the full path. We must break it apart and walk
+ The key string is the full path. We must break it apart and walk
the tree
*************************************************************************/
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index 349fbff8506..b1e3d3bdcfb 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -745,7 +745,7 @@ size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen)
size = push_ucs2_allocate(&buffer, src);
if (size == (size_t)-1) {
- smb_panic("failed to create UCS2 buffer");
+ return (size_t)-1;
}
if (!strupper_w(buffer) && (dest == src)) {
free(buffer);
@@ -759,49 +759,131 @@ size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen)
/**
strdup() a unix string to upper case.
- Max size is pstring.
**/
char *strdup_upper(const char *s)
{
- pstring out_buffer;
+ char *out_buffer = SMB_STRDUP(s);
const unsigned char *p = (const unsigned char *)s;
unsigned char *q = (unsigned char *)out_buffer;
+ if (!q) {
+ return NULL;
+ }
+
/* this is quite a common operation, so we want it to be
fast. We optimise for the ascii case, knowing that all our
supported multi-byte character sets are ascii-compatible
(ie. they match for the first 128 chars) */
- while (1) {
+ while (*p) {
if (*p & 0x80)
break;
*q++ = toupper_ascii(*p);
- if (!*p)
- break;
p++;
- if (p - ( const unsigned char *)s >= sizeof(pstring))
- break;
}
if (*p) {
/* MB case. */
size_t size;
- wpstring buffer;
- size = convert_string(CH_UNIX, CH_UTF16LE, s, -1, buffer, sizeof(buffer), True);
+ smb_ucs2_t *buffer = NULL;
+
+ SAFE_FREE(out_buffer);
+ size = convert_string_allocate(NULL,
+ CH_UNIX,
+ CH_UTF16LE,
+ s,
+ strlen(s) + 1,
+ (void **)(void *)&buffer,
+ True);
if (size == (size_t)-1) {
return NULL;
}
strupper_w(buffer);
- size = convert_string(CH_UTF16LE, CH_UNIX, buffer, -1, out_buffer, sizeof(out_buffer), True);
+ size = convert_string_allocate(NULL,
+ CH_UTF16LE,
+ CH_UNIX,
+ buffer,
+ size,
+ (void **)(void *)&out_buffer,
+ True);
+
+ /* Don't need the intermediate buffer
+ * anymore.
+ */
+
+ TALLOC_FREE(buffer);
+ if (size == (size_t)-1) {
+ return NULL;
+ }
+ }
+
+ return out_buffer;
+}
+
+/**
+ talloc_strdup() a unix string to upper case.
+**/
+
+char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *s)
+{
+ char *out_buffer = talloc_strdup(ctx,s);
+ const unsigned char *p = (const unsigned char *)s;
+ unsigned char *q = (unsigned char *)out_buffer;
+
+ if (!q) {
+ return NULL;
+ }
+
+ /* this is quite a common operation, so we want it to be
+ fast. We optimise for the ascii case, knowing that all our
+ supported multi-byte character sets are ascii-compatible
+ (ie. they match for the first 128 chars) */
+
+ while (*p) {
+ if (*p & 0x80)
+ break;
+ *q++ = toupper_ascii(*p);
+ p++;
+ }
+
+ if (*p) {
+ /* MB case. */
+ size_t size;
+ smb_ucs2_t *ubuf = NULL;
+
+ /* We're not using the ascii buffer above. */
+ TALLOC_FREE(out_buffer);
+
+ size = convert_string_talloc(ctx, CH_UNIX, CH_UTF16LE,
+ s, strlen(s)+1,
+ (void *)&ubuf,
+ True);
+ if (size == (size_t)-1) {
+ return NULL;
+ }
+
+ strupper_w(ubuf);
+
+ size = convert_string_talloc(ctx, CH_UTF16LE, CH_UNIX,
+ ubuf, size,
+ (void *)&out_buffer,
+ True);
+
+ /* Don't need the intermediate buffer
+ * anymore.
+ */
+
+ TALLOC_FREE(ubuf);
+
if (size == (size_t)-1) {
return NULL;
}
}
- return SMB_STRDUP(out_buffer);
+ return out_buffer;
}
size_t unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen)
@@ -870,27 +952,40 @@ static size_t ucs2_align(const void *base_ptr, const void *p, int flags)
* </dl>
*
* @param dest_len the maximum length in bytes allowed in the
- * destination. If @p dest_len is -1 then no maximum is used.
+ * destination.
**/
size_t push_ascii(void *dest, const char *src, size_t dest_len, int flags)
{
size_t src_len = strlen(src);
- pstring tmpbuf;
+ char *tmpbuf = NULL;
+ size_t ret;
- /* treat a pstring as "unlimited" length */
- if (dest_len == (size_t)-1)
- dest_len = sizeof(pstring);
+ /* No longer allow a length of -1. */
+ if (dest_len == (size_t)-1) {
+ smb_panic("push_ascii - dest_len == -1");
+ }
if (flags & STR_UPPER) {
- pstrcpy(tmpbuf, src);
+ tmpbuf = SMB_STRDUP(src);
+ if (!tmpbuf) {
+ smb_panic("malloc fail");
+ }
strupper_m(tmpbuf);
src = tmpbuf;
}
- if (flags & (STR_TERMINATE | STR_TERMINATE_ASCII))
+ if (flags & (STR_TERMINATE | STR_TERMINATE_ASCII)) {
src_len++;
+ }
- return convert_string(CH_UNIX, CH_DOS, src, src_len, dest, dest_len, True);
+ ret = convert_string(CH_UNIX, CH_DOS, src, src_len, dest, dest_len, True);
+ if (ret == (size_t)-1 &&
+ (flags & (STR_TERMINATE | STR_TERMINATE_ASCII))
+ && dest_len > 0) {
+ ((char *)dest)[0] = '\0';
+ }
+ SAFE_FREE(tmpbuf);
+ return ret;
}
size_t push_ascii_fstring(void *dest, const char *src)
@@ -942,6 +1037,18 @@ size_t push_ascii_nstring(void *dest, const char *src)
return dest_len;
}
+/********************************************************************
+ Push and malloc an ascii string. src and dest null terminated.
+********************************************************************/
+
+size_t push_ascii_allocate(char **dest, const char *src)
+{
+ size_t src_len = strlen(src)+1;
+
+ *dest = NULL;
+ return convert_string_allocate(NULL, CH_UNIX, CH_DOS, src, src_len, (void **)dest, True);
+}
+
/**
* Copy a string from a dos codepage source to a unix char* destination.
*
@@ -961,8 +1068,10 @@ size_t pull_ascii(char *dest, const void *src, size_t dest_len, size_t src_len,
{
size_t ret;
- if (dest_len == (size_t)-1)
- dest_len = sizeof(pstring);
+ if (dest_len == (size_t)-1) {
+ /* No longer allow dest_len of -1. */
+ smb_panic("pull_ascii - invalid dest_len of -1");
+ }
if (flags & STR_TERMINATE) {
if (src_len == (size_t)-1) {
@@ -1041,7 +1150,11 @@ static size_t pull_ascii_base_talloc(TALLOC_CTX *ctx,
}
/* Ensure we don't use an insane length from the client. */
if (src_len >= 1024*1024) {
- smb_panic("Bad src length in pull_ascii_base_talloc\n");
+ char *msg = talloc_asprintf(ctx,
+ "Bad src length (%u) in "
+ "pull_ascii_base_talloc",
+ (unsigned int)src_len);
+ smb_panic(msg);
}
}
@@ -1054,7 +1167,7 @@ static size_t pull_ascii_base_talloc(TALLOC_CTX *ctx,
True);
if (dest_len == (size_t)-1) {
- return 0;
+ dest_len = 0;
}
if (dest_len && dest) {
@@ -1102,7 +1215,7 @@ size_t pull_ascii_nstring(char *dest, size_t dest_len, const void *src)
* </dl>
*
* @param dest_len is the maximum length allowed in the
- * destination. If dest_len is -1 then no maxiumum is used.
+ * destination.
**/
size_t push_ucs2(const void *base_ptr, void *dest, const char *src, size_t dest_len, int flags)
@@ -1111,9 +1224,10 @@ size_t push_ucs2(const void *base_ptr, void *dest, const char *src, size_t dest_
size_t src_len;
size_t ret;
- /* treat a pstring as "unlimited" length */
- if (dest_len == (size_t)-1)
- dest_len = sizeof(pstring);
+ if (dest_len == (size_t)-1) {
+ /* No longer allow dest_len of -1. */
+ smb_panic("push_ucs2 - invalid dest_len of -1");
+ }
if (flags & STR_TERMINATE)
src_len = (size_t)-1;
@@ -1133,7 +1247,12 @@ size_t push_ucs2(const void *base_ptr, void *dest, const char *src, size_t dest_
ret = convert_string(CH_UNIX, CH_UTF16LE, src, src_len, dest, dest_len, True);
if (ret == (size_t)-1) {
- return 0;
+ if ((flags & STR_TERMINATE) &&
+ dest &&
+ dest_len) {
+ *(char *)dest = 0;
+ }
+ return len;
}
len += ret;
@@ -1204,23 +1323,32 @@ size_t push_ucs2_allocate(smb_ucs2_t **dest, const char *src)
static size_t push_utf8(void *dest, const char *src, size_t dest_len, int flags)
{
- size_t src_len = strlen(src);
- pstring tmpbuf;
+ size_t src_len = 0;
+ size_t ret;
+ char *tmpbuf = NULL;
- /* treat a pstring as "unlimited" length */
- if (dest_len == (size_t)-1)
- dest_len = sizeof(pstring);
+ if (dest_len == (size_t)-1) {
+ /* No longer allow dest_len of -1. */
+ smb_panic("push_utf8 - invalid dest_len of -1");
+ }
if (flags & STR_UPPER) {
- pstrcpy(tmpbuf, src);
- strupper_m(tmpbuf);
+ tmpbuf = strdup_upper(src);
+ if (!tmpbuf) {
+ return (size_t)-1;
+ }
src = tmpbuf;
+ src_len = strlen(src);
}
- if (flags & STR_TERMINATE)
+ src_len = strlen(src);
+ if (flags & STR_TERMINATE) {
src_len++;
+ }
- return convert_string(CH_UNIX, CH_UTF8, src, src_len, dest, dest_len, True);
+ ret = convert_string(CH_UNIX, CH_UTF8, src, src_len, dest, dest_len, True);
+ SAFE_FREE(tmpbuf);
+ return ret;
}
size_t push_utf8_fstring(void *dest, const char *src)
@@ -1275,8 +1403,17 @@ size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_
{
size_t ret;
- if (dest_len == (size_t)-1)
- dest_len = sizeof(pstring);
+ if (dest_len == (size_t)-1) {
+ /* No longer allow dest_len of -1. */
+ smb_panic("pull_ucs2 - invalid dest_len of -1");
+ }
+
+ if (!src_len) {
+ if (dest && dest_len > 0) {
+ dest[0] = '\0';
+ }
+ return 0;
+ }
if (ucs2_align(base_ptr, src, flags)) {
src = (const void *)((const char *)src + 1);
@@ -1301,7 +1438,8 @@ size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_
ret = convert_string(CH_UTF16LE, CH_UNIX, src, src_len, dest, dest_len, True);
if (ret == (size_t)-1) {
- return 0;
+ ret = 0;
+ dest_len = 0;
}
if (src_len == (size_t)-1)
@@ -1352,6 +1490,10 @@ static size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
}
#endif
+ if (!src_len) {
+ return 0;
+ }
+
if (ucs2_align(base_ptr, src, flags)) {
src = (const void *)((const char *)src + 1);
if (src_len != (size_t)-1)
@@ -1386,7 +1528,7 @@ static size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
(void *)&dest,
True);
if (dest_len == (size_t)-1) {
- return 0;
+ dest_len = 0;
}
if (src_len == (size_t)-1)
@@ -1395,7 +1537,21 @@ static size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
if (dest_len) {
/* Did we already process the terminating zero ? */
if (dest[dest_len-1] != 0) {
- dest[dest_len-1] = 0;
+ size_t size = talloc_get_size(dest);
+ /* Have we got space to append the '\0' ? */
+ if (size <= dest_len) {
+ /* No, realloc. */
+ dest = TALLOC_REALLOC_ARRAY(ctx, dest, char,
+ dest_len+1);
+ if (!dest) {
+ /* talloc fail. */
+ dest_len = (size_t)-1;
+ return 0;
+ }
+ }
+ /* Yay - space ! */
+ dest[dest_len] = '\0';
+ dest_len++;
}
} else if (dest) {
dest[0] = 0;
@@ -1517,11 +1673,9 @@ size_t push_string_fn(const char *function, unsigned int line,
* JRA.
*/
#if 0
- if (dest_len != (size_t)-1)
- clobber_region(function, line, dest, dest_len);
+ clobber_region(function, line, dest, dest_len);
#else
- if (dest_len != (size_t)-1)
- memset(dest, '\0', dest_len);
+ memset(dest, '\0', dest_len);
#endif
#endif
@@ -1554,8 +1708,7 @@ size_t pull_string_fn(const char *function, unsigned int line,
int flags)
{
#ifdef DEVELOPER
- if (dest_len != (size_t)-1)
- clobber_region(function, line, dest, dest_len);
+ clobber_region(function, line, dest, dest_len);
#endif
if ((base_ptr == NULL) && ((flags & (STR_ASCII|STR_UNICODE)) == 0)) {
diff --git a/source/lib/ctdbd_conn.c b/source/lib/ctdbd_conn.c
index f56520b4a36..08ab256accf 100644
--- a/source/lib/ctdbd_conn.c
+++ b/source/lib/ctdbd_conn.c
@@ -95,7 +95,7 @@ static NTSTATUS get_cluster_vnn(struct ctdbd_connection *conn, uint32 *vnn)
int32_t cstatus=-1;
NTSTATUS status;
status = ctdbd_control(conn,
- CTDB_CURRENT_NODE, CTDB_CONTROL_GET_VNN, 0,
+ CTDB_CURRENT_NODE, CTDB_CONTROL_GET_PNN, 0,
tdb_null, NULL, NULL, &cstatus);
if (!NT_STATUS_IS_OK(status)) {
cluster_fatal("ctdbd_control failed\n");
diff --git a/source/lib/events.c b/source/lib/events.c
index e915777217b..befab3f5c00 100644
--- a/source/lib/events.c
+++ b/source/lib/events.c
@@ -409,10 +409,11 @@ void dump_event_list(struct event_context *event_ctx)
evt = timeval_until(&now, &te->when);
- DEBUGADD(10,("Timed Event \"%s\" %lx handled in %d seconds\n",
+ DEBUGADD(10,("Timed Event \"%s\" %lx handled in %d seconds (at %s)\n",
te->event_name,
(unsigned long)te,
- (int)evt.tv_sec));
+ (int)evt.tv_sec,
+ http_timestring(te->when.tv_sec)));
}
for (fe = event_ctx->fd_events; fe; fe = fe->next) {
diff --git a/source/lib/fault.c b/source/lib/fault.c
index 3ddb88edc75..6ab1a079006 100644
--- a/source/lib/fault.c
+++ b/source/lib/fault.c
@@ -150,6 +150,14 @@ void dump_core_setup(const char *progname)
void dump_core(void)
{
+ static bool called;
+
+ if (called) {
+ DEBUG(0, ("dump_core() called recursive\n"));
+ exit(1);
+ }
+ called = true;
+
/* Note that even if core dumping has been disabled, we still set up
* the core path. This is to handle the case where core dumping is
* turned on in smb.conf and the relevant daemon is not restarted.
diff --git a/source/lib/module.c b/source/lib/module.c
index 1bf305ea3f7..57b4c38edc9 100644
--- a/source/lib/module.c
+++ b/source/lib/module.c
@@ -76,7 +76,7 @@ NTSTATUS smb_load_module(const char *module_name)
return do_smb_load_module(module_name, False);
}
-/* Load all modules in list and return number of
+/* Load all modules in list and return number of
* modules that has been successfully loaded */
int smb_load_modules(const char **modules)
{
@@ -96,28 +96,41 @@ int smb_load_modules(const char **modules)
NTSTATUS smb_probe_module(const char *subsystem, const char *module)
{
- pstring full_path;
-
+ char *full_path = NULL;
+ TALLOC_CTX *ctx = talloc_stackframe();
+ NTSTATUS status;
+
/* Check for absolute path */
- /* if we make any 'samba multibyte string'
- calls here, we break
+ /* if we make any 'samba multibyte string'
+ calls here, we break
for loading string modules */
DEBUG(5, ("Probing module '%s'\n", module));
- if (module[0] == '/')
- return do_smb_load_module(module, True);
-
- pstrcpy(full_path, lib_path(subsystem));
- pstrcat(full_path, "/");
- pstrcat(full_path, module);
- pstrcat(full_path, ".");
- pstrcat(full_path, shlib_ext());
-
- DEBUG(5, ("Probing module '%s': Trying to load from %s\n", module, full_path));
-
- return do_smb_load_module(full_path, True);
+ if (module[0] == '/') {
+ status = do_smb_load_module(module, True);
+ TALLOC_FREE(ctx);
+ return status;
+ }
+
+ full_path = talloc_asprintf(ctx,
+ "%s/%s.%s",
+ lib_path(subsystem),
+ module,
+ shlib_ext());
+ if (!full_path) {
+ TALLOC_FREE(ctx);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ DEBUG(5, ("Probing module '%s': Trying to load from %s\n",
+ module, full_path));
+
+ status = do_smb_load_module(full_path, True);
+
+ TALLOC_FREE(ctx);
+ return status;
}
#else /* HAVE_DLOPEN */
diff --git a/source/lib/ms_fnmatch.c b/source/lib/ms_fnmatch.c
index bdfaca143cf..9dc942c5f2e 100644
--- a/source/lib/ms_fnmatch.c
+++ b/source/lib/ms_fnmatch.c
@@ -1,4 +1,4 @@
-/*
+/*
Unix SMB/CIFS implementation.
filename matching routine
Copyright (C) Andrew Tridgell 1992-2004
@@ -7,21 +7,21 @@
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/>.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This module was originally based on fnmatch.c copyright by the Free
Software Foundation. It bears little (if any) resemblence to that
code now
-*/
+*/
#include "includes.h"
@@ -53,7 +53,7 @@ struct max_n {
an optimisation only. The ldot pointer is NULL if the string does
not contain a '.', otherwise it points at the last dot in 'n'.
*/
-static int ms_fnmatch_core(const smb_ucs2_t *p, const smb_ucs2_t *n,
+static int ms_fnmatch_core(const smb_ucs2_t *p, const smb_ucs2_t *n,
struct max_n *max_n, const smb_ucs2_t *ldot,
BOOL is_case_sensitive)
{
@@ -137,22 +137,23 @@ static int ms_fnmatch_core(const smb_ucs2_t *p, const smb_ucs2_t *n,
break;
}
}
-
+
if (! *n) {
return 0;
}
-
+
return -1;
}
int ms_fnmatch(const char *pattern, const char *string, BOOL translate_pattern,
BOOL is_case_sensitive)
{
- wpstring p, s;
+ smb_ucs2_t *p = NULL;
+ smb_ucs2_t *s = NULL;
int ret, count, i;
struct max_n *max_n = NULL;
- if (strcmp(string, "..") == 0) {
+ if (ISDOTDOT(string)) {
string = ".";
}
@@ -166,15 +167,12 @@ int ms_fnmatch(const char *pattern, const char *string, BOOL translate_pattern,
}
}
- if (push_ucs2(NULL, p, pattern, sizeof(p), STR_TERMINATE) == (size_t)-1) {
- /* Not quite the right answer, but finding the right one
- under this failure case is expensive, and it's pretty close */
+ if (push_ucs2_allocate(&p, pattern) == (size_t)-1) {
return -1;
}
- if (push_ucs2(NULL, s, string, sizeof(s), STR_TERMINATE) == (size_t)-1) {
- /* Not quite the right answer, but finding the right one
- under this failure case is expensive, and it's pretty close */
+ if (push_ucs2_allocate(&s, string) == (size_t)-1) {
+ SAFE_FREE(p);
return -1;
}
@@ -187,8 +185,8 @@ int ms_fnmatch(const char *pattern, const char *string, BOOL translate_pattern,
for (i=0;p[i];i++) {
if (p[i] == UCS2_CHAR('?')) {
p[i] = UCS2_CHAR('>');
- } else if (p[i] == UCS2_CHAR('.') &&
- (p[i+1] == UCS2_CHAR('?') ||
+ } else if (p[i] == UCS2_CHAR('.') &&
+ (p[i+1] == UCS2_CHAR('?') ||
p[i+1] == UCS2_CHAR('*') ||
p[i+1] == 0)) {
p[i] = UCS2_CHAR('"');
@@ -205,16 +203,17 @@ int ms_fnmatch(const char *pattern, const char *string, BOOL translate_pattern,
if (count != 0) {
max_n = SMB_CALLOC_ARRAY(struct max_n, count);
if (!max_n) {
+ SAFE_FREE(p);
+ SAFE_FREE(s);
return -1;
}
}
ret = ms_fnmatch_core(p, s, max_n, strrchr_w(s, UCS2_CHAR('.')), is_case_sensitive);
- if (max_n) {
- free(max_n);
- }
-
+ SAFE_FREE(max_n);
+ SAFE_FREE(p);
+ SAFE_FREE(s);
return ret;
}
diff --git a/source/lib/replace/dlfcn.m4 b/source/lib/replace/dlfcn.m4
index a1b57d10ec4..c5b7597d7a3 100644
--- a/source/lib/replace/dlfcn.m4
+++ b/source/lib/replace/dlfcn.m4
@@ -12,7 +12,7 @@ AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)],
[
return 0;
],[
- AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsinged int flags])
+ AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsigned int flags])
],[],[
#include <dlfcn.h>
])
diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4
index f06d7f83dc3..a6b1c4f5e68 100644
--- a/source/lib/replace/libreplace.m4
+++ b/source/lib/replace/libreplace.m4
@@ -152,6 +152,7 @@ AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)
AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp socketpair)
+AC_CHECK_FUNCS(isatty)
AC_HAVE_DECL(setresuid, [#include <unistd.h>])
AC_HAVE_DECL(setresgid, [#include <unistd.h>])
AC_HAVE_DECL(errno, [#include <errno.h>])
@@ -306,17 +307,6 @@ if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
fi
-AC_CACHE_CHECK([that the C compiler can precompile header files],samba_cv_precompiled_headers, [
- dnl Check whether the compiler can generate precompiled headers
- touch conftest.h
- if ${CC-cc} conftest.h 2> /dev/null && test -f conftest.h.gch; then
- precompiled_headers=yes
- else
- precompiled_headers=no
- fi])
-AC_SUBST(precompiled_headers)
-
-
dnl Check if the C compiler understands volatile (it should, being ANSI).
AC_CACHE_CHECK([that the C compiler understands volatile],samba_cv_volatile, [
AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0],
diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h
index 06173bd84b9..af05516e8ce 100644
--- a/source/lib/replace/replace.h
+++ b/source/lib/replace/replace.h
@@ -44,13 +44,6 @@
#include "win32_replace.h"
#endif
-#ifdef __COMPAR_FN_T
-#define QSORT_CAST (__compar_fn_t)
-#endif
-
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
@@ -78,28 +71,6 @@
#include <stddef.h>
#endif
-/**
- this is a warning hack. The idea is to use this everywhere that we
- get the "discarding const" warning from gcc. That doesn't actually
- fix the problem of course, but it means that when we do get to
- cleaning them up we can do it by searching the code for
- discard_const.
-
- It also means that other error types aren't as swamped by the noise
- of hundreds of const warnings, so we are more likely to notice when
- we get new errors.
-
- Please only add more uses of this macro when you find it
- _really_ hard to fix const warnings. Our aim is to eventually use
- this function in only a very few places.
-
- Also, please call this via the discard_const_p() macro interface, as that
- makes the return type safe.
-*/
-#define discard_const(ptr) ((void *)((intptr_t)(ptr)))
-
-/** Type-safe version of discard_const */
-#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
#ifndef HAVE_STRERROR
extern char *sys_errlist[];
@@ -363,6 +334,10 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
#include <limits.h>
#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
/* The extra casts work around common compiler bugs. */
#define _TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
@@ -375,6 +350,14 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
#define HOST_NAME_MAX 64
#endif
+/*
+ * Some older systems seem not to have MAXHOSTNAMELEN
+ * defined.
+ */
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN HOST_NAME_MAX
+#endif
+
#ifndef UINT16_MAX
#define UINT16_MAX 65535
#endif
@@ -450,9 +433,6 @@ typedef int bool;
#endif
#endif
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
@@ -462,11 +442,34 @@ typedef int bool;
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
+/**
+ this is a warning hack. The idea is to use this everywhere that we
+ get the "discarding const" warning from gcc. That doesn't actually
+ fix the problem of course, but it means that when we do get to
+ cleaning them up we can do it by searching the code for
+ discard_const.
+
+ It also means that other error types aren't as swamped by the noise
+ of hundreds of const warnings, so we are more likely to notice when
+ we get new errors.
+
+ Please only add more uses of this macro when you find it
+ _really_ hard to fix const warnings. Our aim is to eventually use
+ this function in only a very few places.
+
+ Also, please call this via the discard_const_p() macro interface, as that
+ makes the return type safe.
+*/
+#define discard_const(ptr) ((void *)((intptr_t)(ptr)))
+
+/** Type-safe version of discard_const */
+#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
+
#ifndef __STRING
#define __STRING(x) #x
#endif
-#ifndef _STRINGSTRING
+#ifndef __STRINGSTRING
#define __STRINGSTRING(x) __STRING(x)
#endif
@@ -511,4 +514,12 @@ typedef int bool;
#undef HAVE_MMAP
#endif
+#ifdef __COMPAR_FN_T
+#define QSORT_CAST (__compar_fn_t)
+#endif
+
+#ifndef QSORT_CAST
+#define QSORT_CAST (int (*)(const void *, const void *))
+#endif
+
#endif /* _LIBREPLACE_REPLACE_H */
diff --git a/source/lib/replace/system/network.h b/source/lib/replace/system/network.h
index 13d95a8ba7b..7469040b283 100644
--- a/source/lib/replace/system/network.h
+++ b/source/lib/replace/system/network.h
@@ -98,14 +98,6 @@ char *rep_inet_ntoa(struct in_addr ip);
#define MSG_WAITALL 0
#endif
-/*
- * Some older systems seem not to have MAXHOSTNAMELEN
- * defined.
- */
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 254
-#endif
-
#ifndef INADDR_LOOPBACK
#define INADDR_LOOPBACK 0x7f000001
#endif
diff --git a/source/lib/replace/test/testsuite.c b/source/lib/replace/test/testsuite.c
index 8584bcaa667..269a2ff5d62 100644
--- a/source/lib/replace/test/testsuite.c
+++ b/source/lib/replace/test/testsuite.c
@@ -743,7 +743,7 @@ static int test_strtoull(void)
TEST_STRTOULL("-02000000000000000000000",8, 18446744073709551615LLU, 24, ERANGE);
TEST_STRTOULL("-2000000000000000000000",8, 18446744073709551615LLU, 23, ERANGE);
- printf("success: strtuoll\n");
+ printf("success: strtoull\n");
return true;
}
diff --git a/source/lib/smbrun.c b/source/lib/smbrun.c
index b656822321d..26330ab992b 100644
--- a/source/lib/smbrun.c
+++ b/source/lib/smbrun.c
@@ -1,18 +1,18 @@
-/*
+/*
Unix SMB/CIFS implementation.
run a command as a specified user
Copyright (C) Andrew Tridgell 1992-1998
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,11 +27,19 @@ This is a utility function of smbrun().
****************************************************************************/
static int setup_out_fd(void)
-{
+{
int fd;
- pstring path;
-
- slprintf(path, sizeof(path)-1, "%s/smb.XXXXXX", tmpdir());
+ TALLOC_CTX *ctx = talloc_stackframe();
+ char *path = NULL;
+
+ path = talloc_asprintf(ctx,
+ "%s/smb.XXXXXX",
+ tmpdir());
+ if (!path) {
+ TALLOC_FREE(ctx);
+ errno = ENOMEM;
+ return -1;
+ }
/* now create the file */
fd = smb_mkstemp(path);
@@ -39,6 +47,7 @@ static int setup_out_fd(void)
if (fd == -1) {
DEBUG(0,("setup_out_fd: Failed to create file %s. (%s)\n",
path, strerror(errno) ));
+ TALLOC_FREE(ctx);
return -1;
}
@@ -46,6 +55,7 @@ static int setup_out_fd(void)
/* Ensure file only kept around by open fd. */
unlink(path);
+ TALLOC_FREE(ctx);
return fd;
}
@@ -59,7 +69,7 @@ static int smbrun_internal(const char *cmd, int *outfd, BOOL sanitize)
pid_t pid;
uid_t uid = current_user.ut.uid;
gid_t gid = current_user.ut.gid;
-
+
/*
* Lose any elevated privileges.
*/
diff --git a/source/lib/system.c b/source/lib/system.c
index 9cef818fab2..ab5c06d5f67 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -573,7 +573,11 @@ char *sys_getwd(char *s)
{
char *wd;
#ifdef HAVE_GETCWD
+#ifdef PATH_MAX
+ wd = (char *)getcwd(s, PATH_MAX);
+#else
wd = (char *)getcwd(s, sizeof (pstring));
+#endif
#else
wd = (char *)getwd(s);
#endif
@@ -1193,178 +1197,6 @@ struct group *sys_getgrgid(gid_t gid)
return getgrgid(gid);
}
-#if 0 /* NOT CURRENTLY USED - JRA */
-/**************************************************************************
- The following are the UNICODE versions of *all* system interface functions
- called within Samba. Ok, ok, the exceptions are the gethostbyXX calls,
- which currently are left as ascii as they are not used other than in name
- resolution.
-****************************************************************************/
-
-/**************************************************************************
- Wide stat. Just narrow and call sys_xxx.
-****************************************************************************/
-
-int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf)
-{
- pstring fname;
- return sys_stat(unicode_to_unix(fname,wfname,sizeof(fname)), sbuf);
-}
-
-/**************************************************************************
- Wide lstat. Just narrow and call sys_xxx.
-****************************************************************************/
-
-int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf)
-{
- pstring fname;
- return sys_lstat(unicode_to_unix(fname,wfname,sizeof(fname)), sbuf);
-}
-
-/**************************************************************************
- Wide creat. Just narrow and call sys_xxx.
-****************************************************************************/
-
-int wsys_creat(const smb_ucs2_t *wfname, mode_t mode)
-{
- pstring fname;
- return sys_creat(unicode_to_unix(fname,wfname,sizeof(fname)), mode);
-}
-
-/**************************************************************************
- Wide open. Just narrow and call sys_xxx.
-****************************************************************************/
-
-int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode)
-{
- pstring fname;
- return sys_open(unicode_to_unix(fname,wfname,sizeof(fname)), oflag, mode);
-}
-
-/**************************************************************************
- Wide fopen. Just narrow and call sys_xxx.
-****************************************************************************/
-
-FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type)
-{
- pstring fname;
- return sys_fopen(unicode_to_unix(fname,wfname,sizeof(fname)), type);
-}
-
-/**************************************************************************
- Wide opendir. Just narrow and call sys_xxx.
-****************************************************************************/
-
-SMB_STRUCT_DIR *wsys_opendir(const smb_ucs2_t *wfname)
-{
- pstring fname;
- return opendir(unicode_to_unix(fname,wfname,sizeof(fname)));
-}
-
-/**************************************************************************
- Wide readdir. Return a structure pointer containing a wide filename.
-****************************************************************************/
-
-SMB_STRUCT_WDIRENT *wsys_readdir(SMB_STRUCT_DIR *dirp)
-{
- static SMB_STRUCT_WDIRENT retval;
- SMB_STRUCT_DIRENT *dirval = sys_readdir(dirp);
-
- if(!dirval)
- return NULL;
-
- /*
- * The only POSIX defined member of this struct is d_name.
- */
-
- unix_to_unicode(retval.d_name,dirval->d_name,sizeof(retval.d_name));
-
- return &retval;
-}
-
-/**************************************************************************
- Wide getwd. Call sys_xxx and widen. Assumes s points to a wpstring.
-****************************************************************************/
-
-smb_ucs2_t *wsys_getwd(smb_ucs2_t *s)
-{
- pstring fname;
- char *p = sys_getwd(fname);
-
- if(!p)
- return NULL;
-
- return unix_to_unicode(s, p, sizeof(wpstring));
-}
-
-/**************************************************************************
- Wide chown. Just narrow and call sys_xxx.
-****************************************************************************/
-
-int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid)
-{
- pstring fname;
- return chown(unicode_to_unix(fname,wfname,sizeof(fname)), uid, gid);
-}
-
-/**************************************************************************
- Wide chroot. Just narrow and call sys_xxx.
-****************************************************************************/
-
-int wsys_chroot(const smb_ucs2_t *wfname)
-{
- pstring fname;
- return chroot(unicode_to_unix(fname,wfname,sizeof(fname)));
-}
-
-/**************************************************************************
- Wide getpwnam. Return a structure pointer containing wide names.
-****************************************************************************/
-
-SMB_STRUCT_WPASSWD *wsys_getpwnam(const smb_ucs2_t *wname)
-{
- static SMB_STRUCT_WPASSWD retval;
- fstring name;
- struct passwd *pwret = sys_getpwnam(unicode_to_unix(name,wname,sizeof(name)));
-
- if(!pwret)
- return NULL;
-
- unix_to_unicode(retval.pw_name, pwret->pw_name, sizeof(retval.pw_name));
- retval.pw_passwd = pwret->pw_passwd;
- retval.pw_uid = pwret->pw_uid;
- retval.pw_gid = pwret->pw_gid;
- unix_to_unicode(retval.pw_gecos, pwret->pw_gecos, sizeof(retval.pw_gecos));
- unix_to_unicode(retval.pw_dir, pwret->pw_dir, sizeof(retval.pw_dir));
- unix_to_unicode(retval.pw_shell, pwret->pw_shell, sizeof(retval.pw_shell));
-
- return &retval;
-}
-
-/**************************************************************************
- Wide getpwuid. Return a structure pointer containing wide names.
-****************************************************************************/
-
-SMB_STRUCT_WPASSWD *wsys_getpwuid(uid_t uid)
-{
- static SMB_STRUCT_WPASSWD retval;
- struct passwd *pwret = sys_getpwuid(uid);
-
- if(!pwret)
- return NULL;
-
- unix_to_unicode(retval.pw_name, pwret->pw_name, sizeof(retval.pw_name));
- retval.pw_passwd = pwret->pw_passwd;
- retval.pw_uid = pwret->pw_uid;
- retval.pw_gid = pwret->pw_gid;
- unix_to_unicode(retval.pw_gecos, pwret->pw_gecos, sizeof(retval.pw_gecos));
- unix_to_unicode(retval.pw_dir, pwret->pw_dir, sizeof(retval.pw_dir));
- unix_to_unicode(retval.pw_shell, pwret->pw_shell, sizeof(retval.pw_shell));
-
- return &retval;
-}
-#endif /* NOT CURRENTLY USED - JRA */
-
/**************************************************************************
Extract a command into an arg list.
****************************************************************************/
diff --git a/source/lib/talloc/configure.ac b/source/lib/talloc/configure.ac
index 5f465fe93ab..afc2a944f01 100644
--- a/source/lib/talloc/configure.ac
+++ b/source/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.50)
-AC_INIT(talloc, 1.0)
+AC_INIT(talloc, 1.1.0)
AC_CONFIG_SRCDIR([talloc.c])
AC_SUBST(datarootdir)
AC_CONFIG_HEADER(config.h)
diff --git a/source/lib/talloc/talloc.c b/source/lib/talloc/talloc.c
index c073a8c7743..4d72c0e871a 100644
--- a/source/lib/talloc/talloc.c
+++ b/source/lib/talloc/talloc.c
@@ -1109,64 +1109,132 @@ void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name
return newp;
}
+static inline char *__talloc_strlendup(const void *t, const char *p, size_t len)
+{
+ char *ret;
+
+ ret = (char *)__talloc(t, len + 1);
+ if (unlikely(!ret)) return NULL;
+
+ memcpy(ret, p, len);
+ ret[len] = 0;
+
+ _talloc_set_name_const(ret, ret);
+ return ret;
+}
+
/*
- strdup with a talloc
+ strdup with a talloc
*/
char *talloc_strdup(const void *t, const char *p)
{
+ if (unlikely(!p)) return NULL;
+ return __talloc_strlendup(t, p, strlen(p));
+}
+
+/*
+ strndup with a talloc
+*/
+char *talloc_strndup(const void *t, const char *p, size_t n)
+{
+ if (unlikely(!p)) return NULL;
+ return __talloc_strlendup(t, p, strnlen(p, n));
+}
+
+static inline char *__talloc_strlendup_append(char *s, size_t slen,
+ const char *a, size_t alen)
+{
char *ret;
- if (!p) {
- return NULL;
+
+ ret = talloc_realloc(NULL, s, char, slen + alen + 1);
+ if (unlikely(!ret)) return NULL;
+
+ /* append the string and the trailing \0 */
+ memcpy(&ret[slen], a, alen);
+ ret[slen+alen] = 0;
+
+ _talloc_set_name_const(ret, ret);
+ return ret;
+}
+
+/*
+ * Appends at the end of the string.
+ */
+char *talloc_strdup_append(char *s, const char *a)
+{
+ if (unlikely(!s)) {
+ return talloc_strdup(NULL, a);
}
- ret = (char *)talloc_memdup(t, p, strlen(p) + 1);
- if (likely(ret)) {
- _talloc_set_name_const(ret, ret);
+
+ if (unlikely(!a)) {
+ return s;
}
- return ret;
+
+ return __talloc_strlendup_append(s, strlen(s), a, strlen(a));
}
/*
- append to a talloced string
-*/
-char *talloc_append_string(const void *t, char *orig, const char *append)
+ * Appends at the end of the talloc'ed buffer,
+ * not the end of the string.
+ */
+char *talloc_strdup_append_buffer(char *s, const char *a)
{
- char *ret;
- size_t olen = strlen(orig);
- size_t alenz;
+ size_t slen;
- if (!append)
- return orig;
+ if (unlikely(!s)) {
+ return talloc_strdup(NULL, a);
+ }
- alenz = strlen(append) + 1;
+ if (unlikely(!a)) {
+ return s;
+ }
- ret = talloc_realloc(t, orig, char, olen + alenz);
- if (!ret)
- return NULL;
+ slen = talloc_get_size(s);
+ if (likely(slen > 0)) {
+ slen--;
+ }
- /* append the string with the trailing \0 */
- memcpy(&ret[olen], append, alenz);
+ return __talloc_strlendup_append(s, slen, a, strlen(a));
+}
- _talloc_set_name_const(ret, ret);
+/*
+ * Appends at the end of the string.
+ */
+char *talloc_strndup_append(char *s, const char *a, size_t n)
+{
+ if (unlikely(!s)) {
+ return talloc_strdup(NULL, a);
+ }
- return ret;
+ if (unlikely(!a)) {
+ return s;
+ }
+
+ return __talloc_strlendup_append(s, strlen(s), a, strnlen(a, n));
}
/*
- strndup with a talloc
-*/
-char *talloc_strndup(const void *t, const char *p, size_t n)
+ * Appends at the end of the talloc'ed buffer,
+ * not the end of the string.
+ */
+char *talloc_strndup_append_buffer(char *s, const char *a, size_t n)
{
- size_t len;
- char *ret;
+ size_t slen;
- for (len=0; len<n && p[len]; len++) ;
+ if (unlikely(!s)) {
+ return talloc_strdup(NULL, a);
+ }
- ret = (char *)__talloc(t, len + 1);
- if (!ret) { return NULL; }
- memcpy(ret, p, len);
- ret[len] = 0;
- _talloc_set_name_const(ret, ret);
- return ret;
+ if (unlikely(!a)) {
+ return s;
+ }
+
+ slen = talloc_get_size(s);
+ if (likely(slen > 0)) {
+ slen--;
+ }
+
+ return __talloc_strlendup_append(s, slen, a, strnlen(a, n));
}
#ifndef HAVE_VA_COPY
@@ -1188,18 +1256,18 @@ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap)
va_copy(ap2, ap);
len = vsnprintf(&c, 1, fmt, ap2);
va_end(ap2);
- if (len < 0) {
+ if (unlikely(len < 0)) {
return NULL;
}
ret = (char *)__talloc(t, len+1);
- if (ret) {
- va_copy(ap2, ap);
- vsnprintf(ret, len+1, fmt, ap2);
- va_end(ap2);
- _talloc_set_name_const(ret, ret);
- }
+ if (unlikely(!ret)) return NULL;
+
+ va_copy(ap2, ap);
+ vsnprintf(ret, len+1, fmt, ap2);
+ va_end(ap2);
+ _talloc_set_name_const(ret, ret);
return ret;
}
@@ -1219,52 +1287,78 @@ char *talloc_asprintf(const void *t, const char *fmt, ...)
return ret;
}
+static inline char *__talloc_vaslenprintf_append(char *s, size_t slen,
+ const char *fmt, va_list ap)
+ PRINTF_ATTRIBUTE(3,0);
-/**
- * Realloc @p s to append the formatted result of @p fmt and @p ap,
- * and return @p s, which may have moved. Good for gradually
- * accumulating output into a string buffer.
- **/
-char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
-{
- struct talloc_chunk *tc;
- int len, s_len;
+static inline char *__talloc_vaslenprintf_append(char *s, size_t slen,
+ const char *fmt, va_list ap)
+{
+ ssize_t alen;
va_list ap2;
char c;
- if (s == NULL) {
- return talloc_vasprintf(NULL, fmt, ap);
- }
-
- tc = talloc_chunk_from_ptr(s);
-
- s_len = tc->size - 1;
-
va_copy(ap2, ap);
- len = vsnprintf(&c, 1, fmt, ap2);
+ alen = vsnprintf(&c, 1, fmt, ap2);
va_end(ap2);
- if (len <= 0) {
+ if (alen <= 0) {
/* Either the vsnprintf failed or the format resulted in
* no characters being formatted. In the former case, we
* ought to return NULL, in the latter we ought to return
- * the original string. Most current callers of this
+ * the original string. Most current callers of this
* function expect it to never return NULL.
*/
return s;
}
- s = talloc_realloc(NULL, s, char, s_len + len+1);
+ s = talloc_realloc(NULL, s, char, slen + alen + 1);
if (!s) return NULL;
va_copy(ap2, ap);
- vsnprintf(s+s_len, len+1, fmt, ap2);
+ vsnprintf(s + slen, alen + 1, fmt, ap2);
va_end(ap2);
- _talloc_set_name_const(s, s);
+ _talloc_set_name_const(s, s);
return s;
}
+/**
+ * Realloc @p s to append the formatted result of @p fmt and @p ap,
+ * and return @p s, which may have moved. Good for gradually
+ * accumulating output into a string buffer. Appends at the end
+ * of the string.
+ **/
+char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
+{
+ if (unlikely(!s)) {
+ return talloc_vasprintf(NULL, fmt, ap);
+ }
+
+ return __talloc_vaslenprintf_append(s, strlen(s), fmt, ap);
+}
+
+/**
+ * Realloc @p s to append the formatted result of @p fmt and @p ap,
+ * and return @p s, which may have moved. Always appends at the
+ * end of the talloc'ed buffer, not the end of the string.
+ **/
+char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap)
+{
+ size_t slen;
+
+ if (unlikely(!s)) {
+ return talloc_vasprintf(NULL, fmt, ap);
+ }
+
+ slen = talloc_get_size(s);
+ if (likely(slen > 0)) {
+ slen--;
+ }
+
+ return __talloc_vaslenprintf_append(s, slen, fmt, ap);
+}
+
/*
Realloc @p s to append the formatted result of @p fmt and return @p
s, which may have moved. Good for gradually accumulating output
@@ -1281,6 +1375,21 @@ char *talloc_asprintf_append(char *s, const char *fmt, ...)
}
/*
+ Realloc @p s to append the formatted result of @p fmt and return @p
+ s, which may have moved. Good for gradually accumulating output
+ into a buffer.
+ */
+char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ s = talloc_vasprintf_append_buffer(s, fmt, ap);
+ va_end(ap);
+ return s;
+}
+
+/*
alloc an array, checking for integer overflow in the array size
*/
void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name)
diff --git a/source/lib/talloc/talloc.h b/source/lib/talloc/talloc.h
index 15130d0d982..e1033916817 100644
--- a/source/lib/talloc/talloc.h
+++ b/source/lib/talloc/talloc.h
@@ -111,6 +111,7 @@ typedef void TALLOC_CTX;
#define talloc_array_p(ctx, type, count) talloc_array(ctx, type, count)
#define talloc_realloc_p(ctx, p, type, count) talloc_realloc(ctx, p, type, count)
#define talloc_destroy(ctx) talloc_free(ctx)
+#define talloc_append_string(c, s, a) (s?talloc_strdup_append(s,a):talloc_strdup(c, a))
#endif
/* The following definitions come from talloc.c */
@@ -152,13 +153,6 @@ void talloc_enable_leak_report(void);
void talloc_enable_leak_report_full(void);
void *_talloc_zero(const void *ctx, size_t size, const char *name);
void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name);
-char *talloc_strdup(const void *t, const char *p);
-char *talloc_strndup(const void *t, const char *p, size_t n);
-char *talloc_append_string(const void *t, char *orig, const char *append);
-char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
-char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
-char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
-char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name);
void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count, const char *name);
void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
@@ -169,4 +163,20 @@ void *talloc_find_parent_byname(const void *ctx, const char *name);
void talloc_show_parents(const void *context, FILE *file);
int talloc_is_parent(const void *context, const void *ptr);
+char *talloc_strdup(const void *t, const char *p);
+char *talloc_strdup_append(char *s, const char *a);
+char *talloc_strdup_append_buffer(char *s, const char *a);
+
+char *talloc_strndup(const void *t, const char *p, size_t n);
+char *talloc_strndup_append(char *s, const char *a, size_t n);
+char *talloc_strndup_append_buffer(char *s, const char *a, size_t n);
+
+char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
+char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
+char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
+
+char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+
#endif
diff --git a/source/lib/talloc/talloc_guide.txt b/source/lib/talloc/talloc_guide.txt
index c4634ae19a9..18663b370d9 100644
--- a/source/lib/talloc/talloc_guide.txt
+++ b/source/lib/talloc/talloc_guide.txt
@@ -568,8 +568,23 @@ string. This is equivalent to:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
char *talloc_asprintf_append(char *s, const char *fmt, ...);
+The talloc_asprintf_append() function appends the given formatted
+string to the given string.
+Use this varient when the string in the current talloc buffer may
+have been truncated in length.
+
+This functions sets the name of the new pointer to the new
+string. This is equivalent to:
+ talloc_set_name_const(ptr, ptr)
+
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...);
+
The talloc_asprintf_append() function appends the given formatted
-string to the given string.
+string to the end of the currently allocated talloc buffer.
+Use this varient when the string in the current talloc buffer has
+not been changed.
This functions sets the name of the new pointer to the new
string. This is equivalent to:
@@ -577,7 +592,7 @@ string. This is equivalent to:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-(type *)talloc_array(const void *ctx, type, uint_t count);
+((type *)talloc_array(const void *ctx, type, uint_t count);
The talloc_array() macro is equivalent to:
diff --git a/source/lib/talloc/testsuite.c b/source/lib/talloc/testsuite.c
index 2e3ae65082f..e16c91f8b9c 100644
--- a/source/lib/talloc/testsuite.c
+++ b/source/lib/talloc/testsuite.c
@@ -106,7 +106,7 @@ static bool test_ref1(void)
{
void *root, *p1, *p2, *ref, *r1;
- printf("test: ref1 [\nSINGLE REFERENCE FREE\n]\n");
+ printf("test: ref1\n# SINGLE REFERENCE FREE\n");
root = talloc_named_const(NULL, 0, "root");
p1 = talloc_named_const(root, 1, "p1");
@@ -162,7 +162,7 @@ static bool test_ref2(void)
{
void *root, *p1, *p2, *ref, *r1;
- printf("test: ref2 [\nDOUBLE REFERENCE FREE\n]\n");
+ printf("test: ref2\n# DOUBLE REFERENCE FREE\n");
root = talloc_named_const(NULL, 0, "root");
p1 = talloc_named_const(root, 1, "p1");
talloc_named_const(p1, 1, "x1");
@@ -217,7 +217,7 @@ static bool test_ref3(void)
{
void *root, *p1, *p2, *ref, *r1;
- printf("test: ref3 [\nPARENT REFERENCE FREE\n]\n");
+ printf("test: ref3\n# PARENT REFERENCE FREE\n");
root = talloc_named_const(NULL, 0, "root");
p1 = talloc_named_const(root, 1, "p1");
@@ -256,7 +256,7 @@ static bool test_ref4(void)
{
void *root, *p1, *p2, *ref, *r1;
- printf("test: ref4 [\nREFERRER REFERENCE FREE\n]\n");
+ printf("test: ref4\n# REFERRER REFERENCE FREE\n");
root = talloc_named_const(NULL, 0, "root");
p1 = talloc_named_const(root, 1, "p1");
@@ -306,7 +306,7 @@ static bool test_unlink1(void)
{
void *root, *p1, *p2, *ref, *r1;
- printf("test: unlink [\nUNLINK\n]\n");
+ printf("test: unlink\n# UNLINK\n");
root = talloc_named_const(NULL, 0, "root");
p1 = talloc_named_const(root, 1, "p1");
@@ -358,7 +358,7 @@ static bool test_misc(void)
double *d;
const char *name;
- printf("test: misc [\nMISCELLANEOUS\n]\n");
+ printf("test: misc\n# MISCELLANEOUS\n");
root = talloc_new(NULL);
@@ -419,15 +419,15 @@ static bool test_misc(void)
p2 = talloc_strndup(p1, "foo", 2);
torture_assert("misc", strcmp("fo", p2) == 0,
"strndup doesn't work\n");
- p2 = talloc_asprintf_append(p2, "o%c", 'd');
+ p2 = talloc_asprintf_append_buffer(p2, "o%c", 'd');
torture_assert("misc", strcmp("food", p2) == 0,
- "talloc_asprintf_append doesn't work\n");
+ "talloc_asprintf_append_buffer doesn't work\n");
CHECK_BLOCKS("misc", p2, 1);
CHECK_BLOCKS("misc", p1, 3);
- p2 = talloc_asprintf_append(NULL, "hello %s", "world");
+ p2 = talloc_asprintf_append_buffer(NULL, "hello %s", "world");
torture_assert("misc", strcmp("hello world", p2) == 0,
- "talloc_asprintf_append doesn't work\n");
+ "talloc_asprintf_append_buffer doesn't work\n");
CHECK_BLOCKS("misc", p2, 1);
CHECK_BLOCKS("misc", p1, 3);
talloc_free(p2);
@@ -509,7 +509,7 @@ static bool test_realloc(void)
{
void *root, *p1, *p2;
- printf("test: realloc [\nREALLOC\n]\n");
+ printf("test: realloc\n# REALLOC\n");
root = talloc_new(NULL);
@@ -553,7 +553,7 @@ static bool test_realloc(void)
talloc_free(root);
- printf("success: REALLOC\n");
+ printf("success: realloc\n");
return true;
}
@@ -617,7 +617,7 @@ static bool test_type(void)
};
struct el1 *el1;
- printf("test: type [\ntalloc type checking\n]\n");
+ printf("test: type\n# talloc type checking\n");
root = talloc_new(NULL);
@@ -646,7 +646,7 @@ static bool test_steal(void)
{
void *root, *p1, *p2;
- printf("test: steal [\nSTEAL\n]\n");
+ printf("test: steal\n# STEAL\n");
root = talloc_new(NULL);
@@ -702,7 +702,7 @@ static bool test_move(void)
int *x;
} *t1, *t2;
- printf("test: move [\nMOVE\n]\n");
+ printf("test: move\n# MOVE\n");
root = talloc_new(NULL);
@@ -732,7 +732,7 @@ static bool test_realloc_fn(void)
{
void *root, *p1;
- printf("test: realloc_fn [\ntalloc_realloc_fn\n]\n");
+ printf("test: realloc_fn\n# talloc_realloc_fn\n");
root = talloc_new(NULL);
@@ -757,7 +757,7 @@ static bool test_unref_reparent(void)
{
void *root, *p1, *p2, *c1;
- printf("test: unref_reparent [\nUNREFERENCE AFTER PARENT FREED\n]\n");
+ printf("test: unref_reparent\n# UNREFERENCE AFTER PARENT FREED\n");
root = talloc_named_const(NULL, 0, "root");
p1 = talloc_named_const(root, 1, "orig parent");
@@ -794,7 +794,7 @@ static bool test_speed(void)
int i;
struct timeval tv;
- printf("test: speed [\nTALLOC VS MALLOC SPEED\n]\n");
+ printf("test: speed\n# TALLOC VS MALLOC SPEED\n");
tv = timeval_current();
count = 0;
@@ -840,7 +840,7 @@ static bool test_lifeless(void)
char *parent, *child;
void *child_owner = talloc_new(NULL);
- printf("test: lifeless [\nTALLOC_UNLINK LOOP\n]\n");
+ printf("test: lifeless\n# TALLOC_UNLINK LOOP\n");
parent = talloc_strdup(top, "parent");
child = talloc_strdup(parent, "child");
@@ -874,7 +874,7 @@ static bool test_loop(void)
char *req2, *req3;
} *req1;
- printf("test: loop [\nTALLOC LOOP DESTRUCTION\n]\n");
+ printf("test: loop\n# TALLOC LOOP DESTRUCTION\n");
parent = talloc_strdup(top, "parent");
req1 = talloc(parent, struct req1);
@@ -908,7 +908,7 @@ static bool test_free_parent_deny_child(void)
char *level2;
char *level3;
- printf("test: free_parent_deny_child [\nTALLOC FREE PARENT DENY CHILD\n]\n");
+ printf("test: free_parent_deny_child\n# TALLOC FREE PARENT DENY CHILD\n");
level1 = talloc_strdup(top, "level1");
level2 = talloc_strdup(level1, "level2");
@@ -938,7 +938,7 @@ static bool test_talloc_ptrtype(void)
const char *location3;
const char *location4;
- printf("test: ptrtype [\nTALLOC PTRTYPE\n]\n");
+ printf("test: ptrtype\n# TALLOC PTRTYPE\n");
s1 = talloc_ptrtype(top, s1);location1 = __location__;
@@ -1024,7 +1024,7 @@ static bool test_talloc_free_in_destructor(void)
void *level4;
void **level5;
- printf("test: free_in_destructor [\nTALLOC FREE IN DESTRUCTOR\n]\n");
+ printf("test: free_in_destructor\n# TALLOC FREE IN DESTRUCTOR\n");
level0 = talloc_new(NULL);
level1 = talloc_new(level0);
@@ -1053,7 +1053,7 @@ static bool test_autofree(void)
#if _SAMBA_BUILD_ < 4
/* autofree test would kill smbtorture */
void *p;
- printf("test: autofree [\nTALLOC AUTOFREE CONTEXT\n]\n");
+ printf("test: autofree\n# TALLOC AUTOFREE CONTEXT\n");
p = talloc_autofree_context();
talloc_free(p);
diff --git a/source/lib/util.c b/source/lib/util.c
index cf39c0980d0..516598b357e 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -1557,20 +1557,22 @@ BOOL process_exists_by_pid(pid_t pid)
const char *uidtoname(uid_t uid)
{
- fstring name;
- struct passwd *pass;
+ TALLOC_CTX *ctx = talloc_tos();
+ char *name = NULL;
+ struct passwd *pass = NULL;
- pass = getpwuid_alloc(talloc_tos(), uid);
+ pass = getpwuid_alloc(ctx,uid);
if (pass) {
- fstrcpy(name, pass->pw_name);
+ name = talloc_strdup(ctx,pass->pw_name);
TALLOC_FREE(pass);
} else {
- slprintf(name, sizeof(name) - 1, "%ld",(long int)uid);
+ name = talloc_asprintf(ctx,
+ "%ld",
+ (long int)uid);
}
- return talloc_strdup(talloc_tos(), name);
+ return name;
}
-
/*******************************************************************
Convert a gid into a group name.
********************************************************************/
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index bac94740cd7..fbd9c1ca6da 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -6,6 +6,7 @@
Copyright (C) Simo Sorce 2001-2002
Copyright (C) Martin Pool 2003
Copyright (C) James Peach 2006
+ Copyright (C) Jeremy Allison 1992-2007
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -264,12 +265,63 @@ int StrCaseCmp(const char *s, const char *t)
/**
Case insensitive string compararison, length limited.
**/
-int StrnCaseCmp(const char *s, const char *t, size_t n)
+int StrnCaseCmp(const char *s, const char *t, size_t len)
{
- pstring buf1, buf2;
- unix_strupper(s, strlen(s)+1, buf1, sizeof(buf1));
- unix_strupper(t, strlen(t)+1, buf2, sizeof(buf2));
- return strncmp(buf1,buf2,n);
+ size_t n = 0;
+ const char *ps, *pt;
+ size_t size;
+ smb_ucs2_t *buffer_s, *buffer_t;
+ int ret;
+
+ for (ps = s, pt = t; n < len ; ps++, pt++, n++) {
+ char us, ut;
+
+ if (!*ps && !*pt)
+ return 0; /* both ended */
+ else if (!*ps)
+ return -1; /* s is a prefix */
+ else if (!*pt)
+ return +1; /* t is a prefix */
+ else if ((*ps & 0x80) || (*pt & 0x80))
+ /* not ascii anymore, do it the
+ * hard way from here on in */
+ break;
+
+ us = toupper_ascii(*ps);
+ ut = toupper_ascii(*pt);
+ if (us == ut)
+ continue;
+ else if (us < ut)
+ return -1;
+ else if (us > ut)
+ return +1;
+ }
+
+ if (n == len) {
+ return 0;
+ }
+
+ size = push_ucs2_allocate(&buffer_s, ps);
+ if (size == (size_t)-1) {
+ return strncmp(ps, pt, len-n);
+ /* Not quite the right answer, but finding the right one
+ under this failure case is expensive,
+ and it's pretty close */
+ }
+
+ size = push_ucs2_allocate(&buffer_t, pt);
+ if (size == (size_t)-1) {
+ SAFE_FREE(buffer_s);
+ return strncmp(ps, pt, len-n);
+ /* Not quite the right answer, but finding the right one
+ under this failure case is expensive,
+ and it's pretty close */
+ }
+
+ ret = strncasecmp_w(buffer_s, buffer_t, len-n);
+ SAFE_FREE(buffer_s);
+ SAFE_FREE(buffer_t);
+ return ret;
}
/**
@@ -283,7 +335,7 @@ BOOL strequal(const char *s1, const char *s2)
return(True);
if (!s1 || !s2)
return(False);
-
+
return(StrCaseCmp(s1,s2)==0);
}
@@ -298,7 +350,7 @@ BOOL strnequal(const char *s1,const char *s2,size_t n)
return(True);
if (!s1 || !s2 || !n)
return(False);
-
+
return(StrnCaseCmp(s1,s2,n)==0);
}
@@ -353,11 +405,16 @@ int strwicmp(const char *psz1, const char *psz2)
char *strupper_static(const char *s)
{
- static pstring str;
+ static char *str = NULL;
- pstrcpy(str, s);
+ if (str) {
+ SAFE_FREE(str);
+ }
+ str = SMB_STRDUP(s);
+ if (!str) {
+ return CONST_DISCARD(char *,s);
+ }
strupper_m(str);
-
return str;
}
@@ -381,7 +438,7 @@ BOOL strisnormal(const char *s, int case_default)
{
if (case_default == CASE_UPPER)
return(!strhaslower(s));
-
+
return(!strhasupper(s));
}
@@ -390,12 +447,9 @@ BOOL strisnormal(const char *s, int case_default)
String replace.
NOTE: oldc and newc must be 7 bit characters
**/
-
-void string_replace( pstring s, char oldc, char newc )
+void string_replace( char *s, char oldc, char newc )
{
char *p;
- smb_ucs2_t *tmp;
- size_t len;
/* this is quite a common operation, so we want it to be
fast. We optimise for the ascii case, knowing that all our
@@ -405,8 +459,9 @@ void string_replace( pstring s, char oldc, char newc )
for (p = s; *p; p++) {
if (*p & 0x80) /* mb string - slow path. */
break;
- if (*p == oldc)
+ if (*p == oldc) {
*p = newc;
+ }
}
if (!*p)
@@ -417,13 +472,18 @@ void string_replace( pstring s, char oldc, char newc )
/* With compose characters we must restart from the beginning. JRA. */
p = s;
#endif
- len = push_ucs2_allocate(&tmp, p);
- if (len == -1) {
- return;
+
+ while (*p) {
+ size_t c_size;
+ next_codepoint(p, &c_size);
+
+ if (c_size == 1) {
+ if (*p == oldc) {
+ *p = newc;
+ }
+ }
+ p += c_size;
}
- string_replace_w(tmp, UCS2_CHAR(oldc), UCS2_CHAR(newc));
- pull_ucs2(NULL, p, tmp, len/2, -1, STR_TERMINATE);
- SAFE_FREE(tmp);
}
/**
@@ -470,9 +530,14 @@ char *skip_string(const char *base, size_t len, char *buf)
size_t str_charnum(const char *s)
{
- uint16 tmpbuf2[sizeof(pstring)];
- push_ucs2(NULL, tmpbuf2,s, sizeof(tmpbuf2), STR_TERMINATE);
- return strlen_w(tmpbuf2);
+ size_t ret;
+ smb_ucs2_t *tmpbuf2 = NULL;
+ if (push_ucs2_allocate(&tmpbuf2, s) == (size_t)-1) {
+ return 0;
+ }
+ ret = strlen_w(tmpbuf2);
+ SAFE_FREE(tmpbuf2);
+ return ret;
}
/**
@@ -483,9 +548,14 @@ size_t str_charnum(const char *s)
size_t str_ascii_charnum(const char *s)
{
- pstring tmpbuf2;
- push_ascii(tmpbuf2, s, sizeof(tmpbuf2), STR_TERMINATE);
- return strlen(tmpbuf2);
+ size_t ret;
+ char *tmpbuf2 = NULL;
+ if (push_ascii_allocate(&tmpbuf2, s) == (size_t)-1) {
+ return 0;
+ }
+ ret = strlen(tmpbuf2);
+ SAFE_FREE(tmpbuf2);
+ return ret;
}
BOOL trim_char(char *s,char cfront,char cback)
@@ -913,22 +983,38 @@ char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
BOOL in_list(const char *s, const char *list, BOOL casesensitive)
{
- pstring tok;
+ char *tok;
const char *p=list;
+ size_t bufsize = strlen(list);
+ BOOL ret = False;
if (!list)
return(False);
- while (next_token(&p,tok,LIST_SEP,sizeof(tok))) {
+ /* We know a token can't be larger
+ * than the entire list. */
+
+ tok = SMB_MALLOC_ARRAY(char, bufsize+1);
+ if (!tok) {
+ return False;
+ }
+
+ while (next_token(&p,tok,LIST_SEP,bufsize+1)) {
if (casesensitive) {
- if (strcmp(tok,s) == 0)
- return(True);
+ if (strcmp(tok,s) == 0) {
+ ret = True;
+ break;
+ }
} else {
- if (StrCaseCmp(tok,s) == 0)
- return(True);
+ if (StrCaseCmp(tok,s) == 0) {
+ ret = True;
+ break;
+ }
}
}
- return(False);
+
+ SAFE_FREE(tok);
+ return ret;
}
/* this is used to prevent lots of mallocs of size 1 */
@@ -1376,10 +1462,11 @@ char *string_truncate(char *s, unsigned int length)
char *strchr_m(const char *src, char c)
{
- wpstring ws;
- pstring s2;
+ smb_ucs2_t *ws = NULL;
+ char *s2 = NULL;
smb_ucs2_t *p;
const char *s;
+ char *ret;
/* characters below 0x3F are guaranteed to not appear in
non-initial position in multi-byte charsets */
@@ -1405,13 +1492,25 @@ char *strchr_m(const char *src, char c)
s = src;
#endif
- push_ucs2(NULL, ws, s, sizeof(ws), STR_TERMINATE);
+ if (push_ucs2_allocate(&ws, s)==(size_t)-1) {
+ /* Wrong answer, but what can we do... */
+ return strchr(src, c);
+ }
p = strchr_w(ws, UCS2_CHAR(c));
- if (!p)
+ if (!p) {
+ SAFE_FREE(ws);
return NULL;
+ }
*p = 0;
- pull_ucs2_pstring(s2, ws);
- return (char *)(s+strlen(s2));
+ if (pull_ucs2_allocate(&s2, ws)==(size_t)-1) {
+ SAFE_FREE(ws);
+ /* Wrong answer, but what can we do... */
+ return strchr(src, c);
+ }
+ ret = (char *)(s+strlen(s2));
+ SAFE_FREE(ws);
+ SAFE_FREE(s2);
+ return ret;
}
char *strrchr_m(const char *s, char c)
@@ -1457,17 +1556,30 @@ char *strrchr_m(const char *s, char c)
/* String contained a non-ascii char. Slow path. */
{
- wpstring ws;
- pstring s2;
+ smb_ucs2_t *ws = NULL;
+ char *s2 = NULL;
smb_ucs2_t *p;
+ char *ret;
- push_ucs2(NULL, ws, s, sizeof(ws), STR_TERMINATE);
+ if (push_ucs2_allocate(&ws,s)==(size_t)-1) {
+ /* Wrong answer, but what can we do. */
+ return strrchr(s, c);
+ }
p = strrchr_w(ws, UCS2_CHAR(c));
- if (!p)
+ if (!p) {
+ SAFE_FREE(ws);
return NULL;
+ }
*p = 0;
- pull_ucs2_pstring(s2, ws);
- return (char *)(s+strlen(s2));
+ if (pull_ucs2_allocate(&s2,ws)==(size_t)-1) {
+ SAFE_FREE(ws);
+ /* Wrong answer, but what can we do. */
+ return strrchr(s, c);
+ }
+ ret = (char *)(s+strlen(s2));
+ SAFE_FREE(ws);
+ SAFE_FREE(s2);
+ return ret;
}
}
@@ -1478,17 +1590,30 @@ char *strrchr_m(const char *s, char c)
char *strnrchr_m(const char *s, char c, unsigned int n)
{
- wpstring ws;
- pstring s2;
+ smb_ucs2_t *ws = NULL;
+ char *s2 = NULL;
smb_ucs2_t *p;
+ char *ret;
- push_ucs2(NULL, ws, s, sizeof(ws), STR_TERMINATE);
+ if (push_ucs2_allocate(&ws,s)==(size_t)-1) {
+ /* Too hard to try and get right. */
+ return NULL;
+ }
p = strnrchr_w(ws, UCS2_CHAR(c), n);
- if (!p)
+ if (!p) {
+ SAFE_FREE(ws);
return NULL;
+ }
*p = 0;
- pull_ucs2_pstring(s2, ws);
- return (char *)(s+strlen(s2));
+ if (pull_ucs2_allocate(&s2,ws)==(size_t)-1) {
+ SAFE_FREE(ws);
+ /* Too hard to try and get right. */
+ return NULL;
+ }
+ ret = (char *)(s+strlen(s2));
+ SAFE_FREE(ws);
+ SAFE_FREE(s2);
+ return ret;
}
/***********************************************************************
@@ -1794,7 +1919,7 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, const char *string, co
char *s;
int num, lsize;
pstring tok;
-
+
if (!string || !*string)
return NULL;
if (mem_ctx) {
@@ -1807,12 +1932,12 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, const char *string, co
return NULL;
}
if (!sep) sep = LIST_SEP;
-
+
num = lsize = 0;
list = NULL;
-
+
str = s;
- while (next_token(&str, tok, sep, sizeof(tok))) {
+ while (next_token(&str, tok, sep, sizeof(tok))) {
if (num == lsize) {
lsize += S_LIST_ABS;
if (mem_ctx) {
@@ -1842,7 +1967,7 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, const char *string, co
} else {
list[num] = SMB_STRDUP(tok);
}
-
+
if (!list[num]) {
DEBUG(0,("str_list_make: Unable to allocate memory"));
str_list_free(&list);
diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c
index a4952d137ee..64cfd521202 100644
--- a/source/lib/util_unistr.c
+++ b/source/lib/util_unistr.c
@@ -361,7 +361,7 @@ int rpcstr_push(void* dest, const char *src, size_t dest_len, int flags)
void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen)
{
- if (str == NULL) {
+ if ((str == NULL) || (str->uni_str_len == 0)) {
*dest='\0';
return;
}
@@ -374,7 +374,7 @@ void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen)
void unistr3_to_ascii(char *dest, const UNISTR3 *str, size_t maxlen)
{
- if (str == NULL) {
+ if ((str == NULL) || (str->uni_str_len == 0)) {
*dest='\0';
return;
}
diff --git a/source/libaddns/dnsgss.c b/source/libaddns/dnsgss.c
index 9bbad44089f..e7ea0418477 100644
--- a/source/libaddns/dnsgss.c
+++ b/source/libaddns/dnsgss.c
@@ -219,11 +219,8 @@ DNS_ERROR dns_negotiate_sec_ctx( const char *target_realm,
gss_name_t targ_name;
- krb5_principal host_principal;
- krb5_context krb_ctx = NULL;
-
gss_OID_desc nt_host_oid_desc =
- { 10, (char *)"\052\206\110\206\367\022\001\002\002\002" };
+ {10, (char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"};
TALLOC_CTX *mem_ctx;
@@ -247,23 +244,13 @@ DNS_ERROR dns_negotiate_sec_ctx( const char *target_realm,
goto error;
}
- krb5_init_context( &krb_ctx );
- krb5_parse_name( krb_ctx, targetname, &host_principal );
-
- /* don't free the principal until after you call
- gss_release_name() or else you'll get a segv
- as the krb5_copy_principal() does a structure
- copy and not a deep copy. --jerry*/
-
- input_name.value = &host_principal;
- input_name.length = sizeof( host_principal );
+ input_name.value = targetname;
+ input_name.length = strlen(targetname);
major = gss_import_name( &minor, &input_name,
&nt_host_oid_desc, &targ_name );
if (major) {
- krb5_free_principal( krb_ctx, host_principal );
- krb5_free_context( krb_ctx );
err = ERROR_DNS_GSS_ERROR;
goto error;
}
@@ -273,11 +260,6 @@ DNS_ERROR dns_negotiate_sec_ctx( const char *target_realm,
gss_release_name( &minor, &targ_name );
- /* now we can free the principal */
-
- krb5_free_principal( krb_ctx, host_principal );
- krb5_free_context( krb_ctx );
-
error:
TALLOC_FREE(mem_ctx);
diff --git a/source/libads/kerberos_verify.c b/source/libads/kerberos_verify.c
index 99288b78e5c..0edb5327d33 100644
--- a/source/libads/kerberos_verify.c
+++ b/source/libads/kerberos_verify.c
@@ -427,9 +427,16 @@ NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
/* Try secrets.tdb first and fallback to the krb5.keytab if
necessary */
- auth_ok = ads_secrets_verify_ticket(context, auth_context, host_princ,
+ auth_ok = ads_secrets_verify_ticket(context, auth_context, host_princ,
ticket, &tkt, &keyblock, &ret);
+ if (!auth_ok &&
+ (ret == KRB5KRB_AP_ERR_TKT_NYV ||
+ ret == KRB5KRB_AP_ERR_TKT_EXPIRED ||
+ ret == KRB5KRB_AP_ERR_SKEW)) {
+ goto auth_failed;
+ }
+
if (!auth_ok && lp_use_kerberos_keytab()) {
auth_ok = ads_keytab_verify_ticket(context, auth_context,
ticket, &tkt, &keyblock, &ret);
@@ -446,6 +453,7 @@ NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
#endif
}
+ auth_failed:
if (!auth_ok) {
DEBUG(3,("ads_verify_ticket: krb5_rd_req with auth failed (%s)\n",
error_message(ret)));
diff --git a/source/libads/ldap_schema.c b/source/libads/ldap_schema.c
index 170ee65df71..ff41ccc8614 100644
--- a/source/libads/ldap_schema.c
+++ b/source/libads/ldap_schema.c
@@ -48,13 +48,13 @@ ADS_STATUS ads_get_attrnames_by_oids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
for (i=0; i<num_OIDs; i++) {
- if ((expr = talloc_asprintf_append(expr, "(attributeId=%s)",
+ if ((expr = talloc_asprintf_append_buffer(expr, "(attributeId=%s)",
OIDs[i])) == NULL) {
return ADS_ERROR(LDAP_NO_MEMORY);
}
}
- if ((expr = talloc_asprintf_append(expr, ")")) == NULL) {
+ if ((expr = talloc_asprintf_append_buffer(expr, ")")) == NULL) {
return ADS_ERROR(LDAP_NO_MEMORY);
}
diff --git a/source/libads/sasl.c b/source/libads/sasl.c
index 3752d3c2ac2..dec8756a860 100644
--- a/source/libads/sasl.c
+++ b/source/libads/sasl.c
@@ -603,13 +603,11 @@ failed:
return status;
}
-#endif
+#endif /* HAVE_GSSAPI */
#ifdef HAVE_KRB5
struct ads_service_principal {
- krb5_context ctx;
char *string;
- krb5_principal principal;
#ifdef HAVE_GSSAPI
gss_name_t name;
#endif
@@ -625,14 +623,6 @@ static void ads_free_service_principal(struct ads_service_principal *p)
gss_release_name(&minor_status, &p->name);
}
#endif
- if (p->principal) {
- krb5_free_principal(p->ctx, p->principal);
- }
-
- if (p->ctx) {
- krb5_free_context(p->ctx);
- }
-
ZERO_STRUCTP(p);
}
@@ -641,15 +631,10 @@ static ADS_STATUS ads_generate_service_principal(ADS_STRUCT *ads,
struct ads_service_principal *p)
{
ADS_STATUS status;
- krb5_enctype enc_types[] = {
-#ifdef ENCTYPE_ARCFOUR_HMAC
- ENCTYPE_ARCFOUR_HMAC,
-#endif
- ENCTYPE_DES_CBC_MD5,
- ENCTYPE_NULL};
#ifdef HAVE_GSSAPI
gss_buffer_desc input_name;
- gss_OID_desc nt_principal =
+ /* GSS_KRB5_NT_PRINCIPAL_NAME */
+ gss_OID_desc nt_principal =
{10, CONST_DISCARD(char *, "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01")};
uint32 minor_status;
int gss_rc;
@@ -667,8 +652,7 @@ static ADS_STATUS ads_generate_service_principal(ADS_STRUCT *ads,
if (!given_principal ||
strequal(given_principal, ADS_IGNORE_PRINCIPAL)) {
- status = ads_guess_service_principal(ads, given_principal,
- &p->string);
+ status = ads_guess_service_principal(ads, &p->string);
if (!ADS_ERR_OK(status)) {
return status;
}
@@ -679,35 +663,9 @@ static ADS_STATUS ads_generate_service_principal(ADS_STRUCT *ads,
}
}
- initialize_krb5_error_table();
- status = ADS_ERROR_KRB5(krb5_init_context(&p->ctx));
- if (!ADS_ERR_OK(status)) {
- ads_free_service_principal(p);
- return status;
- }
- status = ADS_ERROR_KRB5(krb5_set_default_tgs_ktypes(p->ctx, enc_types));
- if (!ADS_ERR_OK(status)) {
- ads_free_service_principal(p);
- return status;
- }
- status = ADS_ERROR_KRB5(smb_krb5_parse_name(p->ctx, p->string, &p->principal));
- if (!ADS_ERR_OK(status)) {
- ads_free_service_principal(p);
- return status;
- }
-
#ifdef HAVE_GSSAPI
- /*
- * The MIT libraries have a *HORRIBLE* bug - input_value.value needs
- * to point to the *address* of the krb5_principal, and the gss libraries
- * to a shallow copy of the krb5_principal pointer - so we need to keep
- * the krb5_principal around until we do the gss_release_name. MIT *SUCKS* !
- * Just one more way in which MIT engineers screwed me over.... JRA.
- *
- * That's the reason for principal not beeing a local var in this function
- */
- input_name.value = &p->principal;
- input_name.length = sizeof(p->principal);
+ input_name.value = p->string;
+ input_name.length = strlen(p->string);
gss_rc = gss_import_name(&minor_status, &input_name, &nt_principal, &p->name);
if (gss_rc) {
@@ -716,7 +674,7 @@ static ADS_STATUS ads_generate_service_principal(ADS_STRUCT *ads,
}
#endif
- return status;
+ return ADS_SUCCESS;
}
/*
@@ -774,7 +732,7 @@ static ADS_STATUS ads_sasl_spnego_krb5_bind(ADS_STRUCT *ads,
#endif
return ads_sasl_spnego_rawkrb5_bind(ads, p->string);
}
-#endif
+#endif /* HAVE_KRB5 */
/*
this performs a SASL/SPNEGO bind
@@ -853,6 +811,11 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
if (ADS_ERR_OK(status)) {
status = ads_sasl_spnego_krb5_bind(ads, &p);
+ if (!ADS_ERR_OK(status)) {
+ DEBUG(0,("kinit succeeded but "
+ "ads_sasl_spnego_krb5_bind failed: %s\n",
+ ads_errstr(status)));
+ }
}
ads_free_service_principal(&p);
@@ -1103,7 +1066,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
return status;
}
-#endif /* HAVE_GGSAPI */
+#endif /* HAVE_GSSAPI */
/* mapping between SASL mechanisms and functions */
static struct {
diff --git a/source/libads/util.c b/source/libads/util.c
index a0c9d8f4c4b..af96c3e10a4 100644
--- a/source/libads/util.c
+++ b/source/libads/util.c
@@ -53,7 +53,6 @@ failed:
}
ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
- const char *given_principal,
char **returned_principal)
{
char *princ = NULL;
diff --git a/source/libgpo/gpo_fetch.c b/source/libgpo/gpo_fetch.c
index 31c6132b987..6be986d5d90 100644
--- a/source/libgpo/gpo_fetch.c
+++ b/source/libgpo/gpo_fetch.c
@@ -102,7 +102,7 @@ static NTSTATUS gpo_prepare_local_store(TALLOC_CTX *mem_ctx,
while (next_token(&unix_path, tok, "/", sizeof(tok))) {
- current_dir = talloc_asprintf_append(current_dir, "/%s", tok);
+ current_dir = talloc_asprintf_append_buffer(current_dir, "/%s", tok);
NT_STATUS_HAVE_NO_MEMORY(current_dir);
if ((mkdir(current_dir, 0644)) < 0 && errno != EEXIST) {
diff --git a/source/libgpo/gpo_util.c b/source/libgpo/gpo_util.c
index fa964e8e2cb..126b44cc978 100644
--- a/source/libgpo/gpo_util.c
+++ b/source/libgpo/gpo_util.c
@@ -45,7 +45,7 @@ static struct gp_table gpo_cse_extensions[] = {
/* "Registry Settings"
(http://support.microsoft.com/kb/216357/EN-US/) */
{ "Registry Settings",
- GP_EXT_REGISTRY },
+ GP_EXT_GUID_REGISTRY },
{ "Microsoft Disc Quota",
"3610EDA5-77EF-11D2-8DC5-00C04FA31A66" },
{ "EFS recovery",
@@ -59,9 +59,9 @@ static struct gp_table gpo_cse_extensions[] = {
{ "QoS Packet Scheduler",
"426031c0-0b47-4852-b0ca-ac3d37bfcb39" },
{ "Scripts",
- GP_EXT_SCRIPTS },
+ GP_EXT_GUID_SCRIPTS },
{ "Security",
- GP_EXT_SECURITY },
+ GP_EXT_GUID_SECURITY },
{ "Software Installation",
"C6DC5466-785A-11D2-84D0-00C04FB169F7" },
{ "Wireless Group Policy",
diff --git a/source/librpc/gen_ndr/ndr_dfs.c b/source/librpc/gen_ndr/ndr_dfs.c
index 10678e48a3c..959abdc62d5 100644
--- a/source/librpc/gen_ndr/ndr_dfs.c
+++ b/source/librpc/gen_ndr/ndr_dfs.c
@@ -3,13 +3,13 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_dfs.h"
-NTSTATUS ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r)
+static NTSTATUS ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r)
+static NTSTATUS ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -29,7 +29,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *na
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
+static NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -39,7 +39,7 @@ NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
+static NTSTATUS ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -56,7 +56,7 @@ _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
+static NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -73,7 +73,7 @@ NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
+static NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
{
uint32_t _ptr_path;
TALLOC_CTX *_mem_save_path_0;
@@ -143,7 +143,7 @@ _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
+static NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -169,7 +169,7 @@ NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
+static NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
{
uint32_t _ptr_path;
TALLOC_CTX *_mem_save_path_0;
@@ -266,7 +266,7 @@ _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
+static NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -291,7 +291,7 @@ NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
+static NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
{
uint32_t _ptr_server;
TALLOC_CTX *_mem_save_server_0;
@@ -362,7 +362,7 @@ _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
+static NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
{
uint32_t cntr_stores_1;
if (ndr_flags & NDR_SCALARS) {
@@ -399,7 +399,7 @@ NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
+static NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
{
uint32_t _ptr_path;
TALLOC_CTX *_mem_save_path_0;
@@ -518,7 +518,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
+static NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
{
uint32_t cntr_stores_1;
if (ndr_flags & NDR_SCALARS) {
@@ -558,7 +558,7 @@ NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
+static NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
{
uint32_t _ptr_path;
TALLOC_CTX *_mem_save_path_0;
@@ -708,7 +708,7 @@ _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
+static NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -739,7 +739,7 @@ NTSTATUS ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
+static NTSTATUS ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
{
uint32_t _ptr_path;
TALLOC_CTX *_mem_save_path_0;
@@ -821,13 +821,13 @@ _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
+static NTSTATUS ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
+static NTSTATUS ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -850,7 +850,7 @@ _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const ch
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
+static NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -863,7 +863,7 @@ NTSTATUS ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
+static NTSTATUS ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -886,7 +886,7 @@ _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
+static NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -899,7 +899,7 @@ NTSTATUS ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
+static NTSTATUS ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -921,7 +921,7 @@ _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
+static NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
{
uint32_t cntr_stores_1;
if (ndr_flags & NDR_SCALARS) {
@@ -963,7 +963,7 @@ NTSTATUS ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
+static NTSTATUS ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
{
uint32_t _ptr_entry_path;
TALLOC_CTX *_mem_save_entry_path_0;
@@ -1091,7 +1091,7 @@ _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
+static NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1103,7 +1103,7 @@ NTSTATUS ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
+static NTSTATUS ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1123,7 +1123,7 @@ _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
+static NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1140,7 +1140,7 @@ NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
+static NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
{
uint32_t _ptr_comment;
TALLOC_CTX *_mem_save_comment_0;
@@ -1183,7 +1183,7 @@ _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
+static NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1194,7 +1194,7 @@ NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
+static NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1213,7 +1213,7 @@ _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
+static NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1224,7 +1224,7 @@ NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
+static NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1243,7 +1243,7 @@ _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
+static NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1254,7 +1254,7 @@ NTSTATUS ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
+static NTSTATUS ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1273,7 +1273,7 @@ _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
+static NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1284,7 +1284,7 @@ NTSTATUS ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
+static NTSTATUS ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1303,7 +1303,7 @@ _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
+static NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1324,7 +1324,7 @@ NTSTATUS ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
+static NTSTATUS ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
{
uint32_t _ptr_comment;
TALLOC_CTX *_mem_save_comment_0;
@@ -1375,7 +1375,7 @@ _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
+static NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1387,7 +1387,7 @@ NTSTATUS ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
+static NTSTATUS ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1408,7 +1408,7 @@ _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
+static NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1425,7 +1425,7 @@ NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
+static NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
{
uint32_t _ptr_dom_root;
TALLOC_CTX *_mem_save_dom_root_0;
@@ -1468,13 +1468,13 @@ _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
+static NTSTATUS ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
{
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
+static NTSTATUS ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
{
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
@@ -1493,7 +1493,7 @@ _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
+static NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1511,7 +1511,7 @@ NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
+static NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
{
uint32_t _ptr_dom_root;
TALLOC_CTX *_mem_save_dom_root_0;
@@ -1556,7 +1556,7 @@ _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
+static NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -1726,7 +1726,7 @@ NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
+static NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
{
int level;
uint32_t _level;
@@ -2196,7 +2196,7 @@ _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const
}
}
-NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
+static NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
{
uint32_t cntr_s_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2218,7 +2218,7 @@ NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
+static NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
{
uint32_t _ptr_s;
uint32_t cntr_s_1;
@@ -2283,7 +2283,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
+static NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
{
uint32_t cntr_s_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2305,7 +2305,7 @@ NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
+static NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
{
uint32_t _ptr_s;
uint32_t cntr_s_1;
@@ -2370,7 +2370,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
+static NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
{
uint32_t cntr_s_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2392,7 +2392,7 @@ NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
+static NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
{
uint32_t _ptr_s;
uint32_t cntr_s_1;
@@ -2457,7 +2457,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
+static NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
{
uint32_t cntr_s_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2479,7 +2479,7 @@ NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
+static NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
{
uint32_t _ptr_s;
uint32_t cntr_s_1;
@@ -2544,7 +2544,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
+static NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
{
uint32_t cntr_s_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2566,7 +2566,7 @@ NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
+static NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
{
uint32_t _ptr_s;
uint32_t cntr_s_1;
@@ -2631,7 +2631,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
+static NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
{
uint32_t cntr_s_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2653,7 +2653,7 @@ NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
+static NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
{
uint32_t _ptr_s;
uint32_t cntr_s_1;
@@ -2718,7 +2718,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
+static NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -2798,7 +2798,7 @@ NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
+static NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
{
int level;
uint32_t _level;
@@ -3007,7 +3007,7 @@ _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, co
}
}
-NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
+static NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3021,7 +3021,7 @@ NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
+static NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -3045,7 +3045,7 @@ _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
+static NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3063,7 +3063,7 @@ NTSTATUS ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
+static NTSTATUS ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
{
uint32_t _ptr_unknown2;
TALLOC_CTX *_mem_save_unknown2_0;
@@ -3164,7 +3164,7 @@ _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
+static NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
{
if (flags & NDR_IN) {
if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3199,7 +3199,7 @@ NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
+static NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
{
uint32_t _ptr_share;
uint32_t _ptr_comment;
@@ -3306,7 +3306,7 @@ _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int fla
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
+static NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
{
if (flags & NDR_IN) {
if (r->in.dfs_entry_path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3335,7 +3335,7 @@ NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_R
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
+static NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
{
uint32_t _ptr_servername;
uint32_t _ptr_sharename;
@@ -3429,7 +3429,7 @@ _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
+static NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
@@ -3461,7 +3461,7 @@ NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
+static NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
{
uint32_t _ptr_servername;
uint32_t _ptr_sharename;
@@ -3568,7 +3568,7 @@ _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
+static NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
@@ -3600,7 +3600,7 @@ NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
+static NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
{
uint32_t _ptr_servername;
uint32_t _ptr_sharename;
@@ -3711,7 +3711,7 @@ _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
+static NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
@@ -3739,7 +3739,7 @@ NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enu
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
+static NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
{
uint32_t _ptr_info;
uint32_t _ptr_total;
@@ -3852,7 +3852,7 @@ _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int fl
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
+static NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
{
if (flags & NDR_IN) {
}
@@ -3862,7 +3862,7 @@ NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_R
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
+static NTSTATUS ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
{
if (flags & NDR_IN) {
}
@@ -3893,7 +3893,7 @@ _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
+static NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
{
if (flags & NDR_IN) {
}
@@ -3903,7 +3903,7 @@ NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Mov
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
+static NTSTATUS ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
{
if (flags & NDR_IN) {
}
@@ -3934,7 +3934,7 @@ _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int fl
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
+static NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
{
if (flags & NDR_IN) {
}
@@ -3944,7 +3944,7 @@ NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
+static NTSTATUS ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
{
if (flags & NDR_IN) {
}
@@ -3975,7 +3975,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
+static NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
{
if (flags & NDR_IN) {
}
@@ -3985,7 +3985,7 @@ NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
+static NTSTATUS ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
{
if (flags & NDR_IN) {
}
@@ -4016,7 +4016,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
+static NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
@@ -4066,7 +4066,7 @@ NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct df
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
+static NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
{
uint32_t _ptr_unknown2;
TALLOC_CTX *_mem_save_unknown2_0;
@@ -4222,7 +4222,7 @@ _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
+static NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
@@ -4263,7 +4263,7 @@ NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
+static NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
{
uint32_t _ptr_unknown;
TALLOC_CTX *_mem_save_unknown_0;
@@ -4401,7 +4401,7 @@ _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
+static NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
@@ -4424,7 +4424,7 @@ NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct d
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
+static NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
@@ -4481,7 +4481,7 @@ _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
+static NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
@@ -4500,7 +4500,7 @@ NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
+static NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
@@ -4549,7 +4549,7 @@ _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
+static NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
{
if (flags & NDR_IN) {
if (r->in.servername == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4565,7 +4565,7 @@ NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
+static NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
@@ -4609,7 +4609,7 @@ _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
+static NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
@@ -4635,7 +4635,7 @@ NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
+static NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
@@ -4698,7 +4698,7 @@ _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
+static NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
{
if (flags & NDR_IN) {
}
@@ -4708,7 +4708,7 @@ NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
+static NTSTATUS ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
{
if (flags & NDR_IN) {
}
@@ -4739,7 +4739,7 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
+static NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
{
if (flags & NDR_IN) {
}
@@ -4749,7 +4749,7 @@ NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
+static NTSTATUS ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
{
if (flags & NDR_IN) {
}
@@ -4780,7 +4780,7 @@ _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
+static NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
@@ -4798,7 +4798,7 @@ NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
+static NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
@@ -4845,7 +4845,7 @@ _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
+static NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
{
if (flags & NDR_IN) {
}
@@ -4855,7 +4855,7 @@ NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
+static NTSTATUS ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
{
if (flags & NDR_IN) {
}
@@ -4886,7 +4886,7 @@ _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int fl
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
+static NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
{
if (flags & NDR_IN) {
}
@@ -4896,7 +4896,7 @@ NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
+static NTSTATUS ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
{
if (flags & NDR_IN) {
}
@@ -5080,7 +5080,7 @@ _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
+static NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
{
if (flags & NDR_IN) {
}
@@ -5090,7 +5090,7 @@ NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
+static NTSTATUS ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
{
if (flags & NDR_IN) {
}
@@ -5121,14 +5121,14 @@ _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, in
ndr->depth--;
}
-const struct ndr_interface_call netdfs_calls[] = {
+static const struct ndr_interface_call netdfs_calls[] = {
{
"dfs_GetManagerVersion",
sizeof(struct dfs_GetManagerVersion),
(ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
(ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
(ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
- False,
+ false,
},
{
"dfs_Add",
@@ -5136,7 +5136,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_Add,
(ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
(ndr_print_function_t) ndr_print_dfs_Add,
- False,
+ false,
},
{
"dfs_Remove",
@@ -5144,7 +5144,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_Remove,
(ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
(ndr_print_function_t) ndr_print_dfs_Remove,
- False,
+ false,
},
{
"dfs_SetInfo",
@@ -5152,7 +5152,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
(ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
(ndr_print_function_t) ndr_print_dfs_SetInfo,
- False,
+ false,
},
{
"dfs_GetInfo",
@@ -5160,7 +5160,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
(ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
(ndr_print_function_t) ndr_print_dfs_GetInfo,
- False,
+ false,
},
{
"dfs_Enum",
@@ -5168,7 +5168,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_Enum,
(ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
(ndr_print_function_t) ndr_print_dfs_Enum,
- False,
+ false,
},
{
"dfs_Rename",
@@ -5176,7 +5176,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_Rename,
(ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
(ndr_print_function_t) ndr_print_dfs_Rename,
- False,
+ false,
},
{
"dfs_Move",
@@ -5184,7 +5184,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_Move,
(ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
(ndr_print_function_t) ndr_print_dfs_Move,
- False,
+ false,
},
{
"dfs_ManagerGetConfigInfo",
@@ -5192,7 +5192,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
(ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
(ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
- False,
+ false,
},
{
"dfs_ManagerSendSiteInfo",
@@ -5200,7 +5200,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
(ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
(ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
- False,
+ false,
},
{
"dfs_AddFtRoot",
@@ -5208,7 +5208,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
(ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
(ndr_print_function_t) ndr_print_dfs_AddFtRoot,
- False,
+ false,
},
{
"dfs_RemoveFtRoot",
@@ -5216,7 +5216,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
(ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
(ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
- False,
+ false,
},
{
"dfs_AddStdRoot",
@@ -5224,7 +5224,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
(ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
(ndr_print_function_t) ndr_print_dfs_AddStdRoot,
- False,
+ false,
},
{
"dfs_RemoveStdRoot",
@@ -5232,7 +5232,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
(ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
(ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
- False,
+ false,
},
{
"dfs_ManagerInitialize",
@@ -5240,7 +5240,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
(ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
(ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
- False,
+ false,
},
{
"dfs_AddStdRootForced",
@@ -5248,7 +5248,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
(ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
(ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
- False,
+ false,
},
{
"dfs_GetDcAddress",
@@ -5256,7 +5256,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
(ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
(ndr_print_function_t) ndr_print_dfs_GetDcAddress,
- False,
+ false,
},
{
"dfs_SetDcAddress",
@@ -5264,7 +5264,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
(ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
(ndr_print_function_t) ndr_print_dfs_SetDcAddress,
- False,
+ false,
},
{
"dfs_FlushFtTable",
@@ -5272,7 +5272,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
(ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
(ndr_print_function_t) ndr_print_dfs_FlushFtTable,
- False,
+ false,
},
{
"dfs_Add2",
@@ -5280,7 +5280,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_Add2,
(ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
(ndr_print_function_t) ndr_print_dfs_Add2,
- False,
+ false,
},
{
"dfs_Remove2",
@@ -5288,7 +5288,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
(ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
(ndr_print_function_t) ndr_print_dfs_Remove2,
- False,
+ false,
},
{
"dfs_EnumEx",
@@ -5296,7 +5296,7 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
(ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
(ndr_print_function_t) ndr_print_dfs_EnumEx,
- False,
+ false,
},
{
"dfs_SetInfo2",
@@ -5304,25 +5304,25 @@ const struct ndr_interface_call netdfs_calls[] = {
(ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
(ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
(ndr_print_function_t) ndr_print_dfs_SetInfo2,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const netdfs_endpoint_strings[] = {
+static const char * const netdfs_endpoint_strings[] = {
"ncacn_np:[\\pipe\\netdfs]",
};
-const struct ndr_interface_string_array netdfs_endpoints = {
+static const struct ndr_interface_string_array netdfs_endpoints = {
.count = 1,
.names = netdfs_endpoint_strings
};
-const char * const netdfs_authservice_strings[] = {
+static const char * const netdfs_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array netdfs_authservices = {
+static const struct ndr_interface_string_array netdfs_authservices = {
.count = 1,
.names = netdfs_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_echo.c b/source/librpc/gen_ndr/ndr_echo.c
index 140221c6df1..95157fb263d 100644
--- a/source/librpc/gen_ndr/ndr_echo.c
+++ b/source/librpc/gen_ndr/ndr_echo.c
@@ -3,7 +3,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_echo.h"
-NTSTATUS ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags, const struct echo_info1 *r)
+static NTSTATUS ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags, const struct echo_info1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -14,7 +14,7 @@ NTSTATUS ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_flags, struct echo_info1 *r)
+static NTSTATUS ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_flags, struct echo_info1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -33,7 +33,7 @@ _PUBLIC_ void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_echo_info2(struct ndr_push *ndr, int ndr_flags, const struct echo_info2 *r)
+static NTSTATUS ndr_push_echo_info2(struct ndr_push *ndr, int ndr_flags, const struct echo_info2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -44,7 +44,7 @@ NTSTATUS ndr_push_echo_info2(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_info2(struct ndr_pull *ndr, int ndr_flags, struct echo_info2 *r)
+static NTSTATUS ndr_pull_echo_info2(struct ndr_pull *ndr, int ndr_flags, struct echo_info2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -63,7 +63,7 @@ _PUBLIC_ void ndr_print_echo_info2(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_echo_info3(struct ndr_push *ndr, int ndr_flags, const struct echo_info3 *r)
+static NTSTATUS ndr_push_echo_info3(struct ndr_push *ndr, int ndr_flags, const struct echo_info3 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -74,7 +74,7 @@ NTSTATUS ndr_push_echo_info3(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_info3(struct ndr_pull *ndr, int ndr_flags, struct echo_info3 *r)
+static NTSTATUS ndr_pull_echo_info3(struct ndr_pull *ndr, int ndr_flags, struct echo_info3 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -93,7 +93,7 @@ _PUBLIC_ void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_echo_info4(struct ndr_push *ndr, int ndr_flags, const struct echo_info4 *r)
+static NTSTATUS ndr_push_echo_info4(struct ndr_push *ndr, int ndr_flags, const struct echo_info4 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
@@ -104,7 +104,7 @@ NTSTATUS ndr_push_echo_info4(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_info4(struct ndr_pull *ndr, int ndr_flags, struct echo_info4 *r)
+static NTSTATUS ndr_pull_echo_info4(struct ndr_pull *ndr, int ndr_flags, struct echo_info4 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
@@ -123,7 +123,7 @@ _PUBLIC_ void ndr_print_echo_info4(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_echo_info5(struct ndr_push *ndr, int ndr_flags, const struct echo_info5 *r)
+static NTSTATUS ndr_push_echo_info5(struct ndr_push *ndr, int ndr_flags, const struct echo_info5 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
@@ -135,7 +135,7 @@ NTSTATUS ndr_push_echo_info5(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_info5(struct ndr_pull *ndr, int ndr_flags, struct echo_info5 *r)
+static NTSTATUS ndr_pull_echo_info5(struct ndr_pull *ndr, int ndr_flags, struct echo_info5 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
@@ -156,7 +156,7 @@ _PUBLIC_ void ndr_print_echo_info5(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_echo_info6(struct ndr_push *ndr, int ndr_flags, const struct echo_info6 *r)
+static NTSTATUS ndr_push_echo_info6(struct ndr_push *ndr, int ndr_flags, const struct echo_info6 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -168,7 +168,7 @@ NTSTATUS ndr_push_echo_info6(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_info6(struct ndr_pull *ndr, int ndr_flags, struct echo_info6 *r)
+static NTSTATUS ndr_pull_echo_info6(struct ndr_pull *ndr, int ndr_flags, struct echo_info6 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -189,7 +189,7 @@ _PUBLIC_ void ndr_print_echo_info6(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_echo_info7(struct ndr_push *ndr, int ndr_flags, const struct echo_info7 *r)
+static NTSTATUS ndr_push_echo_info7(struct ndr_push *ndr, int ndr_flags, const struct echo_info7 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
@@ -201,7 +201,7 @@ NTSTATUS ndr_push_echo_info7(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_info7(struct ndr_pull *ndr, int ndr_flags, struct echo_info7 *r)
+static NTSTATUS ndr_pull_echo_info7(struct ndr_pull *ndr, int ndr_flags, struct echo_info7 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
@@ -222,7 +222,7 @@ _PUBLIC_ void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_echo_Info(struct ndr_push *ndr, int ndr_flags, const union echo_Info *r)
+static NTSTATUS ndr_push_echo_Info(struct ndr_push *ndr, int ndr_flags, const union echo_Info *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -291,7 +291,7 @@ NTSTATUS ndr_push_echo_Info(struct ndr_push *ndr, int ndr_flags, const union ech
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_Info(struct ndr_pull *ndr, int ndr_flags, union echo_Info *r)
+static NTSTATUS ndr_pull_echo_Info(struct ndr_pull *ndr, int ndr_flags, union echo_Info *r)
{
int level;
uint16_t _level;
@@ -403,13 +403,13 @@ _PUBLIC_ void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, const
}
}
-NTSTATUS ndr_push_echo_Enum1(struct ndr_push *ndr, int ndr_flags, enum echo_Enum1 r)
+static NTSTATUS ndr_push_echo_Enum1(struct ndr_push *ndr, int ndr_flags, enum echo_Enum1 r)
{
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_Enum1(struct ndr_pull *ndr, int ndr_flags, enum echo_Enum1 *r)
+static NTSTATUS ndr_pull_echo_Enum1(struct ndr_pull *ndr, int ndr_flags, enum echo_Enum1 *r)
{
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
@@ -428,13 +428,13 @@ _PUBLIC_ void ndr_print_echo_Enum1(struct ndr_print *ndr, const char *name, enum
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_echo_Enum1_32(struct ndr_push *ndr, int ndr_flags, enum echo_Enum1_32 r)
+static NTSTATUS ndr_push_echo_Enum1_32(struct ndr_push *ndr, int ndr_flags, enum echo_Enum1_32 r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_Enum1_32(struct ndr_pull *ndr, int ndr_flags, enum echo_Enum1_32 *r)
+static NTSTATUS ndr_pull_echo_Enum1_32(struct ndr_pull *ndr, int ndr_flags, enum echo_Enum1_32 *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -453,7 +453,7 @@ _PUBLIC_ void ndr_print_echo_Enum1_32(struct ndr_print *ndr, const char *name, e
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_echo_Enum2(struct ndr_push *ndr, int ndr_flags, const struct echo_Enum2 *r)
+static NTSTATUS ndr_push_echo_Enum2(struct ndr_push *ndr, int ndr_flags, const struct echo_Enum2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -465,7 +465,7 @@ NTSTATUS ndr_push_echo_Enum2(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_Enum2(struct ndr_pull *ndr, int ndr_flags, struct echo_Enum2 *r)
+static NTSTATUS ndr_pull_echo_Enum2(struct ndr_pull *ndr, int ndr_flags, struct echo_Enum2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -486,7 +486,7 @@ _PUBLIC_ void ndr_print_echo_Enum2(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_echo_Enum3(struct ndr_push *ndr, int ndr_flags, const union echo_Enum3 *r)
+static NTSTATUS ndr_push_echo_Enum3(struct ndr_push *ndr, int ndr_flags, const union echo_Enum3 *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -520,7 +520,7 @@ NTSTATUS ndr_push_echo_Enum3(struct ndr_push *ndr, int ndr_flags, const union ec
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_Enum3(struct ndr_pull *ndr, int ndr_flags, union echo_Enum3 *r)
+static NTSTATUS ndr_pull_echo_Enum3(struct ndr_pull *ndr, int ndr_flags, union echo_Enum3 *r)
{
int level;
uint16_t _level;
@@ -577,7 +577,7 @@ _PUBLIC_ void ndr_print_echo_Enum3(struct ndr_print *ndr, const char *name, cons
}
}
-NTSTATUS ndr_push_echo_Surrounding(struct ndr_push *ndr, int ndr_flags, const struct echo_Surrounding *r)
+static NTSTATUS ndr_push_echo_Surrounding(struct ndr_push *ndr, int ndr_flags, const struct echo_Surrounding *r)
{
uint32_t cntr_surrounding_0;
if (ndr_flags & NDR_SCALARS) {
@@ -593,7 +593,7 @@ NTSTATUS ndr_push_echo_Surrounding(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_Surrounding(struct ndr_pull *ndr, int ndr_flags, struct echo_Surrounding *r)
+static NTSTATUS ndr_pull_echo_Surrounding(struct ndr_pull *ndr, int ndr_flags, struct echo_Surrounding *r)
{
uint32_t cntr_surrounding_0;
TALLOC_CTX *_mem_save_surrounding_0;
@@ -637,7 +637,7 @@ _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_echo_AddOne(struct ndr_push *ndr, int flags, const struct echo_AddOne *r)
+static NTSTATUS ndr_push_echo_AddOne(struct ndr_push *ndr, int flags, const struct echo_AddOne *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data));
@@ -649,7 +649,7 @@ NTSTATUS ndr_push_echo_AddOne(struct ndr_push *ndr, int flags, const struct echo
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_AddOne(struct ndr_pull *ndr, int flags, struct echo_AddOne *r)
+static NTSTATUS ndr_pull_echo_AddOne(struct ndr_pull *ndr, int flags, struct echo_AddOne *r)
{
TALLOC_CTX *_mem_save_out_data_0;
if (flags & NDR_IN) {
@@ -696,7 +696,7 @@ _PUBLIC_ void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_echo_EchoData(struct ndr_push *ndr, int flags, const struct echo_EchoData *r)
+static NTSTATUS ndr_push_echo_EchoData(struct ndr_push *ndr, int flags, const struct echo_EchoData *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
@@ -710,7 +710,7 @@ NTSTATUS ndr_push_echo_EchoData(struct ndr_push *ndr, int flags, const struct ec
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_EchoData(struct ndr_pull *ndr, int flags, struct echo_EchoData *r)
+static NTSTATUS ndr_pull_echo_EchoData(struct ndr_pull *ndr, int flags, struct echo_EchoData *r)
{
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -757,7 +757,7 @@ _PUBLIC_ void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_echo_SinkData(struct ndr_push *ndr, int flags, const struct echo_SinkData *r)
+static NTSTATUS ndr_push_echo_SinkData(struct ndr_push *ndr, int flags, const struct echo_SinkData *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
@@ -769,7 +769,7 @@ NTSTATUS ndr_push_echo_SinkData(struct ndr_push *ndr, int flags, const struct ec
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_SinkData(struct ndr_pull *ndr, int flags, struct echo_SinkData *r)
+static NTSTATUS ndr_pull_echo_SinkData(struct ndr_pull *ndr, int flags, struct echo_SinkData *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
@@ -807,7 +807,7 @@ _PUBLIC_ void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_echo_SourceData(struct ndr_push *ndr, int flags, const struct echo_SourceData *r)
+static NTSTATUS ndr_push_echo_SourceData(struct ndr_push *ndr, int flags, const struct echo_SourceData *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
@@ -819,7 +819,7 @@ NTSTATUS ndr_push_echo_SourceData(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_SourceData(struct ndr_pull *ndr, int flags, struct echo_SourceData *r)
+static NTSTATUS ndr_pull_echo_SourceData(struct ndr_pull *ndr, int flags, struct echo_SourceData *r)
{
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -859,7 +859,7 @@ _PUBLIC_ void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_echo_TestCall(struct ndr_push *ndr, int flags, const struct echo_TestCall *r)
+static NTSTATUS ndr_push_echo_TestCall(struct ndr_push *ndr, int flags, const struct echo_TestCall *r)
{
if (flags & NDR_IN) {
if (r->in.s1 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -880,7 +880,7 @@ NTSTATUS ndr_push_echo_TestCall(struct ndr_push *ndr, int flags, const struct ec
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_TestCall(struct ndr_pull *ndr, int flags, struct echo_TestCall *r)
+static NTSTATUS ndr_pull_echo_TestCall(struct ndr_pull *ndr, int flags, struct echo_TestCall *r)
{
uint32_t _ptr_s2;
TALLOC_CTX *_mem_save_s2_0;
@@ -947,7 +947,7 @@ _PUBLIC_ void ndr_print_echo_TestCall(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_echo_TestCall2(struct ndr_push *ndr, int flags, const struct echo_TestCall2 *r)
+static NTSTATUS ndr_push_echo_TestCall2(struct ndr_push *ndr, int flags, const struct echo_TestCall2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
@@ -961,7 +961,7 @@ NTSTATUS ndr_push_echo_TestCall2(struct ndr_push *ndr, int flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_TestCall2(struct ndr_pull *ndr, int flags, struct echo_TestCall2 *r)
+static NTSTATUS ndr_pull_echo_TestCall2(struct ndr_pull *ndr, int flags, struct echo_TestCall2 *r)
{
TALLOC_CTX *_mem_save_info_0;
if (flags & NDR_IN) {
@@ -1012,7 +1012,7 @@ _PUBLIC_ void ndr_print_echo_TestCall2(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_echo_TestSleep(struct ndr_push *ndr, int flags, const struct echo_TestSleep *r)
+static NTSTATUS ndr_push_echo_TestSleep(struct ndr_push *ndr, int flags, const struct echo_TestSleep *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.seconds));
@@ -1023,7 +1023,7 @@ NTSTATUS ndr_push_echo_TestSleep(struct ndr_push *ndr, int flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_TestSleep(struct ndr_pull *ndr, int flags, struct echo_TestSleep *r)
+static NTSTATUS ndr_pull_echo_TestSleep(struct ndr_pull *ndr, int flags, struct echo_TestSleep *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.seconds));
@@ -1056,7 +1056,7 @@ _PUBLIC_ void ndr_print_echo_TestSleep(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_echo_TestEnum(struct ndr_push *ndr, int flags, const struct echo_TestEnum *r)
+static NTSTATUS ndr_push_echo_TestEnum(struct ndr_push *ndr, int flags, const struct echo_TestEnum *r)
{
if (flags & NDR_IN) {
if (r->in.foo1 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1079,7 +1079,7 @@ NTSTATUS ndr_push_echo_TestEnum(struct ndr_push *ndr, int flags, const struct ec
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_TestEnum(struct ndr_pull *ndr, int flags, struct echo_TestEnum *r)
+static NTSTATUS ndr_pull_echo_TestEnum(struct ndr_pull *ndr, int flags, struct echo_TestEnum *r)
{
TALLOC_CTX *_mem_save_foo1_0;
TALLOC_CTX *_mem_save_foo2_0;
@@ -1189,7 +1189,7 @@ _PUBLIC_ void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_echo_TestSurrounding(struct ndr_push *ndr, int flags, const struct echo_TestSurrounding *r)
+static NTSTATUS ndr_push_echo_TestSurrounding(struct ndr_push *ndr, int flags, const struct echo_TestSurrounding *r)
{
if (flags & NDR_IN) {
if (r->in.data == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1202,7 +1202,7 @@ NTSTATUS ndr_push_echo_TestSurrounding(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_TestSurrounding(struct ndr_pull *ndr, int flags, struct echo_TestSurrounding *r)
+static NTSTATUS ndr_pull_echo_TestSurrounding(struct ndr_pull *ndr, int flags, struct echo_TestSurrounding *r)
{
TALLOC_CTX *_mem_save_data_0;
if (flags & NDR_IN) {
@@ -1258,7 +1258,7 @@ _PUBLIC_ void ndr_print_echo_TestSurrounding(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_echo_TestDoublePointer(struct ndr_push *ndr, int flags, const struct echo_TestDoublePointer *r)
+static NTSTATUS ndr_push_echo_TestDoublePointer(struct ndr_push *ndr, int flags, const struct echo_TestDoublePointer *r)
{
if (flags & NDR_IN) {
if (r->in.data == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1274,7 +1274,7 @@ NTSTATUS ndr_push_echo_TestDoublePointer(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_echo_TestDoublePointer(struct ndr_pull *ndr, int flags, struct echo_TestDoublePointer *r)
+static NTSTATUS ndr_pull_echo_TestDoublePointer(struct ndr_pull *ndr, int flags, struct echo_TestDoublePointer *r)
{
uint32_t _ptr_data;
TALLOC_CTX *_mem_save_data_0;
@@ -1340,14 +1340,14 @@ _PUBLIC_ void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char
ndr->depth--;
}
-const struct ndr_interface_call rpcecho_calls[] = {
+static const struct ndr_interface_call rpcecho_calls[] = {
{
"echo_AddOne",
sizeof(struct echo_AddOne),
(ndr_push_flags_fn_t) ndr_push_echo_AddOne,
(ndr_pull_flags_fn_t) ndr_pull_echo_AddOne,
(ndr_print_function_t) ndr_print_echo_AddOne,
- False,
+ false,
},
{
"echo_EchoData",
@@ -1355,7 +1355,7 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_EchoData,
(ndr_pull_flags_fn_t) ndr_pull_echo_EchoData,
(ndr_print_function_t) ndr_print_echo_EchoData,
- False,
+ false,
},
{
"echo_SinkData",
@@ -1363,7 +1363,7 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_SinkData,
(ndr_pull_flags_fn_t) ndr_pull_echo_SinkData,
(ndr_print_function_t) ndr_print_echo_SinkData,
- False,
+ false,
},
{
"echo_SourceData",
@@ -1371,7 +1371,7 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_SourceData,
(ndr_pull_flags_fn_t) ndr_pull_echo_SourceData,
(ndr_print_function_t) ndr_print_echo_SourceData,
- False,
+ false,
},
{
"echo_TestCall",
@@ -1379,7 +1379,7 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_TestCall,
(ndr_pull_flags_fn_t) ndr_pull_echo_TestCall,
(ndr_print_function_t) ndr_print_echo_TestCall,
- False,
+ false,
},
{
"echo_TestCall2",
@@ -1387,7 +1387,7 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_TestCall2,
(ndr_pull_flags_fn_t) ndr_pull_echo_TestCall2,
(ndr_print_function_t) ndr_print_echo_TestCall2,
- False,
+ false,
},
{
"echo_TestSleep",
@@ -1395,7 +1395,7 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_TestSleep,
(ndr_pull_flags_fn_t) ndr_pull_echo_TestSleep,
(ndr_print_function_t) ndr_print_echo_TestSleep,
- False,
+ false,
},
{
"echo_TestEnum",
@@ -1403,7 +1403,7 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_TestEnum,
(ndr_pull_flags_fn_t) ndr_pull_echo_TestEnum,
(ndr_print_function_t) ndr_print_echo_TestEnum,
- False,
+ false,
},
{
"echo_TestSurrounding",
@@ -1411,7 +1411,7 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_TestSurrounding,
(ndr_pull_flags_fn_t) ndr_pull_echo_TestSurrounding,
(ndr_print_function_t) ndr_print_echo_TestSurrounding,
- False,
+ false,
},
{
"echo_TestDoublePointer",
@@ -1419,27 +1419,27 @@ const struct ndr_interface_call rpcecho_calls[] = {
(ndr_push_flags_fn_t) ndr_push_echo_TestDoublePointer,
(ndr_pull_flags_fn_t) ndr_pull_echo_TestDoublePointer,
(ndr_print_function_t) ndr_print_echo_TestDoublePointer,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const rpcecho_endpoint_strings[] = {
+static const char * const rpcecho_endpoint_strings[] = {
"ncacn_np:[\\pipe\\rpcecho]",
"ncacn_ip_tcp:",
"ncalrpc:",
};
-const struct ndr_interface_string_array rpcecho_endpoints = {
+static const struct ndr_interface_string_array rpcecho_endpoints = {
.count = 3,
.names = rpcecho_endpoint_strings
};
-const char * const rpcecho_authservice_strings[] = {
+static const char * const rpcecho_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array rpcecho_authservices = {
+static const struct ndr_interface_string_array rpcecho_authservices = {
.count = 3,
.names = rpcecho_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_epmapper.c b/source/librpc/gen_ndr/ndr_epmapper.c
index f33d1828cf5..43e26e85587 100644
--- a/source/librpc/gen_ndr/ndr_epmapper.c
+++ b/source/librpc/gen_ndr/ndr_epmapper.c
@@ -3,13 +3,13 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_epmapper.h"
-NTSTATUS ndr_push_epm_protocol(struct ndr_push *ndr, int ndr_flags, enum epm_protocol r)
+static NTSTATUS ndr_push_epm_protocol(struct ndr_push *ndr, int ndr_flags, enum epm_protocol r)
{
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_protocol(struct ndr_pull *ndr, int ndr_flags, enum epm_protocol *r)
+static NTSTATUS ndr_pull_epm_protocol(struct ndr_pull *ndr, int ndr_flags, enum epm_protocol *r)
{
uint8_t v;
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
@@ -52,7 +52,7 @@ _PUBLIC_ void ndr_print_epm_protocol(struct ndr_print *ndr, const char *name, en
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_epm_rhs_dnet_nsp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_dnet_nsp *r)
+static NTSTATUS ndr_push_epm_rhs_dnet_nsp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_dnet_nsp *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -62,7 +62,7 @@ NTSTATUS ndr_push_epm_rhs_dnet_nsp(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_dnet_nsp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_dnet_nsp *r)
+static NTSTATUS ndr_pull_epm_rhs_dnet_nsp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_dnet_nsp *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -79,7 +79,7 @@ _PUBLIC_ void ndr_print_epm_rhs_dnet_nsp(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_osi_tp4(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_osi_tp4 *r)
+static NTSTATUS ndr_push_epm_rhs_osi_tp4(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_osi_tp4 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -89,7 +89,7 @@ NTSTATUS ndr_push_epm_rhs_osi_tp4(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_osi_tp4(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_osi_tp4 *r)
+static NTSTATUS ndr_pull_epm_rhs_osi_tp4(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_osi_tp4 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -106,7 +106,7 @@ _PUBLIC_ void ndr_print_epm_rhs_osi_tp4(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_osi_clns(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_osi_clns *r)
+static NTSTATUS ndr_push_epm_rhs_osi_clns(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_osi_clns *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -116,7 +116,7 @@ NTSTATUS ndr_push_epm_rhs_osi_clns(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_osi_clns(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_osi_clns *r)
+static NTSTATUS ndr_pull_epm_rhs_osi_clns(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_osi_clns *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -133,7 +133,7 @@ _PUBLIC_ void ndr_print_epm_rhs_osi_clns(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_udp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_udp *r)
+static NTSTATUS ndr_push_epm_rhs_udp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_udp *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -144,7 +144,7 @@ NTSTATUS ndr_push_epm_rhs_udp(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_udp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_udp *r)
+static NTSTATUS ndr_pull_epm_rhs_udp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_udp *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -163,7 +163,7 @@ _PUBLIC_ void ndr_print_epm_rhs_udp(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_tcp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_tcp *r)
+static NTSTATUS ndr_push_epm_rhs_tcp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_tcp *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -174,7 +174,7 @@ NTSTATUS ndr_push_epm_rhs_tcp(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_tcp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_tcp *r)
+static NTSTATUS ndr_pull_epm_rhs_tcp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_tcp *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -193,7 +193,7 @@ _PUBLIC_ void ndr_print_epm_rhs_tcp(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_ip(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ip *r)
+static NTSTATUS ndr_push_epm_rhs_ip(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ip *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -204,7 +204,7 @@ NTSTATUS ndr_push_epm_rhs_ip(struct ndr_push *ndr, int ndr_flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_ip(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ip *r)
+static NTSTATUS ndr_pull_epm_rhs_ip(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ip *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -223,7 +223,7 @@ _PUBLIC_ void ndr_print_epm_rhs_ip(struct ndr_print *ndr, const char *name, cons
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_ncadg(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncadg *r)
+static NTSTATUS ndr_push_epm_rhs_ncadg(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncadg *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -234,7 +234,7 @@ NTSTATUS ndr_push_epm_rhs_ncadg(struct ndr_push *ndr, int ndr_flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_ncadg(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncadg *r)
+static NTSTATUS ndr_pull_epm_rhs_ncadg(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncadg *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -253,7 +253,7 @@ _PUBLIC_ void ndr_print_epm_rhs_ncadg(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_ncacn(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncacn *r)
+static NTSTATUS ndr_push_epm_rhs_ncacn(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncacn *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -264,7 +264,7 @@ NTSTATUS ndr_push_epm_rhs_ncacn(struct ndr_push *ndr, int ndr_flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_ncacn(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncacn *r)
+static NTSTATUS ndr_pull_epm_rhs_ncacn(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncacn *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -283,7 +283,7 @@ _PUBLIC_ void ndr_print_epm_rhs_ncacn(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_uuid(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_uuid *r)
+static NTSTATUS ndr_push_epm_rhs_uuid(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_uuid *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -299,7 +299,7 @@ NTSTATUS ndr_push_epm_rhs_uuid(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_uuid(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_uuid *r)
+static NTSTATUS ndr_pull_epm_rhs_uuid(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_uuid *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -323,7 +323,7 @@ _PUBLIC_ void ndr_print_epm_rhs_uuid(struct ndr_print *ndr, const char *name, co
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_ipx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ipx *r)
+static NTSTATUS ndr_push_epm_rhs_ipx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ipx *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -333,7 +333,7 @@ NTSTATUS ndr_push_epm_rhs_ipx(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_ipx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ipx *r)
+static NTSTATUS ndr_pull_epm_rhs_ipx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ipx *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -350,7 +350,7 @@ _PUBLIC_ void ndr_print_epm_rhs_ipx(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_smb(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_smb *r)
+static NTSTATUS ndr_push_epm_rhs_smb(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_smb *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -366,7 +366,7 @@ NTSTATUS ndr_push_epm_rhs_smb(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_smb(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_smb *r)
+static NTSTATUS ndr_pull_epm_rhs_smb(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_smb *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -390,7 +390,7 @@ _PUBLIC_ void ndr_print_epm_rhs_smb(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_pipe(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_pipe *r)
+static NTSTATUS ndr_push_epm_rhs_pipe(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_pipe *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -406,7 +406,7 @@ NTSTATUS ndr_push_epm_rhs_pipe(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_pipe(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_pipe *r)
+static NTSTATUS ndr_pull_epm_rhs_pipe(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_pipe *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -430,7 +430,7 @@ _PUBLIC_ void ndr_print_epm_rhs_pipe(struct ndr_print *ndr, const char *name, co
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_netbios(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_netbios *r)
+static NTSTATUS ndr_push_epm_rhs_netbios(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_netbios *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -446,7 +446,7 @@ NTSTATUS ndr_push_epm_rhs_netbios(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_netbios(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_netbios *r)
+static NTSTATUS ndr_pull_epm_rhs_netbios(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_netbios *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -470,7 +470,7 @@ _PUBLIC_ void ndr_print_epm_rhs_netbios(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_netbeui(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_netbeui *r)
+static NTSTATUS ndr_push_epm_rhs_netbeui(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_netbeui *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -480,7 +480,7 @@ NTSTATUS ndr_push_epm_rhs_netbeui(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_netbeui(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_netbeui *r)
+static NTSTATUS ndr_pull_epm_rhs_netbeui(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_netbeui *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -497,7 +497,7 @@ _PUBLIC_ void ndr_print_epm_rhs_netbeui(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_spx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_spx *r)
+static NTSTATUS ndr_push_epm_rhs_spx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_spx *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -507,7 +507,7 @@ NTSTATUS ndr_push_epm_rhs_spx(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_spx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_spx *r)
+static NTSTATUS ndr_pull_epm_rhs_spx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_spx *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -524,7 +524,7 @@ _PUBLIC_ void ndr_print_epm_rhs_spx(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_nb_ipx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_nb_ipx *r)
+static NTSTATUS ndr_push_epm_rhs_nb_ipx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_nb_ipx *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -534,7 +534,7 @@ NTSTATUS ndr_push_epm_rhs_nb_ipx(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_nb_ipx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_nb_ipx *r)
+static NTSTATUS ndr_pull_epm_rhs_nb_ipx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_nb_ipx *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -551,7 +551,7 @@ _PUBLIC_ void ndr_print_epm_rhs_nb_ipx(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_http(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_http *r)
+static NTSTATUS ndr_push_epm_rhs_http(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_http *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -562,7 +562,7 @@ NTSTATUS ndr_push_epm_rhs_http(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_http(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_http *r)
+static NTSTATUS ndr_pull_epm_rhs_http(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_http *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -581,7 +581,7 @@ _PUBLIC_ void ndr_print_epm_rhs_http(struct ndr_print *ndr, const char *name, co
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_unix_ds(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_unix_ds *r)
+static NTSTATUS ndr_push_epm_rhs_unix_ds(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_unix_ds *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -597,7 +597,7 @@ NTSTATUS ndr_push_epm_rhs_unix_ds(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_unix_ds(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_unix_ds *r)
+static NTSTATUS ndr_pull_epm_rhs_unix_ds(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_unix_ds *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -621,7 +621,7 @@ _PUBLIC_ void ndr_print_epm_rhs_unix_ds(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_null(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_null *r)
+static NTSTATUS ndr_push_epm_rhs_null(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_null *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -631,7 +631,7 @@ NTSTATUS ndr_push_epm_rhs_null(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_null(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_null *r)
+static NTSTATUS ndr_pull_epm_rhs_null(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_null *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -648,7 +648,7 @@ _PUBLIC_ void ndr_print_epm_rhs_null(struct ndr_print *ndr, const char *name, co
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_ncalrpc(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncalrpc *r)
+static NTSTATUS ndr_push_epm_rhs_ncalrpc(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncalrpc *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -659,7 +659,7 @@ NTSTATUS ndr_push_epm_rhs_ncalrpc(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_ncalrpc(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncalrpc *r)
+static NTSTATUS ndr_pull_epm_rhs_ncalrpc(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncalrpc *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -678,7 +678,7 @@ _PUBLIC_ void ndr_print_epm_rhs_ncalrpc(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_appletalk(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_appletalk *r)
+static NTSTATUS ndr_push_epm_rhs_appletalk(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_appletalk *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -688,7 +688,7 @@ NTSTATUS ndr_push_epm_rhs_appletalk(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_appletalk(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_appletalk *r)
+static NTSTATUS ndr_pull_epm_rhs_appletalk(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_appletalk *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -705,7 +705,7 @@ _PUBLIC_ void ndr_print_epm_rhs_appletalk(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_atalk_stream(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_atalk_stream *r)
+static NTSTATUS ndr_push_epm_rhs_atalk_stream(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_atalk_stream *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -715,7 +715,7 @@ NTSTATUS ndr_push_epm_rhs_atalk_stream(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_atalk_stream(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_atalk_stream *r)
+static NTSTATUS ndr_pull_epm_rhs_atalk_stream(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_atalk_stream *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -732,7 +732,7 @@ _PUBLIC_ void ndr_print_epm_rhs_atalk_stream(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_atalk_datagram(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_atalk_datagram *r)
+static NTSTATUS ndr_push_epm_rhs_atalk_datagram(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_atalk_datagram *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -742,7 +742,7 @@ NTSTATUS ndr_push_epm_rhs_atalk_datagram(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_atalk_datagram(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_atalk_datagram *r)
+static NTSTATUS ndr_pull_epm_rhs_atalk_datagram(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_atalk_datagram *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -759,7 +759,7 @@ _PUBLIC_ void ndr_print_epm_rhs_atalk_datagram(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_vines_spp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_vines_spp *r)
+static NTSTATUS ndr_push_epm_rhs_vines_spp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_vines_spp *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -770,7 +770,7 @@ NTSTATUS ndr_push_epm_rhs_vines_spp(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_vines_spp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_vines_spp *r)
+static NTSTATUS ndr_pull_epm_rhs_vines_spp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_vines_spp *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -789,7 +789,7 @@ _PUBLIC_ void ndr_print_epm_rhs_vines_spp(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_vines_ipc(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_vines_ipc *r)
+static NTSTATUS ndr_push_epm_rhs_vines_ipc(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_vines_ipc *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -800,7 +800,7 @@ NTSTATUS ndr_push_epm_rhs_vines_ipc(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_vines_ipc(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_vines_ipc *r)
+static NTSTATUS ndr_pull_epm_rhs_vines_ipc(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_vines_ipc *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -819,7 +819,7 @@ _PUBLIC_ void ndr_print_epm_rhs_vines_ipc(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs_streettalk(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_streettalk *r)
+static NTSTATUS ndr_push_epm_rhs_streettalk(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_streettalk *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -835,7 +835,7 @@ NTSTATUS ndr_push_epm_rhs_streettalk(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs_streettalk(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_streettalk *r)
+static NTSTATUS ndr_pull_epm_rhs_streettalk(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_streettalk *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -859,7 +859,7 @@ _PUBLIC_ void ndr_print_epm_rhs_streettalk(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_epm_rhs(struct ndr_push *ndr, int ndr_flags, const union epm_rhs *r)
+static NTSTATUS ndr_push_epm_rhs(struct ndr_push *ndr, int ndr_flags, const union epm_rhs *r)
{
{
uint32_t _flags_save_UNION = ndr->flags;
@@ -1073,7 +1073,7 @@ NTSTATUS ndr_push_epm_rhs(struct ndr_push *ndr, int ndr_flags, const union epm_r
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_rhs(struct ndr_pull *ndr, int ndr_flags, union epm_rhs *r)
+static NTSTATUS ndr_pull_epm_rhs(struct ndr_pull *ndr, int ndr_flags, union epm_rhs *r)
{
int level;
{
@@ -1409,7 +1409,7 @@ _PUBLIC_ void ndr_print_epm_rhs(struct ndr_print *ndr, const char *name, const u
}
}
-NTSTATUS ndr_push_epm_lhs(struct ndr_push *ndr, int ndr_flags, const struct epm_lhs *r)
+static NTSTATUS ndr_push_epm_lhs(struct ndr_push *ndr, int ndr_flags, const struct epm_lhs *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1426,7 +1426,7 @@ NTSTATUS ndr_push_epm_lhs(struct ndr_push *ndr, int ndr_flags, const struct epm_
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_lhs(struct ndr_pull *ndr, int ndr_flags, struct epm_lhs *r)
+static NTSTATUS ndr_pull_epm_lhs(struct ndr_pull *ndr, int ndr_flags, struct epm_lhs *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1452,7 +1452,7 @@ _PUBLIC_ void ndr_print_epm_lhs(struct ndr_print *ndr, const char *name, const s
ndr->depth--;
}
-NTSTATUS ndr_push_epm_floor(struct ndr_push *ndr, int ndr_flags, const struct epm_floor *r)
+static NTSTATUS ndr_push_epm_floor(struct ndr_push *ndr, int ndr_flags, const struct epm_floor *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -1475,7 +1475,7 @@ NTSTATUS ndr_push_epm_floor(struct ndr_push *ndr, int ndr_flags, const struct ep
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_floor(struct ndr_pull *ndr, int ndr_flags, struct epm_floor *r)
+static NTSTATUS ndr_pull_epm_floor(struct ndr_pull *ndr, int ndr_flags, struct epm_floor *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -1508,7 +1508,7 @@ _PUBLIC_ void ndr_print_epm_floor(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_epm_tower(struct ndr_push *ndr, int ndr_flags, const struct epm_tower *r)
+static NTSTATUS ndr_push_epm_tower(struct ndr_push *ndr, int ndr_flags, const struct epm_tower *r)
{
uint32_t cntr_floors_0;
{
@@ -1528,7 +1528,7 @@ NTSTATUS ndr_push_epm_tower(struct ndr_push *ndr, int ndr_flags, const struct ep
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_tower(struct ndr_pull *ndr, int ndr_flags, struct epm_tower *r)
+static NTSTATUS ndr_pull_epm_tower(struct ndr_pull *ndr, int ndr_flags, struct epm_tower *r)
{
uint32_t cntr_floors_0;
TALLOC_CTX *_mem_save_floors_0;
@@ -1578,13 +1578,13 @@ _PUBLIC_ void ndr_print_epm_tower(struct ndr_print *ndr, const char *name, const
}
}
-size_t ndr_size_epm_tower(const struct epm_tower *r, int flags)
+static size_t ndr_size_epm_tower(const struct epm_tower *r, int flags)
{
flags |= LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN;
return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_epm_tower);
}
-NTSTATUS ndr_push_epm_twr_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_t *r)
+static NTSTATUS ndr_push_epm_twr_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_t *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1601,7 +1601,7 @@ NTSTATUS ndr_push_epm_twr_t(struct ndr_push *ndr, int ndr_flags, const struct ep
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_twr_t(struct ndr_pull *ndr, int ndr_flags, struct epm_twr_t *r)
+static NTSTATUS ndr_pull_epm_twr_t(struct ndr_pull *ndr, int ndr_flags, struct epm_twr_t *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1627,7 +1627,7 @@ _PUBLIC_ void ndr_print_epm_twr_t(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flags, const struct epm_entry_t *r)
+static NTSTATUS ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flags, const struct epm_entry_t *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1649,7 +1649,7 @@ NTSTATUS ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_entry_t(struct ndr_pull *ndr, int ndr_flags, struct epm_entry_t *r)
+static NTSTATUS ndr_pull_epm_entry_t(struct ndr_pull *ndr, int ndr_flags, struct epm_entry_t *r)
{
uint32_t _ptr_tower;
TALLOC_CTX *_mem_save_tower_0;
@@ -1696,7 +1696,7 @@ _PUBLIC_ void ndr_print_epm_entry_t(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_rpc_if_id_t(struct ndr_push *ndr, int ndr_flags, const struct rpc_if_id_t *r)
+static NTSTATUS ndr_push_rpc_if_id_t(struct ndr_push *ndr, int ndr_flags, const struct rpc_if_id_t *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1710,7 +1710,7 @@ NTSTATUS ndr_push_rpc_if_id_t(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_rpc_if_id_t(struct ndr_pull *ndr, int ndr_flags, struct rpc_if_id_t *r)
+static NTSTATUS ndr_pull_rpc_if_id_t(struct ndr_pull *ndr, int ndr_flags, struct rpc_if_id_t *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1734,7 +1734,7 @@ _PUBLIC_ void ndr_print_rpc_if_id_t(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_epm_twr_p_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_p_t *r)
+static NTSTATUS ndr_push_epm_twr_p_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_p_t *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1748,7 +1748,7 @@ NTSTATUS ndr_push_epm_twr_p_t(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_twr_p_t(struct ndr_pull *ndr, int ndr_flags, struct epm_twr_p_t *r)
+static NTSTATUS ndr_pull_epm_twr_p_t(struct ndr_pull *ndr, int ndr_flags, struct epm_twr_p_t *r)
{
uint32_t _ptr_twr;
TALLOC_CTX *_mem_save_twr_0;
@@ -1785,7 +1785,7 @@ _PUBLIC_ void ndr_print_epm_twr_p_t(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_epm_Insert(struct ndr_push *ndr, int flags, const struct epm_Insert *r)
+static NTSTATUS ndr_push_epm_Insert(struct ndr_push *ndr, int flags, const struct epm_Insert *r)
{
uint32_t cntr_entries_0;
if (flags & NDR_IN) {
@@ -1805,7 +1805,7 @@ NTSTATUS ndr_push_epm_Insert(struct ndr_push *ndr, int flags, const struct epm_I
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_Insert(struct ndr_pull *ndr, int flags, struct epm_Insert *r)
+static NTSTATUS ndr_pull_epm_Insert(struct ndr_pull *ndr, int flags, struct epm_Insert *r)
{
uint32_t cntr_entries_0;
TALLOC_CTX *_mem_save_entries_0;
@@ -1868,7 +1868,7 @@ _PUBLIC_ void ndr_print_epm_Insert(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_epm_Delete(struct ndr_push *ndr, int flags, const struct epm_Delete *r)
+static NTSTATUS ndr_push_epm_Delete(struct ndr_push *ndr, int flags, const struct epm_Delete *r)
{
uint32_t cntr_entries_0;
if (flags & NDR_IN) {
@@ -1887,7 +1887,7 @@ NTSTATUS ndr_push_epm_Delete(struct ndr_push *ndr, int flags, const struct epm_D
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_Delete(struct ndr_pull *ndr, int flags, struct epm_Delete *r)
+static NTSTATUS ndr_pull_epm_Delete(struct ndr_pull *ndr, int flags, struct epm_Delete *r)
{
uint32_t cntr_entries_0;
TALLOC_CTX *_mem_save_entries_0;
@@ -1948,7 +1948,7 @@ _PUBLIC_ void ndr_print_epm_Delete(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_epm_Lookup(struct ndr_push *ndr, int flags, const struct epm_Lookup *r)
+static NTSTATUS ndr_push_epm_Lookup(struct ndr_push *ndr, int flags, const struct epm_Lookup *r)
{
uint32_t cntr_entries_0;
if (flags & NDR_IN) {
@@ -1985,7 +1985,7 @@ NTSTATUS ndr_push_epm_Lookup(struct ndr_push *ndr, int flags, const struct epm_L
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_Lookup(struct ndr_pull *ndr, int flags, struct epm_Lookup *r)
+static NTSTATUS ndr_pull_epm_Lookup(struct ndr_pull *ndr, int flags, struct epm_Lookup *r)
{
uint32_t _ptr_object;
uint32_t _ptr_interface_id;
@@ -2322,7 +2322,7 @@ _PUBLIC_ void ndr_print_epm_Map(struct ndr_print *ndr, const char *name, int fla
ndr->depth--;
}
-NTSTATUS ndr_push_epm_LookupHandleFree(struct ndr_push *ndr, int flags, const struct epm_LookupHandleFree *r)
+static NTSTATUS ndr_push_epm_LookupHandleFree(struct ndr_push *ndr, int flags, const struct epm_LookupHandleFree *r)
{
if (flags & NDR_IN) {
if (r->in.entry_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2336,7 +2336,7 @@ NTSTATUS ndr_push_epm_LookupHandleFree(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_LookupHandleFree(struct ndr_pull *ndr, int flags, struct epm_LookupHandleFree *r)
+static NTSTATUS ndr_pull_epm_LookupHandleFree(struct ndr_pull *ndr, int flags, struct epm_LookupHandleFree *r)
{
TALLOC_CTX *_mem_save_entry_handle_0;
if (flags & NDR_IN) {
@@ -2394,7 +2394,7 @@ _PUBLIC_ void ndr_print_epm_LookupHandleFree(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_epm_InqObject(struct ndr_push *ndr, int flags, const struct epm_InqObject *r)
+static NTSTATUS ndr_push_epm_InqObject(struct ndr_push *ndr, int flags, const struct epm_InqObject *r)
{
if (flags & NDR_IN) {
if (r->in.epm_object == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2406,7 +2406,7 @@ NTSTATUS ndr_push_epm_InqObject(struct ndr_push *ndr, int flags, const struct ep
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_InqObject(struct ndr_pull *ndr, int flags, struct epm_InqObject *r)
+static NTSTATUS ndr_pull_epm_InqObject(struct ndr_pull *ndr, int flags, struct epm_InqObject *r)
{
TALLOC_CTX *_mem_save_epm_object_0;
if (flags & NDR_IN) {
@@ -2449,7 +2449,7 @@ _PUBLIC_ void ndr_print_epm_InqObject(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_epm_MgmtDelete(struct ndr_push *ndr, int flags, const struct epm_MgmtDelete *r)
+static NTSTATUS ndr_push_epm_MgmtDelete(struct ndr_push *ndr, int flags, const struct epm_MgmtDelete *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.object_speced));
@@ -2468,7 +2468,7 @@ NTSTATUS ndr_push_epm_MgmtDelete(struct ndr_push *ndr, int flags, const struct e
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_MgmtDelete(struct ndr_pull *ndr, int flags, struct epm_MgmtDelete *r)
+static NTSTATUS ndr_pull_epm_MgmtDelete(struct ndr_pull *ndr, int flags, struct epm_MgmtDelete *r)
{
uint32_t _ptr_object;
uint32_t _ptr_tower;
@@ -2541,7 +2541,7 @@ _PUBLIC_ void ndr_print_epm_MgmtDelete(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_epm_MapAuth(struct ndr_push *ndr, int flags, const struct epm_MapAuth *r)
+static NTSTATUS ndr_push_epm_MapAuth(struct ndr_push *ndr, int flags, const struct epm_MapAuth *r)
{
if (flags & NDR_IN) {
}
@@ -2551,7 +2551,7 @@ NTSTATUS ndr_push_epm_MapAuth(struct ndr_push *ndr, int flags, const struct epm_
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_epm_MapAuth(struct ndr_pull *ndr, int flags, struct epm_MapAuth *r)
+static NTSTATUS ndr_pull_epm_MapAuth(struct ndr_pull *ndr, int flags, struct epm_MapAuth *r)
{
if (flags & NDR_IN) {
}
@@ -2582,14 +2582,14 @@ _PUBLIC_ void ndr_print_epm_MapAuth(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-const struct ndr_interface_call epmapper_calls[] = {
+static const struct ndr_interface_call epmapper_calls[] = {
{
"epm_Insert",
sizeof(struct epm_Insert),
(ndr_push_flags_fn_t) ndr_push_epm_Insert,
(ndr_pull_flags_fn_t) ndr_pull_epm_Insert,
(ndr_print_function_t) ndr_print_epm_Insert,
- False,
+ false,
},
{
"epm_Delete",
@@ -2597,7 +2597,7 @@ const struct ndr_interface_call epmapper_calls[] = {
(ndr_push_flags_fn_t) ndr_push_epm_Delete,
(ndr_pull_flags_fn_t) ndr_pull_epm_Delete,
(ndr_print_function_t) ndr_print_epm_Delete,
- False,
+ false,
},
{
"epm_Lookup",
@@ -2605,7 +2605,7 @@ const struct ndr_interface_call epmapper_calls[] = {
(ndr_push_flags_fn_t) ndr_push_epm_Lookup,
(ndr_pull_flags_fn_t) ndr_pull_epm_Lookup,
(ndr_print_function_t) ndr_print_epm_Lookup,
- False,
+ false,
},
{
"epm_Map",
@@ -2613,7 +2613,7 @@ const struct ndr_interface_call epmapper_calls[] = {
(ndr_push_flags_fn_t) ndr_push_epm_Map,
(ndr_pull_flags_fn_t) ndr_pull_epm_Map,
(ndr_print_function_t) ndr_print_epm_Map,
- False,
+ false,
},
{
"epm_LookupHandleFree",
@@ -2621,7 +2621,7 @@ const struct ndr_interface_call epmapper_calls[] = {
(ndr_push_flags_fn_t) ndr_push_epm_LookupHandleFree,
(ndr_pull_flags_fn_t) ndr_pull_epm_LookupHandleFree,
(ndr_print_function_t) ndr_print_epm_LookupHandleFree,
- False,
+ false,
},
{
"epm_InqObject",
@@ -2629,7 +2629,7 @@ const struct ndr_interface_call epmapper_calls[] = {
(ndr_push_flags_fn_t) ndr_push_epm_InqObject,
(ndr_pull_flags_fn_t) ndr_pull_epm_InqObject,
(ndr_print_function_t) ndr_print_epm_InqObject,
- False,
+ false,
},
{
"epm_MgmtDelete",
@@ -2637,7 +2637,7 @@ const struct ndr_interface_call epmapper_calls[] = {
(ndr_push_flags_fn_t) ndr_push_epm_MgmtDelete,
(ndr_pull_flags_fn_t) ndr_pull_epm_MgmtDelete,
(ndr_print_function_t) ndr_print_epm_MgmtDelete,
- False,
+ false,
},
{
"epm_MapAuth",
@@ -2645,27 +2645,27 @@ const struct ndr_interface_call epmapper_calls[] = {
(ndr_push_flags_fn_t) ndr_push_epm_MapAuth,
(ndr_pull_flags_fn_t) ndr_pull_epm_MapAuth,
(ndr_print_function_t) ndr_print_epm_MapAuth,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const epmapper_endpoint_strings[] = {
+static const char * const epmapper_endpoint_strings[] = {
"ncacn_np:[\\pipe\\epmapper]",
"ncacn_ip_tcp:[135]",
"ncalrpc:[EPMAPPER]",
};
-const struct ndr_interface_string_array epmapper_endpoints = {
+static const struct ndr_interface_string_array epmapper_endpoints = {
.count = 3,
.names = epmapper_endpoint_strings
};
-const char * const epmapper_authservice_strings[] = {
+static const char * const epmapper_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array epmapper_authservices = {
+static const struct ndr_interface_string_array epmapper_authservices = {
.count = 3,
.names = epmapper_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_eventlog.c b/source/librpc/gen_ndr/ndr_eventlog.c
index 303648a2293..42a846caca8 100644
--- a/source/librpc/gen_ndr/ndr_eventlog.c
+++ b/source/librpc/gen_ndr/ndr_eventlog.c
@@ -5,7 +5,7 @@
#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_security.h"
-NTSTATUS ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, int ndr_flags, const struct eventlog_OpenUnknown0 *r)
+static NTSTATUS ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, int ndr_flags, const struct eventlog_OpenUnknown0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -17,7 +17,7 @@ NTSTATUS ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_OpenUnknown0(struct ndr_pull *ndr, int ndr_flags, struct eventlog_OpenUnknown0 *r)
+static NTSTATUS ndr_pull_eventlog_OpenUnknown0(struct ndr_pull *ndr, int ndr_flags, struct eventlog_OpenUnknown0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -187,7 +187,7 @@ _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r)
+static NTSTATUS ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -203,7 +203,7 @@ NTSTATUS ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogW *r)
+static NTSTATUS ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogW *r)
{
uint32_t _ptr_unknown;
TALLOC_CTX *_mem_save_handle_0;
@@ -266,7 +266,7 @@ _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogW *r)
+static NTSTATUS ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogW *r)
{
if (flags & NDR_IN) {
}
@@ -276,7 +276,7 @@ NTSTATUS ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_BackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogW *r)
+static NTSTATUS ndr_pull_eventlog_BackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogW *r)
{
if (flags & NDR_IN) {
}
@@ -307,7 +307,7 @@ _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_CloseEventLog(struct ndr_push *ndr, int flags, const struct eventlog_CloseEventLog *r)
+static NTSTATUS ndr_push_eventlog_CloseEventLog(struct ndr_push *ndr, int flags, const struct eventlog_CloseEventLog *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -321,7 +321,7 @@ NTSTATUS ndr_push_eventlog_CloseEventLog(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_CloseEventLog(struct ndr_pull *ndr, int flags, struct eventlog_CloseEventLog *r)
+static NTSTATUS ndr_pull_eventlog_CloseEventLog(struct ndr_pull *ndr, int flags, struct eventlog_CloseEventLog *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -379,7 +379,7 @@ _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_DeregisterEventSource(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterEventSource *r)
+static NTSTATUS ndr_push_eventlog_DeregisterEventSource(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterEventSource *r)
{
if (flags & NDR_IN) {
}
@@ -389,7 +389,7 @@ NTSTATUS ndr_push_eventlog_DeregisterEventSource(struct ndr_push *ndr, int flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterEventSource *r)
+static NTSTATUS ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterEventSource *r)
{
if (flags & NDR_IN) {
}
@@ -420,7 +420,7 @@ _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, co
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_GetNumRecords(struct ndr_push *ndr, int flags, const struct eventlog_GetNumRecords *r)
+static NTSTATUS ndr_push_eventlog_GetNumRecords(struct ndr_push *ndr, int flags, const struct eventlog_GetNumRecords *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -434,7 +434,7 @@ NTSTATUS ndr_push_eventlog_GetNumRecords(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_GetNumRecords(struct ndr_pull *ndr, int flags, struct eventlog_GetNumRecords *r)
+static NTSTATUS ndr_pull_eventlog_GetNumRecords(struct ndr_pull *ndr, int flags, struct eventlog_GetNumRecords *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_number_0;
@@ -493,7 +493,7 @@ _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, const struct eventlog_GetOldestRecord *r)
+static NTSTATUS ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, const struct eventlog_GetOldestRecord *r)
{
if (flags & NDR_IN) {
}
@@ -503,7 +503,7 @@ NTSTATUS ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, int flags, struct eventlog_GetOldestRecord *r)
+static NTSTATUS ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, int flags, struct eventlog_GetOldestRecord *r)
{
if (flags & NDR_IN) {
}
@@ -534,7 +534,7 @@ _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_ChangeNotify(struct ndr_push *ndr, int flags, const struct eventlog_ChangeNotify *r)
+static NTSTATUS ndr_push_eventlog_ChangeNotify(struct ndr_push *ndr, int flags, const struct eventlog_ChangeNotify *r)
{
if (flags & NDR_IN) {
}
@@ -544,7 +544,7 @@ NTSTATUS ndr_push_eventlog_ChangeNotify(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_ChangeNotify(struct ndr_pull *ndr, int flags, struct eventlog_ChangeNotify *r)
+static NTSTATUS ndr_pull_eventlog_ChangeNotify(struct ndr_pull *ndr, int flags, struct eventlog_ChangeNotify *r)
{
if (flags & NDR_IN) {
}
@@ -575,7 +575,7 @@ _PUBLIC_ void ndr_print_eventlog_ChangeNotify(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogW *r)
+static NTSTATUS ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogW *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
@@ -595,7 +595,7 @@ NTSTATUS ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogW *r)
+static NTSTATUS ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogW *r)
{
uint32_t _ptr_unknown0;
TALLOC_CTX *_mem_save_unknown0_0;
@@ -670,7 +670,7 @@ _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_RegisterEventSourceW(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceW *r)
+static NTSTATUS ndr_push_eventlog_RegisterEventSourceW(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceW *r)
{
if (flags & NDR_IN) {
}
@@ -680,7 +680,7 @@ NTSTATUS ndr_push_eventlog_RegisterEventSourceW(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceW *r)
+static NTSTATUS ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceW *r)
{
if (flags & NDR_IN) {
}
@@ -711,7 +711,7 @@ _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogW *r)
+static NTSTATUS ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogW *r)
{
if (flags & NDR_IN) {
}
@@ -721,7 +721,7 @@ NTSTATUS ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogW *r)
+static NTSTATUS ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogW *r)
{
if (flags & NDR_IN) {
}
@@ -752,7 +752,7 @@ _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogW *r)
+static NTSTATUS ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -774,7 +774,7 @@ NTSTATUS ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogW *r)
+static NTSTATUS ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogW *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sent_size_0;
@@ -867,7 +867,7 @@ _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventW *r)
+static NTSTATUS ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventW *r)
{
if (flags & NDR_IN) {
}
@@ -877,7 +877,7 @@ NTSTATUS ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_ReportEventW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventW *r)
+static NTSTATUS ndr_pull_eventlog_ReportEventW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventW *r)
{
if (flags & NDR_IN) {
}
@@ -908,7 +908,7 @@ _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_ClearEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogA *r)
+static NTSTATUS ndr_push_eventlog_ClearEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -918,7 +918,7 @@ NTSTATUS ndr_push_eventlog_ClearEventLogA(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_ClearEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogA *r)
+static NTSTATUS ndr_pull_eventlog_ClearEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -949,7 +949,7 @@ _PUBLIC_ void ndr_print_eventlog_ClearEventLogA(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_BackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogA *r)
+static NTSTATUS ndr_push_eventlog_BackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -959,7 +959,7 @@ NTSTATUS ndr_push_eventlog_BackupEventLogA(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_BackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogA *r)
+static NTSTATUS ndr_pull_eventlog_BackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -990,7 +990,7 @@ _PUBLIC_ void ndr_print_eventlog_BackupEventLogA(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_OpenEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogA *r)
+static NTSTATUS ndr_push_eventlog_OpenEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -1000,7 +1000,7 @@ NTSTATUS ndr_push_eventlog_OpenEventLogA(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_OpenEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogA *r)
+static NTSTATUS ndr_pull_eventlog_OpenEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -1031,7 +1031,7 @@ _PUBLIC_ void ndr_print_eventlog_OpenEventLogA(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_RegisterEventSourceA(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceA *r)
+static NTSTATUS ndr_push_eventlog_RegisterEventSourceA(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceA *r)
{
if (flags & NDR_IN) {
}
@@ -1041,7 +1041,7 @@ NTSTATUS ndr_push_eventlog_RegisterEventSourceA(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceA *r)
+static NTSTATUS ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceA *r)
{
if (flags & NDR_IN) {
}
@@ -1072,7 +1072,7 @@ _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogA *r)
+static NTSTATUS ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -1082,7 +1082,7 @@ NTSTATUS ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogA *r)
+static NTSTATUS ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -1113,7 +1113,7 @@ _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_ReadEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogA *r)
+static NTSTATUS ndr_push_eventlog_ReadEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -1123,7 +1123,7 @@ NTSTATUS ndr_push_eventlog_ReadEventLogA(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_ReadEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogA *r)
+static NTSTATUS ndr_pull_eventlog_ReadEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogA *r)
{
if (flags & NDR_IN) {
}
@@ -1154,7 +1154,7 @@ _PUBLIC_ void ndr_print_eventlog_ReadEventLogA(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_ReportEventA(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventA *r)
+static NTSTATUS ndr_push_eventlog_ReportEventA(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventA *r)
{
if (flags & NDR_IN) {
}
@@ -1164,7 +1164,7 @@ NTSTATUS ndr_push_eventlog_ReportEventA(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_ReportEventA(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventA *r)
+static NTSTATUS ndr_pull_eventlog_ReportEventA(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventA *r)
{
if (flags & NDR_IN) {
}
@@ -1195,7 +1195,7 @@ _PUBLIC_ void ndr_print_eventlog_ReportEventA(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_RegisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_RegisterClusterSvc *r)
+static NTSTATUS ndr_push_eventlog_RegisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_RegisterClusterSvc *r)
{
if (flags & NDR_IN) {
}
@@ -1205,7 +1205,7 @@ NTSTATUS ndr_push_eventlog_RegisterClusterSvc(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_RegisterClusterSvc *r)
+static NTSTATUS ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_RegisterClusterSvc *r)
{
if (flags & NDR_IN) {
}
@@ -1236,7 +1236,7 @@ _PUBLIC_ void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterClusterSvc *r)
+static NTSTATUS ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterClusterSvc *r)
{
if (flags & NDR_IN) {
}
@@ -1246,7 +1246,7 @@ NTSTATUS ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterClusterSvc *r)
+static NTSTATUS ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterClusterSvc *r)
{
if (flags & NDR_IN) {
}
@@ -1277,7 +1277,7 @@ _PUBLIC_ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_WriteClusterEvents(struct ndr_push *ndr, int flags, const struct eventlog_WriteClusterEvents *r)
+static NTSTATUS ndr_push_eventlog_WriteClusterEvents(struct ndr_push *ndr, int flags, const struct eventlog_WriteClusterEvents *r)
{
if (flags & NDR_IN) {
}
@@ -1287,7 +1287,7 @@ NTSTATUS ndr_push_eventlog_WriteClusterEvents(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull *ndr, int flags, struct eventlog_WriteClusterEvents *r)
+static NTSTATUS ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull *ndr, int flags, struct eventlog_WriteClusterEvents *r)
{
if (flags & NDR_IN) {
}
@@ -1318,7 +1318,7 @@ _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_GetLogIntormation(struct ndr_push *ndr, int flags, const struct eventlog_GetLogIntormation *r)
+static NTSTATUS ndr_push_eventlog_GetLogIntormation(struct ndr_push *ndr, int flags, const struct eventlog_GetLogIntormation *r)
{
if (flags & NDR_IN) {
}
@@ -1328,7 +1328,7 @@ NTSTATUS ndr_push_eventlog_GetLogIntormation(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_GetLogIntormation(struct ndr_pull *ndr, int flags, struct eventlog_GetLogIntormation *r)
+static NTSTATUS ndr_pull_eventlog_GetLogIntormation(struct ndr_pull *ndr, int flags, struct eventlog_GetLogIntormation *r)
{
if (flags & NDR_IN) {
}
@@ -1359,7 +1359,7 @@ _PUBLIC_ void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_eventlog_FlushEventLog(struct ndr_push *ndr, int flags, const struct eventlog_FlushEventLog *r)
+static NTSTATUS ndr_push_eventlog_FlushEventLog(struct ndr_push *ndr, int flags, const struct eventlog_FlushEventLog *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1371,7 +1371,7 @@ NTSTATUS ndr_push_eventlog_FlushEventLog(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_eventlog_FlushEventLog(struct ndr_pull *ndr, int flags, struct eventlog_FlushEventLog *r)
+static NTSTATUS ndr_pull_eventlog_FlushEventLog(struct ndr_pull *ndr, int flags, struct eventlog_FlushEventLog *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -1414,14 +1414,14 @@ _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char
ndr->depth--;
}
-const struct ndr_interface_call eventlog_calls[] = {
+static const struct ndr_interface_call eventlog_calls[] = {
{
"eventlog_ClearEventLogW",
sizeof(struct eventlog_ClearEventLogW),
(ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogW,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogW,
(ndr_print_function_t) ndr_print_eventlog_ClearEventLogW,
- False,
+ false,
},
{
"eventlog_BackupEventLogW",
@@ -1429,7 +1429,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogW,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogW,
(ndr_print_function_t) ndr_print_eventlog_BackupEventLogW,
- False,
+ false,
},
{
"eventlog_CloseEventLog",
@@ -1437,7 +1437,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_CloseEventLog,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_CloseEventLog,
(ndr_print_function_t) ndr_print_eventlog_CloseEventLog,
- False,
+ false,
},
{
"eventlog_DeregisterEventSource",
@@ -1445,7 +1445,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterEventSource,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterEventSource,
(ndr_print_function_t) ndr_print_eventlog_DeregisterEventSource,
- False,
+ false,
},
{
"eventlog_GetNumRecords",
@@ -1453,7 +1453,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_GetNumRecords,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_GetNumRecords,
(ndr_print_function_t) ndr_print_eventlog_GetNumRecords,
- False,
+ false,
},
{
"eventlog_GetOldestRecord",
@@ -1461,7 +1461,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_GetOldestRecord,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_GetOldestRecord,
(ndr_print_function_t) ndr_print_eventlog_GetOldestRecord,
- False,
+ false,
},
{
"eventlog_ChangeNotify",
@@ -1469,7 +1469,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_ChangeNotify,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_ChangeNotify,
(ndr_print_function_t) ndr_print_eventlog_ChangeNotify,
- False,
+ false,
},
{
"eventlog_OpenEventLogW",
@@ -1477,7 +1477,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogW,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogW,
(ndr_print_function_t) ndr_print_eventlog_OpenEventLogW,
- False,
+ false,
},
{
"eventlog_RegisterEventSourceW",
@@ -1485,7 +1485,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceW,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceW,
(ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceW,
- False,
+ false,
},
{
"eventlog_OpenBackupEventLogW",
@@ -1493,7 +1493,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogW,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogW,
(ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogW,
- False,
+ false,
},
{
"eventlog_ReadEventLogW",
@@ -1501,7 +1501,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogW,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogW,
(ndr_print_function_t) ndr_print_eventlog_ReadEventLogW,
- False,
+ false,
},
{
"eventlog_ReportEventW",
@@ -1509,7 +1509,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventW,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventW,
(ndr_print_function_t) ndr_print_eventlog_ReportEventW,
- False,
+ false,
},
{
"eventlog_ClearEventLogA",
@@ -1517,7 +1517,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogA,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogA,
(ndr_print_function_t) ndr_print_eventlog_ClearEventLogA,
- False,
+ false,
},
{
"eventlog_BackupEventLogA",
@@ -1525,7 +1525,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogA,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogA,
(ndr_print_function_t) ndr_print_eventlog_BackupEventLogA,
- False,
+ false,
},
{
"eventlog_OpenEventLogA",
@@ -1533,7 +1533,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogA,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogA,
(ndr_print_function_t) ndr_print_eventlog_OpenEventLogA,
- False,
+ false,
},
{
"eventlog_RegisterEventSourceA",
@@ -1541,7 +1541,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceA,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceA,
(ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceA,
- False,
+ false,
},
{
"eventlog_OpenBackupEventLogA",
@@ -1549,7 +1549,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogA,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogA,
(ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogA,
- False,
+ false,
},
{
"eventlog_ReadEventLogA",
@@ -1557,7 +1557,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogA,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogA,
(ndr_print_function_t) ndr_print_eventlog_ReadEventLogA,
- False,
+ false,
},
{
"eventlog_ReportEventA",
@@ -1565,7 +1565,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventA,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventA,
(ndr_print_function_t) ndr_print_eventlog_ReportEventA,
- False,
+ false,
},
{
"eventlog_RegisterClusterSvc",
@@ -1573,7 +1573,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_RegisterClusterSvc,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterClusterSvc,
(ndr_print_function_t) ndr_print_eventlog_RegisterClusterSvc,
- False,
+ false,
},
{
"eventlog_DeregisterClusterSvc",
@@ -1581,7 +1581,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterClusterSvc,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterClusterSvc,
(ndr_print_function_t) ndr_print_eventlog_DeregisterClusterSvc,
- False,
+ false,
},
{
"eventlog_WriteClusterEvents",
@@ -1589,7 +1589,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_WriteClusterEvents,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_WriteClusterEvents,
(ndr_print_function_t) ndr_print_eventlog_WriteClusterEvents,
- False,
+ false,
},
{
"eventlog_GetLogIntormation",
@@ -1597,7 +1597,7 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_GetLogIntormation,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_GetLogIntormation,
(ndr_print_function_t) ndr_print_eventlog_GetLogIntormation,
- False,
+ false,
},
{
"eventlog_FlushEventLog",
@@ -1605,25 +1605,25 @@ const struct ndr_interface_call eventlog_calls[] = {
(ndr_push_flags_fn_t) ndr_push_eventlog_FlushEventLog,
(ndr_pull_flags_fn_t) ndr_pull_eventlog_FlushEventLog,
(ndr_print_function_t) ndr_print_eventlog_FlushEventLog,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const eventlog_endpoint_strings[] = {
+static const char * const eventlog_endpoint_strings[] = {
"ncacn_np:[\\pipe\\eventlog]",
};
-const struct ndr_interface_string_array eventlog_endpoints = {
+static const struct ndr_interface_string_array eventlog_endpoints = {
.count = 1,
.names = eventlog_endpoint_strings
};
-const char * const eventlog_authservice_strings[] = {
+static const char * const eventlog_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array eventlog_authservices = {
+static const struct ndr_interface_string_array eventlog_authservices = {
.count = 1,
.names = eventlog_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_initshutdown.c b/source/librpc/gen_ndr/ndr_initshutdown.c
index 192d4bcf3f5..7fb0f1676dd 100644
--- a/source/librpc/gen_ndr/ndr_initshutdown.c
+++ b/source/librpc/gen_ndr/ndr_initshutdown.c
@@ -3,7 +3,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_initshutdown.h"
-NTSTATUS ndr_push_initshutdown_String_sub(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String_sub *r)
+static NTSTATUS ndr_push_initshutdown_String_sub(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String_sub *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -20,7 +20,7 @@ NTSTATUS ndr_push_initshutdown_String_sub(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_initshutdown_String_sub(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String_sub *r)
+static NTSTATUS ndr_pull_initshutdown_String_sub(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String_sub *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -103,7 +103,7 @@ _PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_initshutdown_Init(struct ndr_push *ndr, int flags, const struct initshutdown_Init *r)
+static NTSTATUS ndr_push_initshutdown_Init(struct ndr_push *ndr, int flags, const struct initshutdown_Init *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
@@ -124,7 +124,7 @@ NTSTATUS ndr_push_initshutdown_Init(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_initshutdown_Init(struct ndr_pull *ndr, int flags, struct initshutdown_Init *r)
+static NTSTATUS ndr_pull_initshutdown_Init(struct ndr_pull *ndr, int flags, struct initshutdown_Init *r)
{
uint32_t _ptr_hostname;
uint32_t _ptr_message;
@@ -201,7 +201,7 @@ _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_initshutdown_Abort(struct ndr_push *ndr, int flags, const struct initshutdown_Abort *r)
+static NTSTATUS ndr_push_initshutdown_Abort(struct ndr_push *ndr, int flags, const struct initshutdown_Abort *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
@@ -215,7 +215,7 @@ NTSTATUS ndr_push_initshutdown_Abort(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_initshutdown_Abort(struct ndr_pull *ndr, int flags, struct initshutdown_Abort *r)
+static NTSTATUS ndr_pull_initshutdown_Abort(struct ndr_pull *ndr, int flags, struct initshutdown_Abort *r)
{
uint32_t _ptr_server;
TALLOC_CTX *_mem_save_server_0;
@@ -266,7 +266,7 @@ _PUBLIC_ void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_initshutdown_InitEx(struct ndr_push *ndr, int flags, const struct initshutdown_InitEx *r)
+static NTSTATUS ndr_push_initshutdown_InitEx(struct ndr_push *ndr, int flags, const struct initshutdown_InitEx *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
@@ -288,7 +288,7 @@ NTSTATUS ndr_push_initshutdown_InitEx(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_initshutdown_InitEx(struct ndr_pull *ndr, int flags, struct initshutdown_InitEx *r)
+static NTSTATUS ndr_pull_initshutdown_InitEx(struct ndr_pull *ndr, int flags, struct initshutdown_InitEx *r)
{
uint32_t _ptr_hostname;
uint32_t _ptr_message;
@@ -367,14 +367,14 @@ _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-const struct ndr_interface_call initshutdown_calls[] = {
+static const struct ndr_interface_call initshutdown_calls[] = {
{
"initshutdown_Init",
sizeof(struct initshutdown_Init),
(ndr_push_flags_fn_t) ndr_push_initshutdown_Init,
(ndr_pull_flags_fn_t) ndr_pull_initshutdown_Init,
(ndr_print_function_t) ndr_print_initshutdown_Init,
- False,
+ false,
},
{
"initshutdown_Abort",
@@ -382,7 +382,7 @@ const struct ndr_interface_call initshutdown_calls[] = {
(ndr_push_flags_fn_t) ndr_push_initshutdown_Abort,
(ndr_pull_flags_fn_t) ndr_pull_initshutdown_Abort,
(ndr_print_function_t) ndr_print_initshutdown_Abort,
- False,
+ false,
},
{
"initshutdown_InitEx",
@@ -390,25 +390,25 @@ const struct ndr_interface_call initshutdown_calls[] = {
(ndr_push_flags_fn_t) ndr_push_initshutdown_InitEx,
(ndr_pull_flags_fn_t) ndr_pull_initshutdown_InitEx,
(ndr_print_function_t) ndr_print_initshutdown_InitEx,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const initshutdown_endpoint_strings[] = {
+static const char * const initshutdown_endpoint_strings[] = {
"ncacn_np:[\\pipe\\InitShutdown]",
};
-const struct ndr_interface_string_array initshutdown_endpoints = {
+static const struct ndr_interface_string_array initshutdown_endpoints = {
.count = 1,
.names = initshutdown_endpoint_strings
};
-const char * const initshutdown_authservice_strings[] = {
+static const char * const initshutdown_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array initshutdown_authservices = {
+static const struct ndr_interface_string_array initshutdown_authservices = {
.count = 1,
.names = initshutdown_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_lsa.c b/source/librpc/gen_ndr/ndr_lsa.c
index 69459029af6..2b830ae97de 100644
--- a/source/librpc/gen_ndr/ndr_lsa.c
+++ b/source/librpc/gen_ndr/ndr_lsa.c
@@ -310,7 +310,7 @@ _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r)
+static NTSTATUS ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -322,7 +322,7 @@ NTSTATUS ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUID *r)
+static NTSTATUS ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUID *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -343,7 +343,7 @@ _PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivEntry *r)
+static NTSTATUS ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivEntry *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -356,7 +356,7 @@ NTSTATUS ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r)
+static NTSTATUS ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -378,7 +378,7 @@ _PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivArray *r)
+static NTSTATUS ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivArray *r)
{
uint32_t cntr_privs_1;
if (ndr_flags & NDR_SCALARS) {
@@ -400,7 +400,7 @@ NTSTATUS ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r)
+static NTSTATUS ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r)
{
uint32_t _ptr_privs;
uint32_t cntr_privs_1;
@@ -465,7 +465,7 @@ _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_QosInfo *r)
+static NTSTATUS ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_QosInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -479,7 +479,7 @@ NTSTATUS ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r)
+static NTSTATUS ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -504,7 +504,7 @@ _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_ObjectAttribute *r)
+static NTSTATUS ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_ObjectAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -535,7 +535,7 @@ NTSTATUS ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
+static NTSTATUS ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
{
uint32_t _ptr_root_dir;
TALLOC_CTX *_mem_save_root_dir_0;
@@ -642,7 +642,7 @@ _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
+static NTSTATUS ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -659,7 +659,7 @@ NTSTATUS ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r)
+static NTSTATUS ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -690,7 +690,7 @@ _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r)
+static NTSTATUS ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r)
{
uint32_t cntr_settings_1;
if (ndr_flags & NDR_SCALARS) {
@@ -710,7 +710,7 @@ NTSTATUS ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r)
+static NTSTATUS ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r)
{
uint32_t _ptr_settings;
uint32_t cntr_settings_1;
@@ -774,7 +774,7 @@ _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfo *r)
+static NTSTATUS ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -790,7 +790,7 @@ NTSTATUS ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
+static NTSTATUS ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
{
uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
@@ -830,7 +830,7 @@ _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_PDAccountInfo *r)
+static NTSTATUS ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_PDAccountInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -842,7 +842,7 @@ NTSTATUS ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
+static NTSTATUS ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -862,7 +862,7 @@ _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const struct lsa_ServerRole *r)
+static NTSTATUS ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const struct lsa_ServerRole *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -874,7 +874,7 @@ NTSTATUS ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
+static NTSTATUS ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -895,7 +895,7 @@ _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ReplicaSourceInfo *r)
+static NTSTATUS ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ReplicaSourceInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -909,7 +909,7 @@ NTSTATUS ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
+static NTSTATUS ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -932,7 +932,7 @@ _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DefaultQuotaInfo *r)
+static NTSTATUS ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DefaultQuotaInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
@@ -948,7 +948,7 @@ NTSTATUS ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
+static NTSTATUS ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
@@ -977,7 +977,7 @@ _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ModificationInfo *r)
+static NTSTATUS ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ModificationInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
@@ -989,7 +989,7 @@ NTSTATUS ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
+static NTSTATUS ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
@@ -1010,7 +1010,7 @@ _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullSetInfo *r)
+static NTSTATUS ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullSetInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -1021,7 +1021,7 @@ NTSTATUS ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
+static NTSTATUS ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -1040,7 +1040,7 @@ _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *r)
+static NTSTATUS ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -1053,7 +1053,7 @@ NTSTATUS ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
+static NTSTATUS ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -1076,7 +1076,7 @@ _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DnsDomainInfo *r)
+static NTSTATUS ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DnsDomainInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1098,7 +1098,7 @@ NTSTATUS ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
+static NTSTATUS ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
{
uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
@@ -1147,7 +1147,7 @@ _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
+static NTSTATUS ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -1257,7 +1257,7 @@ NTSTATUS ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, union lsa_PolicyInformation *r)
+static NTSTATUS ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, union lsa_PolicyInformation *r)
{
int level;
uint16_t _level;
@@ -1430,7 +1430,7 @@ _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char
}
}
-NTSTATUS ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidPtr *r)
+static NTSTATUS ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidPtr *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1444,7 +1444,7 @@ NTSTATUS ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct l
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
+static NTSTATUS ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
{
uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
@@ -1571,7 +1571,7 @@ _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, co
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainList *r)
+static NTSTATUS ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainList *r)
{
uint32_t cntr_domains_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1593,7 +1593,7 @@ NTSTATUS ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
+static NTSTATUS ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
{
uint32_t _ptr_domains;
uint32_t cntr_domains_1;
@@ -1658,13 +1658,13 @@ _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
+static NTSTATUS ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
{
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
+static NTSTATUS ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
{
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
@@ -1691,7 +1691,7 @@ _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enu
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid *r)
+static NTSTATUS ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1704,7 +1704,7 @@ NTSTATUS ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
+static NTSTATUS ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1727,7 +1727,7 @@ _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray *r)
+static NTSTATUS ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray *r)
{
uint32_t cntr_sids_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1746,7 +1746,7 @@ NTSTATUS ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
+static NTSTATUS ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
{
uint32_t _ptr_sids;
uint32_t cntr_sids_1;
@@ -1811,7 +1811,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_RefDomainList *r)
+static NTSTATUS ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_RefDomainList *r)
{
uint32_t cntr_domains_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1834,7 +1834,7 @@ NTSTATUS ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
+static NTSTATUS ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
{
uint32_t _ptr_domains;
uint32_t cntr_domains_1;
@@ -1904,7 +1904,7 @@ _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r)
+static NTSTATUS ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1918,7 +1918,7 @@ NTSTATUS ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
+static NTSTATUS ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1942,7 +1942,7 @@ _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray *r)
+static NTSTATUS ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray *r)
{
uint32_t cntr_names_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1964,7 +1964,7 @@ NTSTATUS ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
+static NTSTATUS ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
{
uint32_t _ptr_names;
uint32_t cntr_names_1;
@@ -2032,7 +2032,7 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUIDAttribute *r)
+static NTSTATUS ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUIDAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2044,7 +2044,7 @@ NTSTATUS ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r)
+static NTSTATUS ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2065,7 +2065,7 @@ _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivilegeSet *r)
+static NTSTATUS ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivilegeSet *r)
{
uint32_t cntr_set_0;
if (ndr_flags & NDR_SCALARS) {
@@ -2082,7 +2082,7 @@ NTSTATUS ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r)
+static NTSTATUS ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r)
{
uint32_t cntr_set_0;
TALLOC_CTX *_mem_save_set_0;
@@ -2131,7 +2131,7 @@ _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF *r)
+static NTSTATUS ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -2155,7 +2155,7 @@ NTSTATUS ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF *r)
+static NTSTATUS ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF *r)
{
uint32_t _ptr_data;
TALLOC_CTX *_mem_save_data_0;
@@ -2218,7 +2218,7 @@ _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, co
}
}
-NTSTATUS ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF2 *r)
+static NTSTATUS ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF2 *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -2239,7 +2239,7 @@ NTSTATUS ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF2 *r)
+static NTSTATUS ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF2 *r)
{
uint32_t _ptr_data;
TALLOC_CTX *_mem_save_data_0;
@@ -2296,13 +2296,13 @@ _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, c
}
}
-NTSTATUS ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r)
+static NTSTATUS ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r)
{
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r)
+static NTSTATUS ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r)
{
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
@@ -2329,7 +2329,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2341,7 +2341,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoName *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoName *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2361,7 +2361,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2372,7 +2372,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_f
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPosixOffset *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPosixOffset *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2391,7 +2391,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, co
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPassword *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPassword *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2409,7 +2409,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPassword *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPassword *r)
{
uint32_t _ptr_password;
TALLOC_CTX *_mem_save_password_0;
@@ -2466,7 +2466,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBasic *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBasic *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2482,7 +2482,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBasic *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBasic *r)
{
uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
@@ -2522,7 +2522,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2543,7 +2543,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx *r)
{
uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
@@ -2592,7 +2592,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
@@ -2606,7 +2606,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBuffer *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBuffer *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
@@ -2630,7 +2630,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfo *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2658,7 +2658,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfo *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfo *r)
{
uint32_t _ptr_incoming_current_auth_info;
TALLOC_CTX *_mem_save_incoming_current_auth_info_0;
@@ -2759,7 +2759,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2774,7 +2774,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2799,7 +2799,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfo11(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfo11 *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfo11(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfo11 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2813,7 +2813,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfo11(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfo11(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfo11 *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfo11(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfo11 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2836,7 +2836,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustDomainInfoInfoAll(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoAll *r)
+static NTSTATUS ndr_push_lsa_TrustDomainInfoInfoAll(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoAll *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2853,7 +2853,7 @@ NTSTATUS ndr_push_lsa_TrustDomainInfoInfoAll(struct ndr_push *ndr, int ndr_flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustDomainInfoInfoAll(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoAll *r)
+static NTSTATUS ndr_pull_lsa_TrustDomainInfoInfoAll(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoAll *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2881,7 +2881,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
+static NTSTATUS ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -2972,7 +2972,7 @@ NTSTATUS ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, int ndr_flags, union lsa_TrustedDomainInfo *r)
+static NTSTATUS ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, int ndr_flags, union lsa_TrustedDomainInfo *r)
{
int level;
uint16_t _level;
@@ -3114,7 +3114,7 @@ _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char
}
}
-NTSTATUS ndr_push_lsa_DATA_BUF_PTR(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF_PTR *r)
+static NTSTATUS ndr_push_lsa_DATA_BUF_PTR(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF_PTR *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3128,7 +3128,7 @@ NTSTATUS ndr_push_lsa_DATA_BUF_PTR(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF_PTR *r)
+static NTSTATUS ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF_PTR *r)
{
uint32_t _ptr_buf;
TALLOC_CTX *_mem_save_buf_0;
@@ -3165,7 +3165,7 @@ _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_RightSet *r)
+static NTSTATUS ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_RightSet *r)
{
uint32_t cntr_names_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3187,7 +3187,7 @@ NTSTATUS ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r)
+static NTSTATUS ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r)
{
uint32_t _ptr_names;
uint32_t cntr_names_1;
@@ -3252,7 +3252,7 @@ _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, co
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_StringPointer(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringPointer *r)
+static NTSTATUS ndr_push_lsa_StringPointer(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringPointer *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3266,7 +3266,7 @@ NTSTATUS ndr_push_lsa_StringPointer(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_StringPointer(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringPointer *r)
+static NTSTATUS ndr_pull_lsa_StringPointer(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringPointer *r)
{
uint32_t _ptr_string;
TALLOC_CTX *_mem_save_string_0;
@@ -3303,7 +3303,7 @@ _PUBLIC_ void ndr_print_lsa_StringPointer(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r)
+static NTSTATUS ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r)
{
uint32_t cntr_domains_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3325,7 +3325,7 @@ NTSTATUS ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainListEx *r)
+static NTSTATUS ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainListEx *r)
{
uint32_t _ptr_domains;
uint32_t cntr_domains_1;
@@ -3390,7 +3390,7 @@ _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoKerberos *r)
+static NTSTATUS ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoKerberos *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 8));
@@ -3406,7 +3406,7 @@ NTSTATUS ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoKerberos *r)
+static NTSTATUS ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoKerberos *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
@@ -3435,7 +3435,7 @@ _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoEfs *r)
+static NTSTATUS ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoEfs *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3451,7 +3451,7 @@ NTSTATUS ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoEfs *r)
+static NTSTATUS ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoEfs *r)
{
uint32_t _ptr_efs_blob;
TALLOC_CTX *_mem_save_efs_blob_0;
@@ -3495,7 +3495,7 @@ _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flags, const union lsa_DomainInformationPolicy *r)
+static NTSTATUS ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flags, const union lsa_DomainInformationPolicy *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -3530,7 +3530,7 @@ NTSTATUS ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *ndr, int ndr_flags, union lsa_DomainInformationPolicy *r)
+static NTSTATUS ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *ndr, int ndr_flags, union lsa_DomainInformationPolicy *r)
{
int level;
uint16_t _level;
@@ -3588,7 +3588,7 @@ _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const
}
}
-NTSTATUS ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName2 *r)
+static NTSTATUS ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3603,7 +3603,7 @@ NTSTATUS ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName2 *r)
+static NTSTATUS ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -3629,7 +3629,7 @@ _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray2 *r)
+static NTSTATUS ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray2 *r)
{
uint32_t cntr_names_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3651,7 +3651,7 @@ NTSTATUS ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray2 *r)
+static NTSTATUS ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray2 *r)
{
uint32_t _ptr_names;
uint32_t cntr_names_1;
@@ -3719,7 +3719,7 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r)
+static NTSTATUS ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3733,7 +3733,7 @@ NTSTATUS ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid2 *r)
+static NTSTATUS ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -3758,7 +3758,7 @@ _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray2 *r)
+static NTSTATUS ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray2 *r)
{
uint32_t cntr_sids_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3777,7 +3777,7 @@ NTSTATUS ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray2 *r)
+static NTSTATUS ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray2 *r)
{
uint32_t _ptr_sids;
uint32_t cntr_sids_1;
@@ -3842,7 +3842,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid3 *r)
+static NTSTATUS ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid3 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3859,7 +3859,7 @@ NTSTATUS ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid3 *r)
+static NTSTATUS ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid3 *r)
{
uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
@@ -3902,7 +3902,7 @@ _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray3 *r)
+static NTSTATUS ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray3 *r)
{
uint32_t cntr_sids_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3924,7 +3924,7 @@ NTSTATUS ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray3 *r)
+static NTSTATUS ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray3 *r)
{
uint32_t _ptr_sids;
uint32_t cntr_sids_1;
@@ -3992,7 +3992,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r)
+static NTSTATUS ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4006,7 +4006,7 @@ NTSTATUS ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Cl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, struct lsa_Close *r)
+static NTSTATUS ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, struct lsa_Close *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -4064,7 +4064,7 @@ _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int f
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r)
+static NTSTATUS ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4076,7 +4076,7 @@ NTSTATUS ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_D
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r)
+static NTSTATUS ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -4119,7 +4119,7 @@ _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r)
+static NTSTATUS ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4138,7 +4138,7 @@ NTSTATUS ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct ls
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r)
+static NTSTATUS ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_resume_handle_0;
@@ -4224,7 +4224,7 @@ _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struct lsa_QuerySecurity *r)
+static NTSTATUS ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struct lsa_QuerySecurity *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4241,7 +4241,7 @@ NTSTATUS ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int flags, struct lsa_QuerySecurity *r)
+static NTSTATUS ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int flags, struct lsa_QuerySecurity *r)
{
uint32_t _ptr_sdbuf;
TALLOC_CTX *_mem_save_handle_0;
@@ -4308,7 +4308,7 @@ _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r)
+static NTSTATUS ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r)
{
if (flags & NDR_IN) {
}
@@ -4318,7 +4318,7 @@ NTSTATUS ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct ls
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r)
+static NTSTATUS ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r)
{
if (flags & NDR_IN) {
}
@@ -4349,7 +4349,7 @@ _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const struct lsa_ChangePassword *r)
+static NTSTATUS ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const struct lsa_ChangePassword *r)
{
if (flags & NDR_IN) {
}
@@ -4359,7 +4359,7 @@ NTSTATUS ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, int flags, struct lsa_ChangePassword *r)
+static NTSTATUS ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, int flags, struct lsa_ChangePassword *r)
{
if (flags & NDR_IN) {
}
@@ -4390,7 +4390,7 @@ _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r)
+static NTSTATUS ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -4409,7 +4409,7 @@ NTSTATUS ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct l
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r)
+static NTSTATUS ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -4490,7 +4490,7 @@ _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy *r)
+static NTSTATUS ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4508,7 +4508,7 @@ NTSTATUS ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy *r)
+static NTSTATUS ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -4577,7 +4577,7 @@ _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy *r)
+static NTSTATUS ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy *r)
{
if (flags & NDR_IN) {
}
@@ -4587,7 +4587,7 @@ NTSTATUS ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy *r)
+static NTSTATUS ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy *r)
{
if (flags & NDR_IN) {
}
@@ -4618,7 +4618,7 @@ _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struct lsa_ClearAuditLog *r)
+static NTSTATUS ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struct lsa_ClearAuditLog *r)
{
if (flags & NDR_IN) {
}
@@ -4628,7 +4628,7 @@ NTSTATUS ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, int flags, struct lsa_ClearAuditLog *r)
+static NTSTATUS ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, int flags, struct lsa_ClearAuditLog *r)
{
if (flags & NDR_IN) {
}
@@ -4659,7 +4659,7 @@ _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r)
+static NTSTATUS ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4676,7 +4676,7 @@ NTSTATUS ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r)
+static NTSTATUS ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sid_0;
@@ -4749,7 +4749,7 @@ _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r)
+static NTSTATUS ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4768,7 +4768,7 @@ NTSTATUS ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r)
+static NTSTATUS ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_resume_handle_0;
@@ -4857,7 +4857,7 @@ _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r)
+static NTSTATUS ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4874,7 +4874,7 @@ NTSTATUS ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
+static NTSTATUS ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_info_0;
@@ -4947,7 +4947,7 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustDom *r)
+static NTSTATUS ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustDom *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4966,7 +4966,7 @@ NTSTATUS ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustDom *r)
+static NTSTATUS ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustDom *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_resume_handle_0;
@@ -5055,7 +5055,7 @@ _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r)
+static NTSTATUS ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r)
{
uint32_t cntr_names_0;
if (flags & NDR_IN) {
@@ -5089,7 +5089,7 @@ NTSTATUS ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r)
+static NTSTATUS ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r)
{
uint32_t cntr_names_0;
uint32_t _ptr_domains;
@@ -5239,7 +5239,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r)
+static NTSTATUS ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -5266,7 +5266,7 @@ NTSTATUS ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct l
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r)
+static NTSTATUS ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r)
{
uint32_t _ptr_domains;
TALLOC_CTX *_mem_save_handle_0;
@@ -5395,7 +5395,7 @@ _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r)
+static NTSTATUS ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -5411,7 +5411,7 @@ NTSTATUS ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r)
+static NTSTATUS ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sec_handle_0;
@@ -5474,7 +5474,7 @@ _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct lsa_OpenAccount *r)
+static NTSTATUS ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct lsa_OpenAccount *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -5491,7 +5491,7 @@ NTSTATUS ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
+static NTSTATUS ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sid_0;
@@ -5564,7 +5564,7 @@ _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivsAccount *r)
+static NTSTATUS ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivsAccount *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -5580,7 +5580,7 @@ NTSTATUS ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivsAccount *r)
+static NTSTATUS ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivsAccount *r)
{
uint32_t _ptr_privs;
TALLOC_CTX *_mem_save_handle_0;
@@ -5645,7 +5645,7 @@ _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, const struct lsa_AddPrivilegesToAccount *r)
+static NTSTATUS ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, const struct lsa_AddPrivilegesToAccount *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -5659,7 +5659,7 @@ NTSTATUS ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *ndr, int flags, struct lsa_AddPrivilegesToAccount *r)
+static NTSTATUS ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *ndr, int flags, struct lsa_AddPrivilegesToAccount *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_privs_0;
@@ -5714,7 +5714,7 @@ _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
+static NTSTATUS ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -5731,7 +5731,7 @@ NTSTATUS ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull *ndr, int flags, struct lsa_RemovePrivilegesFromAccount *r)
+static NTSTATUS ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull *ndr, int flags, struct lsa_RemovePrivilegesFromAccount *r)
{
uint32_t _ptr_privs;
TALLOC_CTX *_mem_save_handle_0;
@@ -5796,7 +5796,7 @@ _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_GetQuotasForAccount *r)
+static NTSTATUS ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_GetQuotasForAccount *r)
{
if (flags & NDR_IN) {
}
@@ -5806,7 +5806,7 @@ NTSTATUS ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_GetQuotasForAccount *r)
+static NTSTATUS ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_GetQuotasForAccount *r)
{
if (flags & NDR_IN) {
}
@@ -5837,7 +5837,7 @@ _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_SetQuotasForAccount *r)
+static NTSTATUS ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_SetQuotasForAccount *r)
{
if (flags & NDR_IN) {
}
@@ -5847,7 +5847,7 @@ NTSTATUS ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_SetQuotasForAccount *r)
+static NTSTATUS ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_SetQuotasForAccount *r)
{
if (flags & NDR_IN) {
}
@@ -5878,7 +5878,7 @@ _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
+static NTSTATUS ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
{
if (flags & NDR_IN) {
}
@@ -5888,7 +5888,7 @@ NTSTATUS ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
+static NTSTATUS ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
{
if (flags & NDR_IN) {
}
@@ -5919,7 +5919,7 @@ _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
+static NTSTATUS ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
{
if (flags & NDR_IN) {
}
@@ -5929,7 +5929,7 @@ NTSTATUS ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
+static NTSTATUS ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
{
if (flags & NDR_IN) {
}
@@ -5960,7 +5960,7 @@ _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomain *r)
+static NTSTATUS ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomain *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -5977,7 +5977,7 @@ NTSTATUS ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomain *r)
+static NTSTATUS ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomain *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sid_0;
@@ -6050,7 +6050,7 @@ _PUBLIC_ void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfo *r)
+static NTSTATUS ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfo *r)
{
if (flags & NDR_IN) {
if (r->in.trustdom_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -6068,7 +6068,7 @@ NTSTATUS ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfo *r)
+static NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfo *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_trustdom_handle_0;
@@ -6137,7 +6137,7 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r)
+static NTSTATUS ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r)
{
if (flags & NDR_IN) {
}
@@ -6147,7 +6147,7 @@ NTSTATUS ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r)
+static NTSTATUS ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r)
{
if (flags & NDR_IN) {
}
@@ -6178,7 +6178,7 @@ _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r)
+static NTSTATUS ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -6194,7 +6194,7 @@ NTSTATUS ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct l
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r)
+static NTSTATUS ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sec_handle_0;
@@ -6257,7 +6257,7 @@ _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r)
+static NTSTATUS ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r)
{
if (flags & NDR_IN) {
if (r->in.sec_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -6277,7 +6277,7 @@ NTSTATUS ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct ls
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r)
+static NTSTATUS ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r)
{
uint32_t _ptr_new_val;
uint32_t _ptr_old_val;
@@ -6360,7 +6360,7 @@ _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r)
+static NTSTATUS ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r)
{
if (flags & NDR_IN) {
if (r->in.sec_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -6404,7 +6404,7 @@ NTSTATUS ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r)
+static NTSTATUS ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r)
{
uint32_t _ptr_new_val;
uint32_t _ptr_new_mtime;
@@ -6601,7 +6601,7 @@ _PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivValue *r)
+static NTSTATUS ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivValue *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -6617,7 +6617,7 @@ NTSTATUS ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupPrivValue(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivValue *r)
+static NTSTATUS ndr_pull_lsa_LookupPrivValue(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivValue *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_name_0;
@@ -6688,7 +6688,7 @@ _PUBLIC_ void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivName *r)
+static NTSTATUS ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivName *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -6706,7 +6706,7 @@ NTSTATUS ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivName *r)
+static NTSTATUS ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivName *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_handle_0;
@@ -6783,7 +6783,7 @@ _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivDisplayName *r)
+static NTSTATUS ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivDisplayName *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -6806,7 +6806,7 @@ NTSTATUS ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivDisplayName *r)
+static NTSTATUS ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivDisplayName *r)
{
uint32_t _ptr_disp_name;
TALLOC_CTX *_mem_save_handle_0;
@@ -6910,7 +6910,7 @@ _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct lsa_DeleteObject *r)
+static NTSTATUS ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct lsa_DeleteObject *r)
{
if (flags & NDR_IN) {
}
@@ -6920,7 +6920,7 @@ NTSTATUS ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r)
+static NTSTATUS ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r)
{
if (flags & NDR_IN) {
}
@@ -6951,7 +6951,7 @@ _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountsWithUserRight *r)
+static NTSTATUS ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountsWithUserRight *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -6969,7 +6969,7 @@ NTSTATUS ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountsWithUserRight *r)
+static NTSTATUS ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountsWithUserRight *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_handle_0;
@@ -7048,7 +7048,7 @@ _PUBLIC_ void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountRights *r)
+static NTSTATUS ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountRights *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -7064,7 +7064,7 @@ NTSTATUS ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountRights *r)
+static NTSTATUS ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountRights *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sid_0;
@@ -7135,7 +7135,7 @@ _PUBLIC_ void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int flags, const struct lsa_AddAccountRights *r)
+static NTSTATUS ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int flags, const struct lsa_AddAccountRights *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -7151,7 +7151,7 @@ NTSTATUS ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_AddAccountRights(struct ndr_pull *ndr, int flags, struct lsa_AddAccountRights *r)
+static NTSTATUS ndr_pull_lsa_AddAccountRights(struct ndr_pull *ndr, int flags, struct lsa_AddAccountRights *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sid_0;
@@ -7218,7 +7218,7 @@ _PUBLIC_ void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, int flags, const struct lsa_RemoveAccountRights *r)
+static NTSTATUS ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, int flags, const struct lsa_RemoveAccountRights *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -7235,7 +7235,7 @@ NTSTATUS ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, int flags, struct lsa_RemoveAccountRights *r)
+static NTSTATUS ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, int flags, struct lsa_RemoveAccountRights *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sid_0;
@@ -7304,7 +7304,7 @@ _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
+static NTSTATUS ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -7324,7 +7324,7 @@ NTSTATUS ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push *ndr, int flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoBySid *r)
+static NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoBySid *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -7405,7 +7405,7 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *r)
+static NTSTATUS ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *r)
{
if (flags & NDR_IN) {
}
@@ -7415,7 +7415,7 @@ NTSTATUS ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r)
+static NTSTATUS ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r)
{
if (flags & NDR_IN) {
}
@@ -7446,7 +7446,7 @@ _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_DeleteTrustedDomain *r)
+static NTSTATUS ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_DeleteTrustedDomain *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -7460,7 +7460,7 @@ NTSTATUS ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_DeleteTrustedDomain *r)
+static NTSTATUS ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_DeleteTrustedDomain *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_dom_sid_0;
@@ -7515,7 +7515,7 @@ _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const struct lsa_StorePrivateData *r)
+static NTSTATUS ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const struct lsa_StorePrivateData *r)
{
if (flags & NDR_IN) {
}
@@ -7525,7 +7525,7 @@ NTSTATUS ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_StorePrivateData(struct ndr_pull *ndr, int flags, struct lsa_StorePrivateData *r)
+static NTSTATUS ndr_pull_lsa_StorePrivateData(struct ndr_pull *ndr, int flags, struct lsa_StorePrivateData *r)
{
if (flags & NDR_IN) {
}
@@ -7556,7 +7556,7 @@ _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, int flags, const struct lsa_RetrievePrivateData *r)
+static NTSTATUS ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, int flags, const struct lsa_RetrievePrivateData *r)
{
if (flags & NDR_IN) {
}
@@ -7566,7 +7566,7 @@ NTSTATUS ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_RetrievePrivateData(struct ndr_pull *ndr, int flags, struct lsa_RetrievePrivateData *r)
+static NTSTATUS ndr_pull_lsa_RetrievePrivateData(struct ndr_pull *ndr, int flags, struct lsa_RetrievePrivateData *r)
{
if (flags & NDR_IN) {
}
@@ -7597,7 +7597,7 @@ _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r)
+static NTSTATUS ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -7619,7 +7619,7 @@ NTSTATUS ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r)
+static NTSTATUS ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -7706,7 +7706,7 @@ _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_GetUserName(struct ndr_push *ndr, int flags, const struct lsa_GetUserName *r)
+static NTSTATUS ndr_push_lsa_GetUserName(struct ndr_push *ndr, int flags, const struct lsa_GetUserName *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -7739,7 +7739,7 @@ NTSTATUS ndr_push_lsa_GetUserName(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flags, struct lsa_GetUserName *r)
+static NTSTATUS ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flags, struct lsa_GetUserName *r)
{
uint32_t _ptr_system_name;
uint32_t _ptr_account_name;
@@ -7874,7 +7874,7 @@ _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy2 *r)
+static NTSTATUS ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy2 *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -7892,7 +7892,7 @@ NTSTATUS ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy2 *r)
+static NTSTATUS ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy2 *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -7961,7 +7961,7 @@ _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy2 *r)
+static NTSTATUS ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy2 *r)
{
if (flags & NDR_IN) {
}
@@ -7971,7 +7971,7 @@ NTSTATUS ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy2 *r)
+static NTSTATUS ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy2 *r)
{
if (flags & NDR_IN) {
}
@@ -8002,7 +8002,7 @@ _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
+static NTSTATUS ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -8021,7 +8021,7 @@ NTSTATUS ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push *ndr, int fla
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r)
+static NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -8092,7 +8092,7 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
+static NTSTATUS ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -8111,7 +8111,7 @@ NTSTATUS ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push *ndr, int flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfoByName *r)
+static NTSTATUS ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfoByName *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -8180,7 +8180,7 @@ _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, co
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustedDomainsEx *r)
+static NTSTATUS ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustedDomainsEx *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -8199,7 +8199,7 @@ NTSTATUS ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustedDomainsEx *r)
+static NTSTATUS ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustedDomainsEx *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_resume_handle_0;
@@ -8285,7 +8285,7 @@ _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r)
+static NTSTATUS ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r)
{
if (flags & NDR_IN) {
}
@@ -8295,7 +8295,7 @@ NTSTATUS ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r)
+static NTSTATUS ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r)
{
if (flags & NDR_IN) {
}
@@ -8326,7 +8326,7 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CloseTrustedDomainEx *r)
+static NTSTATUS ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CloseTrustedDomainEx *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -8340,7 +8340,7 @@ NTSTATUS ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CloseTrustedDomainEx *r)
+static NTSTATUS ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CloseTrustedDomainEx *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -8398,7 +8398,7 @@ _PUBLIC_ void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryDomainInformationPolicy *r)
+static NTSTATUS ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryDomainInformationPolicy *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -8416,7 +8416,7 @@ NTSTATUS ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push *ndr, int fla
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryDomainInformationPolicy *r)
+static NTSTATUS ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryDomainInformationPolicy *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -8485,7 +8485,7 @@ _PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetDomainInformationPolicy *r)
+static NTSTATUS ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetDomainInformationPolicy *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -8503,7 +8503,7 @@ NTSTATUS ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push *ndr, int flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetDomainInformationPolicy *r)
+static NTSTATUS ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetDomainInformationPolicy *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -8570,7 +8570,7 @@ _PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, co
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomainByName *r)
+static NTSTATUS ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomainByName *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -8586,7 +8586,7 @@ NTSTATUS ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomainByName *r)
+static NTSTATUS ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomainByName *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_trustdom_handle_0;
@@ -8649,7 +8649,7 @@ _PUBLIC_ void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_TestCall(struct ndr_push *ndr, int flags, const struct lsa_TestCall *r)
+static NTSTATUS ndr_push_lsa_TestCall(struct ndr_push *ndr, int flags, const struct lsa_TestCall *r)
{
if (flags & NDR_IN) {
}
@@ -8659,7 +8659,7 @@ NTSTATUS ndr_push_lsa_TestCall(struct ndr_push *ndr, int flags, const struct lsa
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_TestCall(struct ndr_pull *ndr, int flags, struct lsa_TestCall *r)
+static NTSTATUS ndr_pull_lsa_TestCall(struct ndr_pull *ndr, int flags, struct lsa_TestCall *r)
{
if (flags & NDR_IN) {
}
@@ -8690,7 +8690,7 @@ _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, in
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r)
+static NTSTATUS ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -8719,7 +8719,7 @@ NTSTATUS ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r)
+static NTSTATUS ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r)
{
uint32_t _ptr_domains;
TALLOC_CTX *_mem_save_handle_0;
@@ -8852,7 +8852,7 @@ _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r)
+static NTSTATUS ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r)
{
uint32_t cntr_names_0;
if (flags & NDR_IN) {
@@ -8888,7 +8888,7 @@ NTSTATUS ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r)
+static NTSTATUS ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r)
{
uint32_t cntr_names_0;
uint32_t _ptr_domains;
@@ -9042,7 +9042,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
+static NTSTATUS ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
{
if (flags & NDR_IN) {
}
@@ -9052,7 +9052,7 @@ NTSTATUS ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r)
+static NTSTATUS ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r)
{
if (flags & NDR_IN) {
}
@@ -9083,7 +9083,7 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRWRITE(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITE *r)
+static NTSTATUS ndr_push_lsa_CREDRWRITE(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITE *r)
{
if (flags & NDR_IN) {
}
@@ -9093,7 +9093,7 @@ NTSTATUS ndr_push_lsa_CREDRWRITE(struct ndr_push *ndr, int flags, const struct l
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRWRITE(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITE *r)
+static NTSTATUS ndr_pull_lsa_CREDRWRITE(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITE *r)
{
if (flags & NDR_IN) {
}
@@ -9124,7 +9124,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRREAD(struct ndr_push *ndr, int flags, const struct lsa_CREDRREAD *r)
+static NTSTATUS ndr_push_lsa_CREDRREAD(struct ndr_push *ndr, int flags, const struct lsa_CREDRREAD *r)
{
if (flags & NDR_IN) {
}
@@ -9134,7 +9134,7 @@ NTSTATUS ndr_push_lsa_CREDRREAD(struct ndr_push *ndr, int flags, const struct ls
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRREAD(struct ndr_pull *ndr, int flags, struct lsa_CREDRREAD *r)
+static NTSTATUS ndr_pull_lsa_CREDRREAD(struct ndr_pull *ndr, int flags, struct lsa_CREDRREAD *r)
{
if (flags & NDR_IN) {
}
@@ -9165,7 +9165,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, i
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRENUMERATE(struct ndr_push *ndr, int flags, const struct lsa_CREDRENUMERATE *r)
+static NTSTATUS ndr_push_lsa_CREDRENUMERATE(struct ndr_push *ndr, int flags, const struct lsa_CREDRENUMERATE *r)
{
if (flags & NDR_IN) {
}
@@ -9175,7 +9175,7 @@ NTSTATUS ndr_push_lsa_CREDRENUMERATE(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull *ndr, int flags, struct lsa_CREDRENUMERATE *r)
+static NTSTATUS ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull *ndr, int flags, struct lsa_CREDRENUMERATE *r)
{
if (flags & NDR_IN) {
}
@@ -9206,7 +9206,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
+static NTSTATUS ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
{
if (flags & NDR_IN) {
}
@@ -9216,7 +9216,7 @@ NTSTATUS ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push *ndr, int flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
+static NTSTATUS ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
{
if (flags & NDR_IN) {
}
@@ -9247,7 +9247,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, c
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
+static NTSTATUS ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
{
if (flags & NDR_IN) {
}
@@ -9257,7 +9257,7 @@ NTSTATUS ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push *ndr, int flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRREADDOMAINCREDENTIALS *r)
+static NTSTATUS ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRREADDOMAINCREDENTIALS *r)
{
if (flags & NDR_IN) {
}
@@ -9288,7 +9288,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, co
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRDELETE(struct ndr_push *ndr, int flags, const struct lsa_CREDRDELETE *r)
+static NTSTATUS ndr_push_lsa_CREDRDELETE(struct ndr_push *ndr, int flags, const struct lsa_CREDRDELETE *r)
{
if (flags & NDR_IN) {
}
@@ -9298,7 +9298,7 @@ NTSTATUS ndr_push_lsa_CREDRDELETE(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRDELETE(struct ndr_pull *ndr, int flags, struct lsa_CREDRDELETE *r)
+static NTSTATUS ndr_pull_lsa_CREDRDELETE(struct ndr_pull *ndr, int flags, struct lsa_CREDRDELETE *r)
{
if (flags & NDR_IN) {
}
@@ -9329,7 +9329,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETTARGETINFO *r)
+static NTSTATUS ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETTARGETINFO *r)
{
if (flags & NDR_IN) {
}
@@ -9339,7 +9339,7 @@ NTSTATUS ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETTARGETINFO *r)
+static NTSTATUS ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETTARGETINFO *r)
{
if (flags & NDR_IN) {
}
@@ -9370,7 +9370,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push *ndr, int flags, const struct lsa_CREDRPROFILELOADED *r)
+static NTSTATUS ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push *ndr, int flags, const struct lsa_CREDRPROFILELOADED *r)
{
if (flags & NDR_IN) {
}
@@ -9380,7 +9380,7 @@ NTSTATUS ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull *ndr, int flags, struct lsa_CREDRPROFILELOADED *r)
+static NTSTATUS ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull *ndr, int flags, struct lsa_CREDRPROFILELOADED *r)
{
if (flags & NDR_IN) {
}
@@ -9411,7 +9411,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r)
+static NTSTATUS ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r)
{
uint32_t cntr_names_0;
if (flags & NDR_IN) {
@@ -9447,7 +9447,7 @@ NTSTATUS ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r)
+static NTSTATUS ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r)
{
uint32_t cntr_names_0;
uint32_t _ptr_domains;
@@ -9601,7 +9601,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
+static NTSTATUS ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
{
if (flags & NDR_IN) {
}
@@ -9611,7 +9611,7 @@ NTSTATUS ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETSESSIONTYPES *r)
+static NTSTATUS ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETSESSIONTYPES *r)
{
if (flags & NDR_IN) {
}
@@ -9642,7 +9642,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
+static NTSTATUS ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
{
if (flags & NDR_IN) {
}
@@ -9652,7 +9652,7 @@ NTSTATUS ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARREGISTERAUDITEVENT *r)
+static NTSTATUS ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARREGISTERAUDITEVENT *r)
{
if (flags & NDR_IN) {
}
@@ -9683,7 +9683,7 @@ _PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARGENAUDITEVENT *r)
+static NTSTATUS ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARGENAUDITEVENT *r)
{
if (flags & NDR_IN) {
}
@@ -9693,7 +9693,7 @@ NTSTATUS ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARGENAUDITEVENT *r)
+static NTSTATUS ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARGENAUDITEVENT *r)
{
if (flags & NDR_IN) {
}
@@ -9724,7 +9724,7 @@ _PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
+static NTSTATUS ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
{
if (flags & NDR_IN) {
}
@@ -9734,7 +9734,7 @@ NTSTATUS ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARUNREGISTERAUDITEVENT *r)
+static NTSTATUS ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARUNREGISTERAUDITEVENT *r)
{
if (flags & NDR_IN) {
}
@@ -9765,7 +9765,7 @@ _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r)
+static NTSTATUS ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -9775,7 +9775,7 @@ NTSTATUS ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_push *ndr, int
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r)
+static NTSTATUS ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -9806,7 +9806,7 @@ _PUBLIC_ void ndr_print_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_print *nd
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
+static NTSTATUS ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -9816,7 +9816,7 @@ NTSTATUS ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
+static NTSTATUS ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -9847,7 +9847,7 @@ _PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_CREDRRENAME(struct ndr_push *ndr, int flags, const struct lsa_CREDRRENAME *r)
+static NTSTATUS ndr_push_lsa_CREDRRENAME(struct ndr_push *ndr, int flags, const struct lsa_CREDRRENAME *r)
{
if (flags & NDR_IN) {
}
@@ -9857,7 +9857,7 @@ NTSTATUS ndr_push_lsa_CREDRRENAME(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_CREDRRENAME(struct ndr_pull *ndr, int flags, struct lsa_CREDRRENAME *r)
+static NTSTATUS ndr_pull_lsa_CREDRRENAME(struct ndr_pull *ndr, int flags, struct lsa_CREDRRENAME *r)
{
if (flags & NDR_IN) {
}
@@ -9888,7 +9888,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r)
+static NTSTATUS ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r)
{
if (flags & NDR_IN) {
if (r->in.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -9915,7 +9915,7 @@ NTSTATUS ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r)
+static NTSTATUS ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r)
{
uint32_t _ptr_domains;
TALLOC_CTX *_mem_save_sids_0;
@@ -10036,7 +10036,7 @@ _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int flags, const struct lsa_LookupNames4 *r)
+static NTSTATUS ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int flags, const struct lsa_LookupNames4 *r)
{
uint32_t cntr_names_0;
if (flags & NDR_IN) {
@@ -10070,7 +10070,7 @@ NTSTATUS ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r)
+static NTSTATUS ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r)
{
uint32_t cntr_names_0;
uint32_t _ptr_domains;
@@ -10212,7 +10212,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push *ndr, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
+static NTSTATUS ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push *ndr, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
{
if (flags & NDR_IN) {
}
@@ -10222,7 +10222,7 @@ NTSTATUS ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull *ndr, int flags, struct lsa_LSAROPENPOLICYSCE *r)
+static NTSTATUS ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull *ndr, int flags, struct lsa_LSAROPENPOLICYSCE *r)
{
if (flags & NDR_IN) {
}
@@ -10253,7 +10253,7 @@ _PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
+static NTSTATUS ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
{
if (flags & NDR_IN) {
}
@@ -10263,7 +10263,7 @@ NTSTATUS ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, i
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
+static NTSTATUS ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
{
if (flags & NDR_IN) {
}
@@ -10294,7 +10294,7 @@ _PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
+static NTSTATUS ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
{
if (flags & NDR_IN) {
}
@@ -10304,7 +10304,7 @@ NTSTATUS ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
+static NTSTATUS ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
{
if (flags & NDR_IN) {
}
@@ -10335,7 +10335,7 @@ _PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_prin
ndr->depth--;
}
-NTSTATUS ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
+static NTSTATUS ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
{
if (flags & NDR_IN) {
}
@@ -10345,7 +10345,7 @@ NTSTATUS ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push *ndr, int flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREPORTSECURITYEVENT *r)
+static NTSTATUS ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREPORTSECURITYEVENT *r)
{
if (flags & NDR_IN) {
}
@@ -10376,14 +10376,14 @@ _PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, co
ndr->depth--;
}
-const struct ndr_interface_call lsarpc_calls[] = {
+static const struct ndr_interface_call lsarpc_calls[] = {
{
"lsa_Close",
sizeof(struct lsa_Close),
(ndr_push_flags_fn_t) ndr_push_lsa_Close,
(ndr_pull_flags_fn_t) ndr_pull_lsa_Close,
(ndr_print_function_t) ndr_print_lsa_Close,
- False,
+ false,
},
{
"lsa_Delete",
@@ -10391,7 +10391,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_Delete,
(ndr_pull_flags_fn_t) ndr_pull_lsa_Delete,
(ndr_print_function_t) ndr_print_lsa_Delete,
- False,
+ false,
},
{
"lsa_EnumPrivs",
@@ -10399,7 +10399,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivs,
(ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivs,
(ndr_print_function_t) ndr_print_lsa_EnumPrivs,
- False,
+ false,
},
{
"lsa_QuerySecurity",
@@ -10407,7 +10407,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_QuerySecurity,
(ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecurity,
(ndr_print_function_t) ndr_print_lsa_QuerySecurity,
- False,
+ false,
},
{
"lsa_SetSecObj",
@@ -10415,7 +10415,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetSecObj,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecObj,
(ndr_print_function_t) ndr_print_lsa_SetSecObj,
- False,
+ false,
},
{
"lsa_ChangePassword",
@@ -10423,7 +10423,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_ChangePassword,
(ndr_pull_flags_fn_t) ndr_pull_lsa_ChangePassword,
(ndr_print_function_t) ndr_print_lsa_ChangePassword,
- False,
+ false,
},
{
"lsa_OpenPolicy",
@@ -10431,7 +10431,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy,
(ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy,
(ndr_print_function_t) ndr_print_lsa_OpenPolicy,
- False,
+ false,
},
{
"lsa_QueryInfoPolicy",
@@ -10439,7 +10439,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy,
(ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy,
(ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy,
- False,
+ false,
},
{
"lsa_SetInfoPolicy",
@@ -10447,7 +10447,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy,
(ndr_print_function_t) ndr_print_lsa_SetInfoPolicy,
- False,
+ false,
},
{
"lsa_ClearAuditLog",
@@ -10455,7 +10455,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_ClearAuditLog,
(ndr_pull_flags_fn_t) ndr_pull_lsa_ClearAuditLog,
(ndr_print_function_t) ndr_print_lsa_ClearAuditLog,
- False,
+ false,
},
{
"lsa_CreateAccount",
@@ -10463,7 +10463,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CreateAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CreateAccount,
(ndr_print_function_t) ndr_print_lsa_CreateAccount,
- False,
+ false,
},
{
"lsa_EnumAccounts",
@@ -10471,7 +10471,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_EnumAccounts,
(ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccounts,
(ndr_print_function_t) ndr_print_lsa_EnumAccounts,
- False,
+ false,
},
{
"lsa_CreateTrustedDomain",
@@ -10479,7 +10479,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomain,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomain,
(ndr_print_function_t) ndr_print_lsa_CreateTrustedDomain,
- False,
+ false,
},
{
"lsa_EnumTrustDom",
@@ -10487,7 +10487,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustDom,
(ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustDom,
(ndr_print_function_t) ndr_print_lsa_EnumTrustDom,
- False,
+ false,
},
{
"lsa_LookupNames",
@@ -10495,7 +10495,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupNames,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames,
(ndr_print_function_t) ndr_print_lsa_LookupNames,
- False,
+ false,
},
{
"lsa_LookupSids",
@@ -10503,7 +10503,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupSids,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids,
(ndr_print_function_t) ndr_print_lsa_LookupSids,
- False,
+ false,
},
{
"lsa_CreateSecret",
@@ -10511,7 +10511,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CreateSecret,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CreateSecret,
(ndr_print_function_t) ndr_print_lsa_CreateSecret,
- False,
+ false,
},
{
"lsa_OpenAccount",
@@ -10519,7 +10519,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_OpenAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_OpenAccount,
(ndr_print_function_t) ndr_print_lsa_OpenAccount,
- False,
+ false,
},
{
"lsa_EnumPrivsAccount",
@@ -10527,7 +10527,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivsAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivsAccount,
(ndr_print_function_t) ndr_print_lsa_EnumPrivsAccount,
- False,
+ false,
},
{
"lsa_AddPrivilegesToAccount",
@@ -10535,7 +10535,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_AddPrivilegesToAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_AddPrivilegesToAccount,
(ndr_print_function_t) ndr_print_lsa_AddPrivilegesToAccount,
- False,
+ false,
},
{
"lsa_RemovePrivilegesFromAccount",
@@ -10543,7 +10543,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_RemovePrivilegesFromAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_RemovePrivilegesFromAccount,
(ndr_print_function_t) ndr_print_lsa_RemovePrivilegesFromAccount,
- False,
+ false,
},
{
"lsa_GetQuotasForAccount",
@@ -10551,7 +10551,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_GetQuotasForAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_GetQuotasForAccount,
(ndr_print_function_t) ndr_print_lsa_GetQuotasForAccount,
- False,
+ false,
},
{
"lsa_SetQuotasForAccount",
@@ -10559,7 +10559,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetQuotasForAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetQuotasForAccount,
(ndr_print_function_t) ndr_print_lsa_SetQuotasForAccount,
- False,
+ false,
},
{
"lsa_GetSystemAccessAccount",
@@ -10567,7 +10567,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_GetSystemAccessAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_GetSystemAccessAccount,
(ndr_print_function_t) ndr_print_lsa_GetSystemAccessAccount,
- False,
+ false,
},
{
"lsa_SetSystemAccessAccount",
@@ -10575,7 +10575,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetSystemAccessAccount,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetSystemAccessAccount,
(ndr_print_function_t) ndr_print_lsa_SetSystemAccessAccount,
- False,
+ false,
},
{
"lsa_OpenTrustedDomain",
@@ -10583,7 +10583,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomain,
(ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomain,
(ndr_print_function_t) ndr_print_lsa_OpenTrustedDomain,
- False,
+ false,
},
{
"lsa_QueryTrustedDomainInfo",
@@ -10591,7 +10591,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfo,
(ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfo,
(ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfo,
- False,
+ false,
},
{
"lsa_SetInformationTrustedDomain",
@@ -10599,7 +10599,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetInformationTrustedDomain,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetInformationTrustedDomain,
(ndr_print_function_t) ndr_print_lsa_SetInformationTrustedDomain,
- False,
+ false,
},
{
"lsa_OpenSecret",
@@ -10607,7 +10607,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_OpenSecret,
(ndr_pull_flags_fn_t) ndr_pull_lsa_OpenSecret,
(ndr_print_function_t) ndr_print_lsa_OpenSecret,
- False,
+ false,
},
{
"lsa_SetSecret",
@@ -10615,7 +10615,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetSecret,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecret,
(ndr_print_function_t) ndr_print_lsa_SetSecret,
- False,
+ false,
},
{
"lsa_QuerySecret",
@@ -10623,7 +10623,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_QuerySecret,
(ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecret,
(ndr_print_function_t) ndr_print_lsa_QuerySecret,
- False,
+ false,
},
{
"lsa_LookupPrivValue",
@@ -10631,7 +10631,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivValue,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivValue,
(ndr_print_function_t) ndr_print_lsa_LookupPrivValue,
- False,
+ false,
},
{
"lsa_LookupPrivName",
@@ -10639,7 +10639,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivName,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivName,
(ndr_print_function_t) ndr_print_lsa_LookupPrivName,
- False,
+ false,
},
{
"lsa_LookupPrivDisplayName",
@@ -10647,7 +10647,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivDisplayName,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivDisplayName,
(ndr_print_function_t) ndr_print_lsa_LookupPrivDisplayName,
- False,
+ false,
},
{
"lsa_DeleteObject",
@@ -10655,7 +10655,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_DeleteObject,
(ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteObject,
(ndr_print_function_t) ndr_print_lsa_DeleteObject,
- False,
+ false,
},
{
"lsa_EnumAccountsWithUserRight",
@@ -10663,7 +10663,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountsWithUserRight,
(ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountsWithUserRight,
(ndr_print_function_t) ndr_print_lsa_EnumAccountsWithUserRight,
- False,
+ false,
},
{
"lsa_EnumAccountRights",
@@ -10671,7 +10671,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountRights,
(ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountRights,
(ndr_print_function_t) ndr_print_lsa_EnumAccountRights,
- False,
+ false,
},
{
"lsa_AddAccountRights",
@@ -10679,7 +10679,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_AddAccountRights,
(ndr_pull_flags_fn_t) ndr_pull_lsa_AddAccountRights,
(ndr_print_function_t) ndr_print_lsa_AddAccountRights,
- False,
+ false,
},
{
"lsa_RemoveAccountRights",
@@ -10687,7 +10687,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_RemoveAccountRights,
(ndr_pull_flags_fn_t) ndr_pull_lsa_RemoveAccountRights,
(ndr_print_function_t) ndr_print_lsa_RemoveAccountRights,
- False,
+ false,
},
{
"lsa_QueryTrustedDomainInfoBySid",
@@ -10695,7 +10695,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoBySid,
(ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoBySid,
(ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoBySid,
- False,
+ false,
},
{
"lsa_SetTrustedDomainInfo",
@@ -10703,7 +10703,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfo,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfo,
(ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfo,
- False,
+ false,
},
{
"lsa_DeleteTrustedDomain",
@@ -10711,7 +10711,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_DeleteTrustedDomain,
(ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteTrustedDomain,
(ndr_print_function_t) ndr_print_lsa_DeleteTrustedDomain,
- False,
+ false,
},
{
"lsa_StorePrivateData",
@@ -10719,7 +10719,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_StorePrivateData,
(ndr_pull_flags_fn_t) ndr_pull_lsa_StorePrivateData,
(ndr_print_function_t) ndr_print_lsa_StorePrivateData,
- False,
+ false,
},
{
"lsa_RetrievePrivateData",
@@ -10727,7 +10727,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_RetrievePrivateData,
(ndr_pull_flags_fn_t) ndr_pull_lsa_RetrievePrivateData,
(ndr_print_function_t) ndr_print_lsa_RetrievePrivateData,
- False,
+ false,
},
{
"lsa_OpenPolicy2",
@@ -10735,7 +10735,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy2,
(ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy2,
(ndr_print_function_t) ndr_print_lsa_OpenPolicy2,
- False,
+ false,
},
{
"lsa_GetUserName",
@@ -10743,7 +10743,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_GetUserName,
(ndr_pull_flags_fn_t) ndr_pull_lsa_GetUserName,
(ndr_print_function_t) ndr_print_lsa_GetUserName,
- False,
+ false,
},
{
"lsa_QueryInfoPolicy2",
@@ -10751,7 +10751,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy2,
(ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy2,
(ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy2,
- False,
+ false,
},
{
"lsa_SetInfoPolicy2",
@@ -10759,7 +10759,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy2,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy2,
(ndr_print_function_t) ndr_print_lsa_SetInfoPolicy2,
- False,
+ false,
},
{
"lsa_QueryTrustedDomainInfoByName",
@@ -10767,7 +10767,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoByName,
(ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoByName,
(ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoByName,
- False,
+ false,
},
{
"lsa_SetTrustedDomainInfoByName",
@@ -10775,7 +10775,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfoByName,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfoByName,
(ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfoByName,
- False,
+ false,
},
{
"lsa_EnumTrustedDomainsEx",
@@ -10783,7 +10783,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustedDomainsEx,
(ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustedDomainsEx,
(ndr_print_function_t) ndr_print_lsa_EnumTrustedDomainsEx,
- False,
+ false,
},
{
"lsa_CreateTrustedDomainEx",
@@ -10791,7 +10791,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx,
(ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx,
- False,
+ false,
},
{
"lsa_CloseTrustedDomainEx",
@@ -10799,7 +10799,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CloseTrustedDomainEx,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CloseTrustedDomainEx,
(ndr_print_function_t) ndr_print_lsa_CloseTrustedDomainEx,
- False,
+ false,
},
{
"lsa_QueryDomainInformationPolicy",
@@ -10807,7 +10807,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_QueryDomainInformationPolicy,
(ndr_pull_flags_fn_t) ndr_pull_lsa_QueryDomainInformationPolicy,
(ndr_print_function_t) ndr_print_lsa_QueryDomainInformationPolicy,
- False,
+ false,
},
{
"lsa_SetDomainInformationPolicy",
@@ -10815,7 +10815,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_SetDomainInformationPolicy,
(ndr_pull_flags_fn_t) ndr_pull_lsa_SetDomainInformationPolicy,
(ndr_print_function_t) ndr_print_lsa_SetDomainInformationPolicy,
- False,
+ false,
},
{
"lsa_OpenTrustedDomainByName",
@@ -10823,7 +10823,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomainByName,
(ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomainByName,
(ndr_print_function_t) ndr_print_lsa_OpenTrustedDomainByName,
- False,
+ false,
},
{
"lsa_TestCall",
@@ -10831,7 +10831,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_TestCall,
(ndr_pull_flags_fn_t) ndr_pull_lsa_TestCall,
(ndr_print_function_t) ndr_print_lsa_TestCall,
- False,
+ false,
},
{
"lsa_LookupSids2",
@@ -10839,7 +10839,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupSids2,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids2,
(ndr_print_function_t) ndr_print_lsa_LookupSids2,
- False,
+ false,
},
{
"lsa_LookupNames2",
@@ -10847,7 +10847,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupNames2,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames2,
(ndr_print_function_t) ndr_print_lsa_LookupNames2,
- False,
+ false,
},
{
"lsa_CreateTrustedDomainEx2",
@@ -10855,7 +10855,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx2,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx2,
(ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx2,
- False,
+ false,
},
{
"lsa_CREDRWRITE",
@@ -10863,7 +10863,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITE,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITE,
(ndr_print_function_t) ndr_print_lsa_CREDRWRITE,
- False,
+ false,
},
{
"lsa_CREDRREAD",
@@ -10871,7 +10871,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRREAD,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREAD,
(ndr_print_function_t) ndr_print_lsa_CREDRREAD,
- False,
+ false,
},
{
"lsa_CREDRENUMERATE",
@@ -10879,7 +10879,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRENUMERATE,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRENUMERATE,
(ndr_print_function_t) ndr_print_lsa_CREDRENUMERATE,
- False,
+ false,
},
{
"lsa_CREDRWRITEDOMAINCREDENTIALS",
@@ -10887,7 +10887,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS,
(ndr_print_function_t) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS,
- False,
+ false,
},
{
"lsa_CREDRREADDOMAINCREDENTIALS",
@@ -10895,7 +10895,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS,
(ndr_print_function_t) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS,
- False,
+ false,
},
{
"lsa_CREDRDELETE",
@@ -10903,7 +10903,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRDELETE,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRDELETE,
(ndr_print_function_t) ndr_print_lsa_CREDRDELETE,
- False,
+ false,
},
{
"lsa_CREDRGETTARGETINFO",
@@ -10911,7 +10911,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETTARGETINFO,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETTARGETINFO,
(ndr_print_function_t) ndr_print_lsa_CREDRGETTARGETINFO,
- False,
+ false,
},
{
"lsa_CREDRPROFILELOADED",
@@ -10919,7 +10919,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRPROFILELOADED,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRPROFILELOADED,
(ndr_print_function_t) ndr_print_lsa_CREDRPROFILELOADED,
- False,
+ false,
},
{
"lsa_LookupNames3",
@@ -10927,7 +10927,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupNames3,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames3,
(ndr_print_function_t) ndr_print_lsa_LookupNames3,
- False,
+ false,
},
{
"lsa_CREDRGETSESSIONTYPES",
@@ -10935,7 +10935,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETSESSIONTYPES,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETSESSIONTYPES,
(ndr_print_function_t) ndr_print_lsa_CREDRGETSESSIONTYPES,
- False,
+ false,
},
{
"lsa_LSARREGISTERAUDITEVENT",
@@ -10943,7 +10943,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSARREGISTERAUDITEVENT,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSARREGISTERAUDITEVENT,
(ndr_print_function_t) ndr_print_lsa_LSARREGISTERAUDITEVENT,
- False,
+ false,
},
{
"lsa_LSARGENAUDITEVENT",
@@ -10951,7 +10951,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSARGENAUDITEVENT,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSARGENAUDITEVENT,
(ndr_print_function_t) ndr_print_lsa_LSARGENAUDITEVENT,
- False,
+ false,
},
{
"lsa_LSARUNREGISTERAUDITEVENT",
@@ -10959,7 +10959,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSARUNREGISTERAUDITEVENT,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT,
(ndr_print_function_t) ndr_print_lsa_LSARUNREGISTERAUDITEVENT,
- False,
+ false,
},
{
"lsa_LSARQUERYFORESTTRUSTINFORMATION",
@@ -10967,7 +10967,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION,
(ndr_print_function_t) ndr_print_lsa_LSARQUERYFORESTTRUSTINFORMATION,
- False,
+ false,
},
{
"lsa_LSARSETFORESTTRUSTINFORMATION",
@@ -10975,7 +10975,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION,
(ndr_print_function_t) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION,
- False,
+ false,
},
{
"lsa_CREDRRENAME",
@@ -10983,7 +10983,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_CREDRRENAME,
(ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRRENAME,
(ndr_print_function_t) ndr_print_lsa_CREDRRENAME,
- False,
+ false,
},
{
"lsa_LookupSids3",
@@ -10991,7 +10991,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupSids3,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids3,
(ndr_print_function_t) ndr_print_lsa_LookupSids3,
- False,
+ false,
},
{
"lsa_LookupNames4",
@@ -10999,7 +10999,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LookupNames4,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames4,
(ndr_print_function_t) ndr_print_lsa_LookupNames4,
- False,
+ false,
},
{
"lsa_LSAROPENPOLICYSCE",
@@ -11007,7 +11007,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSAROPENPOLICYSCE,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSAROPENPOLICYSCE,
(ndr_print_function_t) ndr_print_lsa_LSAROPENPOLICYSCE,
- False,
+ false,
},
{
"lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
@@ -11015,7 +11015,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
(ndr_print_function_t) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
- False,
+ false,
},
{
"lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
@@ -11023,7 +11023,7 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
(ndr_print_function_t) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
- False,
+ false,
},
{
"lsa_LSARADTREPORTSECURITYEVENT",
@@ -11031,12 +11031,12 @@ const struct ndr_interface_call lsarpc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREPORTSECURITYEVENT,
(ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT,
(ndr_print_function_t) ndr_print_lsa_LSARADTREPORTSECURITYEVENT,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const lsarpc_endpoint_strings[] = {
+static const char * const lsarpc_endpoint_strings[] = {
"ncacn_np:[\\pipe\\lsarpc]",
"ncacn_np:[\\pipe\\netlogon]",
"ncacn_np:[\\pipe\\lsass]",
@@ -11044,16 +11044,16 @@ const char * const lsarpc_endpoint_strings[] = {
"ncalrpc:",
};
-const struct ndr_interface_string_array lsarpc_endpoints = {
+static const struct ndr_interface_string_array lsarpc_endpoints = {
.count = 5,
.names = lsarpc_endpoint_strings
};
-const char * const lsarpc_authservice_strings[] = {
+static const char * const lsarpc_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array lsarpc_authservices = {
+static const struct ndr_interface_string_array lsarpc_authservices = {
.count = 5,
.names = lsarpc_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_netlogon.c b/source/librpc/gen_ndr/ndr_netlogon.c
index 06e202714ae..116afd17f84 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.c
+++ b/source/librpc/gen_ndr/ndr_netlogon.c
@@ -6,7 +6,7 @@
#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "librpc/gen_ndr/ndr_security.h"
-NTSTATUS ndr_push_netr_UasInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasInfo *r)
+static NTSTATUS ndr_push_netr_UasInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -56,7 +56,7 @@ NTSTATUS ndr_push_netr_UasInfo(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_UasInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasInfo *r)
+static NTSTATUS ndr_pull_netr_UasInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasInfo *r)
{
uint32_t _ptr_account_name;
TALLOC_CTX *_mem_save_account_name_0;
@@ -201,7 +201,7 @@ _PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, co
ndr->depth--;
}
-NTSTATUS ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasLogoffInfo *r)
+static NTSTATUS ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasLogoffInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -213,7 +213,7 @@ NTSTATUS ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_UasLogoffInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasLogoffInfo *r)
+static NTSTATUS ndr_pull_netr_UasLogoffInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasLogoffInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -234,7 +234,7 @@ _PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const struct netr_AcctLockStr *r)
+static NTSTATUS ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const struct netr_AcctLockStr *r)
{
uint32_t cntr_bindata_1;
if (ndr_flags & NDR_SCALARS) {
@@ -256,7 +256,7 @@ NTSTATUS ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct netr_AcctLockStr *r)
+static NTSTATUS ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct netr_AcctLockStr *r)
{
uint32_t _ptr_bindata;
uint32_t cntr_bindata_1;
@@ -327,7 +327,7 @@ _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_netr_IdentityInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_IdentityInfo *r)
+static NTSTATUS ndr_push_netr_IdentityInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_IdentityInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -346,7 +346,7 @@ NTSTATUS ndr_push_netr_IdentityInfo(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_IdentityInfo *r)
+static NTSTATUS ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_IdentityInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -378,7 +378,7 @@ _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordInfo *r)
+static NTSTATUS ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -394,7 +394,7 @@ NTSTATUS ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordInfo *r)
+static NTSTATUS ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -420,7 +420,7 @@ _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, int ndr_flags, const struct netr_ChallengeResponse *r)
+static NTSTATUS ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, int ndr_flags, const struct netr_ChallengeResponse *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -444,7 +444,7 @@ NTSTATUS ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_ChallengeResponse(struct ndr_pull *ndr, int ndr_flags, struct netr_ChallengeResponse *r)
+static NTSTATUS ndr_pull_netr_ChallengeResponse(struct ndr_pull *ndr, int ndr_flags, struct netr_ChallengeResponse *r)
{
uint32_t _ptr_data;
TALLOC_CTX *_mem_save_data_0;
@@ -507,7 +507,7 @@ _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char
}
}
-NTSTATUS ndr_push_netr_NetworkInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_NetworkInfo *r)
+static NTSTATUS ndr_push_netr_NetworkInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_NetworkInfo *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -529,7 +529,7 @@ NTSTATUS ndr_push_netr_NetworkInfo(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NetworkInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_NetworkInfo *r)
+static NTSTATUS ndr_pull_netr_NetworkInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_NetworkInfo *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -968,7 +968,7 @@ _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_SamBaseInfo *r)
+static NTSTATUS ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_SamBaseInfo *r)
{
uint32_t cntr_unknown_0;
if (ndr_flags & NDR_SCALARS) {
@@ -1018,7 +1018,7 @@ NTSTATUS ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_SamBaseInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_SamBaseInfo *r)
+static NTSTATUS ndr_pull_netr_SamBaseInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_SamBaseInfo *r)
{
uint32_t _ptr_domain_sid;
TALLOC_CTX *_mem_save_domain_sid_0;
@@ -1126,7 +1126,7 @@ _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_netr_SamInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo2 *r)
+static NTSTATUS ndr_push_netr_SamInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1138,7 +1138,7 @@ NTSTATUS ndr_push_netr_SamInfo2(struct ndr_push *ndr, int ndr_flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_SamInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo2 *r)
+static NTSTATUS ndr_pull_netr_SamInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1158,7 +1158,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_netr_SidAttr(struct ndr_push *ndr, int ndr_flags, const struct netr_SidAttr *r)
+static NTSTATUS ndr_push_netr_SidAttr(struct ndr_push *ndr, int ndr_flags, const struct netr_SidAttr *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1173,7 +1173,7 @@ NTSTATUS ndr_push_netr_SidAttr(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_SidAttr(struct ndr_pull *ndr, int ndr_flags, struct netr_SidAttr *r)
+static NTSTATUS ndr_pull_netr_SidAttr(struct ndr_pull *ndr, int ndr_flags, struct netr_SidAttr *r)
{
uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
@@ -1304,7 +1304,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo6 *r)
+static NTSTATUS ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo6 *r)
{
uint32_t cntr_sids_1;
uint32_t cntr_unknown4_0;
@@ -1336,7 +1336,7 @@ NTSTATUS ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo6 *r)
+static NTSTATUS ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo6 *r)
{
uint32_t _ptr_sids;
uint32_t cntr_sids_1;
@@ -1426,7 +1426,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_netr_PacInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PacInfo *r)
+static NTSTATUS ndr_push_netr_PacInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PacInfo *r)
{
uint32_t cntr_expansionroom_0;
if (ndr_flags & NDR_SCALARS) {
@@ -1467,7 +1467,7 @@ NTSTATUS ndr_push_netr_PacInfo(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_PacInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PacInfo *r)
+static NTSTATUS ndr_pull_netr_PacInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PacInfo *r)
{
uint32_t _ptr_pac;
TALLOC_CTX *_mem_save_pac_0;
@@ -1904,7 +1904,7 @@ _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_USER *r)
+static NTSTATUS ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_USER *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1933,7 +1933,7 @@ NTSTATUS ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_USER *r)
+static NTSTATUS ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_USER *r)
{
uint32_t _ptr_account_name;
TALLOC_CTX *_mem_save_account_name_0;
@@ -1996,7 +1996,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY16 *r)
+static NTSTATUS ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY16 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2011,7 +2011,7 @@ NTSTATUS ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY16 *r)
+static NTSTATUS ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY16 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2037,7 +2037,7 @@ _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_PasswordHistory(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordHistory *r)
+static NTSTATUS ndr_push_netr_PasswordHistory(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordHistory *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2055,7 +2055,7 @@ NTSTATUS ndr_push_netr_PasswordHistory(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_PasswordHistory(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordHistory *r)
+static NTSTATUS ndr_pull_netr_PasswordHistory(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordHistory *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2090,7 +2090,7 @@ _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS2 *r)
+static NTSTATUS ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2105,7 +2105,7 @@ NTSTATUS ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS2 *r)
+static NTSTATUS ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2130,7 +2130,7 @@ _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY_UNION *r)
+static NTSTATUS ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY_UNION *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2142,7 +2142,7 @@ NTSTATUS ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY_UNION *r)
+static NTSTATUS ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY_UNION *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2197,7 +2197,7 @@ _PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_PRIVATE_INFO *r)
+static NTSTATUS ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_PRIVATE_INFO *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2224,7 +2224,7 @@ NTSTATUS ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_PRIVATE_INFO *r)
+static NTSTATUS ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_PRIVATE_INFO *r)
{
uint32_t _ptr_SensitiveData;
TALLOC_CTX *_mem_save_SensitiveData_0;
@@ -2280,7 +2280,7 @@ _PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_USER *r)
+static NTSTATUS ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_USER *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2345,7 +2345,7 @@ NTSTATUS ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_USER *r)
+static NTSTATUS ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_USER *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2454,7 +2454,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DOMAIN *r)
+static NTSTATUS ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DOMAIN *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2490,7 +2490,7 @@ NTSTATUS ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DOMAIN *r)
+static NTSTATUS ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DOMAIN *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2552,7 +2552,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP *r)
+static NTSTATUS ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2583,7 +2583,7 @@ NTSTATUS ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_GROUP(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP *r)
+static NTSTATUS ndr_pull_netr_DELTA_GROUP(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2635,7 +2635,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_RENAME *r)
+static NTSTATUS ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_RENAME *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2661,7 +2661,7 @@ NTSTATUS ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_RENAME(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_RENAME *r)
+static NTSTATUS ndr_pull_netr_DELTA_RENAME(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_RENAME *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2704,7 +2704,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP_MEMBER *r)
+static NTSTATUS ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP_MEMBER *r)
{
uint32_t cntr_rids_1;
uint32_t cntr_attribs_1;
@@ -2735,7 +2735,7 @@ NTSTATUS ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP_MEMBER *r)
+static NTSTATUS ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP_MEMBER *r)
{
uint32_t _ptr_rids;
uint32_t cntr_rids_1;
@@ -2848,7 +2848,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS *r)
+static NTSTATUS ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2876,7 +2876,7 @@ NTSTATUS ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_ALIAS(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS *r)
+static NTSTATUS ndr_pull_netr_DELTA_ALIAS(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2923,7 +2923,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS_MEMBER *r)
+static NTSTATUS ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS_MEMBER *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2939,7 +2939,7 @@ NTSTATUS ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS_MEMBER *r)
+static NTSTATUS ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS_MEMBER *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2967,7 +2967,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, int ndr_flags, const struct netr_QUOTA_LIMITS *r)
+static NTSTATUS ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, int ndr_flags, const struct netr_QUOTA_LIMITS *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2983,7 +2983,7 @@ NTSTATUS ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull *ndr, int ndr_flags, struct netr_QUOTA_LIMITS *r)
+static NTSTATUS ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull *ndr, int ndr_flags, struct netr_QUOTA_LIMITS *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -3012,7 +3012,7 @@ _PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_POLICY *r)
+static NTSTATUS ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_POLICY *r)
{
uint32_t cntr_eventauditoptions_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3058,7 +3058,7 @@ NTSTATUS ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_POLICY *r)
+static NTSTATUS ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_POLICY *r)
{
uint32_t _ptr_eventauditoptions;
uint32_t cntr_eventauditoptions_1;
@@ -3180,7 +3180,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_TRUSTED_DOMAIN *r)
+static NTSTATUS ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_TRUSTED_DOMAIN *r)
{
uint32_t cntr_controller_names_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3219,7 +3219,7 @@ NTSTATUS ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_TRUSTED_DOMAIN *r)
+static NTSTATUS ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_TRUSTED_DOMAIN *r)
{
uint32_t _ptr_controller_names;
uint32_t cntr_controller_names_1;
@@ -3312,7 +3312,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_DELETE_TRUST(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_TRUST *r)
+static NTSTATUS ndr_push_netr_DELTA_DELETE_TRUST(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_TRUST *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -3323,7 +3323,7 @@ NTSTATUS ndr_push_netr_DELTA_DELETE_TRUST(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_DELETE_TRUST(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_TRUST *r)
+static NTSTATUS ndr_pull_netr_DELTA_DELETE_TRUST(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_TRUST *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -3342,7 +3342,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_DELETE_TRUST(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ACCOUNT *r)
+static NTSTATUS ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ACCOUNT *r)
{
uint32_t cntr_privilege_attrib_1;
uint32_t cntr_privilege_name_1;
@@ -3390,7 +3390,7 @@ NTSTATUS ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ACCOUNT *r)
+static NTSTATUS ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ACCOUNT *r)
{
uint32_t _ptr_privilege_attrib;
uint32_t cntr_privilege_attrib_1;
@@ -3529,7 +3529,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_DELETE_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_ACCOUNT *r)
+static NTSTATUS ndr_push_netr_DELTA_DELETE_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_ACCOUNT *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -3540,7 +3540,7 @@ NTSTATUS ndr_push_netr_DELTA_DELETE_ACCOUNT(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_DELETE_ACCOUNT(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_ACCOUNT *r)
+static NTSTATUS ndr_pull_netr_DELTA_DELETE_ACCOUNT(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_ACCOUNT *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -3559,7 +3559,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_DELETE_ACCOUNT(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_DELETE_SECRET(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_SECRET *r)
+static NTSTATUS ndr_push_netr_DELTA_DELETE_SECRET(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_SECRET *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 2));
@@ -3570,7 +3570,7 @@ NTSTATUS ndr_push_netr_DELTA_DELETE_SECRET(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_DELETE_SECRET(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_SECRET *r)
+static NTSTATUS ndr_pull_netr_DELTA_DELETE_SECRET(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_SECRET *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 2));
@@ -3589,7 +3589,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_DELETE_SECRET(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, int ndr_flags, const struct netr_CIPHER_VALUE *r)
+static NTSTATUS ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, int ndr_flags, const struct netr_CIPHER_VALUE *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3608,7 +3608,7 @@ NTSTATUS ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_CIPHER_VALUE(struct ndr_pull *ndr, int ndr_flags, struct netr_CIPHER_VALUE *r)
+static NTSTATUS ndr_pull_netr_CIPHER_VALUE(struct ndr_pull *ndr, int ndr_flags, struct netr_CIPHER_VALUE *r)
{
uint32_t _ptr_cipher_data;
TALLOC_CTX *_mem_save_cipher_data_0;
@@ -3661,7 +3661,7 @@ _PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_SECRET *r)
+static NTSTATUS ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_SECRET *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3692,7 +3692,7 @@ NTSTATUS ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_SECRET(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_SECRET *r)
+static NTSTATUS ndr_pull_netr_DELTA_SECRET(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_SECRET *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -3744,13 +3744,13 @@ _PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DeltaEnum(struct ndr_push *ndr, int ndr_flags, enum netr_DeltaEnum r)
+static NTSTATUS ndr_push_netr_DeltaEnum(struct ndr_push *ndr, int ndr_flags, enum netr_DeltaEnum r)
{
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DeltaEnum(struct ndr_pull *ndr, int ndr_flags, enum netr_DeltaEnum *r)
+static NTSTATUS ndr_pull_netr_DeltaEnum(struct ndr_pull *ndr, int ndr_flags, enum netr_DeltaEnum *r)
{
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
@@ -3789,7 +3789,7 @@ _PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name,
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_UNION *r)
+static NTSTATUS ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_UNION *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -4008,7 +4008,7 @@ NTSTATUS ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, int ndr_flags, const un
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_UNION *r)
+static NTSTATUS ndr_pull_netr_DELTA_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_UNION *r)
{
int level;
uint16_t _level;
@@ -4567,7 +4567,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name
}
}
-NTSTATUS ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_ID_UNION *r)
+static NTSTATUS ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_ID_UNION *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -4767,7 +4767,7 @@ NTSTATUS ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_ID_UNION *r)
+static NTSTATUS ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_ID_UNION *r)
{
int level;
uint16_t _level;
@@ -5175,7 +5175,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *n
}
}
-NTSTATUS ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM *r)
+static NTSTATUS ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -5192,7 +5192,7 @@ NTSTATUS ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_ENUM(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM *r)
+static NTSTATUS ndr_pull_netr_DELTA_ENUM(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -5221,7 +5221,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM_ARRAY *r)
+static NTSTATUS ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM_ARRAY *r)
{
uint32_t cntr_delta_enum_1;
if (ndr_flags & NDR_SCALARS) {
@@ -5243,7 +5243,7 @@ NTSTATUS ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM_ARRAY *r)
+static NTSTATUS ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM_ARRAY *r)
{
uint32_t _ptr_delta_enum;
uint32_t cntr_delta_enum_1;
@@ -5308,7 +5308,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, int ndr_flags, const struct netr_UAS_INFO_0 *r)
+static NTSTATUS ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, int ndr_flags, const struct netr_UAS_INFO_0 *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -5326,7 +5326,7 @@ NTSTATUS ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_UAS_INFO_0(struct ndr_pull *ndr, int ndr_flags, struct netr_UAS_INFO_0 *r)
+static NTSTATUS ndr_pull_netr_UAS_INFO_0(struct ndr_pull *ndr, int ndr_flags, struct netr_UAS_INFO_0 *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -5359,7 +5359,7 @@ _PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name,
}
}
-NTSTATUS ndr_push_netr_AccountBuffer(struct ndr_push *ndr, int ndr_flags, const struct netr_AccountBuffer *r)
+static NTSTATUS ndr_push_netr_AccountBuffer(struct ndr_push *ndr, int ndr_flags, const struct netr_AccountBuffer *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -5375,7 +5375,7 @@ NTSTATUS ndr_push_netr_AccountBuffer(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_AccountBuffer(struct ndr_pull *ndr, int ndr_flags, struct netr_AccountBuffer *r)
+static NTSTATUS ndr_pull_netr_AccountBuffer(struct ndr_pull *ndr, int ndr_flags, struct netr_AccountBuffer *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -5399,7 +5399,7 @@ _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_1 *r)
+static NTSTATUS ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -5411,7 +5411,7 @@ NTSTATUS ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_1 *r)
+static NTSTATUS ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -5432,7 +5432,7 @@ _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_2 *r)
+static NTSTATUS ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -5449,7 +5449,7 @@ NTSTATUS ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_2 *r)
+static NTSTATUS ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -5480,7 +5480,7 @@ _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_3 *r)
+static NTSTATUS ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_3 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -5497,7 +5497,7 @@ NTSTATUS ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_3 *r)
+static NTSTATUS ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_3 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -5528,7 +5528,7 @@ _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_QUERY_INFORMATION *r)
+static NTSTATUS ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_QUERY_INFORMATION *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -5578,7 +5578,7 @@ NTSTATUS ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push *ndr, int ndr_f
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_QUERY_INFORMATION *r)
+static NTSTATUS ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_QUERY_INFORMATION *r)
{
int level;
uint32_t _level;
@@ -5700,13 +5700,13 @@ _PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, co
}
}
-NTSTATUS ndr_push_netr_LogonControlCode(struct ndr_push *ndr, int ndr_flags, enum netr_LogonControlCode r)
+static NTSTATUS ndr_push_netr_LogonControlCode(struct ndr_push *ndr, int ndr_flags, enum netr_LogonControlCode r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonControlCode(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonControlCode *r)
+static NTSTATUS ndr_pull_netr_LogonControlCode(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonControlCode *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -5727,7 +5727,7 @@ _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_DATA_INFORMATION *r)
+static NTSTATUS ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_DATA_INFORMATION *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -5793,7 +5793,7 @@ NTSTATUS ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push *ndr, int ndr_fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_DATA_INFORMATION *r)
+static NTSTATUS ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_DATA_INFORMATION *r)
{
int level;
uint32_t _level;
@@ -5942,7 +5942,7 @@ _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, con
}
}
-NTSTATUS ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r)
+static NTSTATUS ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -5998,7 +5998,7 @@ NTSTATUS ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r)
+static NTSTATUS ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r)
{
uint32_t _ptr_dc_unc;
TALLOC_CTX *_mem_save_dc_unc_0;
@@ -6178,7 +6178,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r)
+static NTSTATUS ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -6194,7 +6194,7 @@ NTSTATUS ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct ne
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_Blob(struct ndr_pull *ndr, int ndr_flags, struct netr_Blob *r)
+static NTSTATUS ndr_pull_netr_Blob(struct ndr_pull *ndr, int ndr_flags, struct netr_Blob *r)
{
uint32_t _ptr_data;
TALLOC_CTX *_mem_save_data_0;
@@ -6238,7 +6238,7 @@ _PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const
ndr->depth--;
}
-NTSTATUS ndr_push_netr_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct netr_BinaryString *r)
+static NTSTATUS ndr_push_netr_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct netr_BinaryString *r)
{
uint32_t cntr_data_1;
{
@@ -6265,7 +6265,7 @@ NTSTATUS ndr_push_netr_BinaryString(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct netr_BinaryString *r)
+static NTSTATUS ndr_pull_netr_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct netr_BinaryString *r)
{
uint32_t _ptr_data;
uint32_t cntr_data_1;
@@ -6346,7 +6346,7 @@ _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *nam
}
}
-NTSTATUS ndr_push_netr_DomainQuery1(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainQuery1 *r)
+static NTSTATUS ndr_push_netr_DomainQuery1(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainQuery1 *r)
{
uint32_t cntr_unknown7_0;
if (ndr_flags & NDR_SCALARS) {
@@ -6412,7 +6412,7 @@ NTSTATUS ndr_push_netr_DomainQuery1(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DomainQuery1(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainQuery1 *r)
+static NTSTATUS ndr_pull_netr_DomainQuery1(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainQuery1 *r)
{
uint32_t _ptr_workstation_domain;
TALLOC_CTX *_mem_save_workstation_domain_0;
@@ -6616,7 +6616,7 @@ _PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DomainQuery(struct ndr_push *ndr, int ndr_flags, const union netr_DomainQuery *r)
+static NTSTATUS ndr_push_netr_DomainQuery(struct ndr_push *ndr, int ndr_flags, const union netr_DomainQuery *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -6656,7 +6656,7 @@ NTSTATUS ndr_push_netr_DomainQuery(struct ndr_push *ndr, int ndr_flags, const un
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DomainQuery(struct ndr_pull *ndr, int ndr_flags, union netr_DomainQuery *r)
+static NTSTATUS ndr_pull_netr_DomainQuery(struct ndr_pull *ndr, int ndr_flags, union netr_DomainQuery *r)
{
int level;
uint32_t _level;
@@ -6748,7 +6748,7 @@ _PUBLIC_ void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name
}
}
-NTSTATUS ndr_push_netr_DomainTrustInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrustInfo *r)
+static NTSTATUS ndr_push_netr_DomainTrustInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrustInfo *r)
{
uint32_t cntr_unknown1_0;
uint32_t cntr_unknown_0;
@@ -6781,7 +6781,7 @@ NTSTATUS ndr_push_netr_DomainTrustInfo(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrustInfo *r)
+static NTSTATUS ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrustInfo *r)
{
uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
@@ -6865,7 +6865,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DomainInfo1(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainInfo1 *r)
+static NTSTATUS ndr_push_netr_DomainInfo1(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainInfo1 *r)
{
uint32_t cntr_trusts_1;
uint32_t cntr_unknown_0;
@@ -6893,7 +6893,7 @@ NTSTATUS ndr_push_netr_DomainInfo1(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainInfo1 *r)
+static NTSTATUS ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainInfo1 *r)
{
uint32_t _ptr_trusts;
uint32_t cntr_trusts_1;
@@ -6977,7 +6977,7 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union netr_DomainInfo *r)
+static NTSTATUS ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union netr_DomainInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -7017,7 +7017,7 @@ NTSTATUS ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const uni
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union netr_DomainInfo *r)
+static NTSTATUS ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union netr_DomainInfo *r)
{
int level;
uint32_t _level;
@@ -7109,7 +7109,7 @@ _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name,
}
}
-NTSTATUS ndr_push_netr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct netr_CryptPassword *r)
+static NTSTATUS ndr_push_netr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct netr_CryptPassword *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -7126,7 +7126,7 @@ NTSTATUS ndr_push_netr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct netr_CryptPassword *r)
+static NTSTATUS ndr_pull_netr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct netr_CryptPassword *r)
{
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -7157,13 +7157,13 @@ _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *na
}
}
-NTSTATUS ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+static NTSTATUS ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_TrustFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+static NTSTATUS ndr_pull_netr_TrustFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -7184,13 +7184,13 @@ _PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_TrustType(struct ndr_push *ndr, int ndr_flags, enum netr_TrustType r)
+static NTSTATUS ndr_push_netr_TrustType(struct ndr_push *ndr, int ndr_flags, enum netr_TrustType r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_TrustType(struct ndr_pull *ndr, int ndr_flags, enum netr_TrustType *r)
+static NTSTATUS ndr_pull_netr_TrustType(struct ndr_pull *ndr, int ndr_flags, enum netr_TrustType *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -7211,13 +7211,13 @@ _PUBLIC_ void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name,
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_netr_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+static NTSTATUS ndr_push_netr_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+static NTSTATUS ndr_pull_netr_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -7239,7 +7239,7 @@ _PUBLIC_ void ndr_print_netr_TrustAttributes(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DomainTrust(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrust *r)
+static NTSTATUS ndr_push_netr_DomainTrust(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrust *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7273,7 +7273,7 @@ NTSTATUS ndr_push_netr_DomainTrust(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DomainTrust(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrust *r)
+static NTSTATUS ndr_pull_netr_DomainTrust(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrust *r)
{
uint32_t _ptr_netbios_name;
TALLOC_CTX *_mem_save_netbios_name_0;
@@ -7373,7 +7373,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogon *r)
+static NTSTATUS ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogon *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -7402,7 +7402,7 @@ NTSTATUS ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonUasLogon(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogon *r)
+static NTSTATUS ndr_pull_netr_LogonUasLogon(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogon *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_info;
@@ -7497,7 +7497,7 @@ _PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonUasLogoff(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogoff *r)
+static NTSTATUS ndr_push_netr_LogonUasLogoff(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogoff *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -7524,7 +7524,7 @@ NTSTATUS ndr_push_netr_LogonUasLogoff(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonUasLogoff(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogoff *r)
+static NTSTATUS ndr_pull_netr_LogonUasLogoff(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogoff *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -7613,7 +7613,7 @@ _PUBLIC_ void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogon *r)
+static NTSTATUS ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogon *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -7658,7 +7658,7 @@ NTSTATUS ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogon *r)
+static NTSTATUS ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogon *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_computer_name;
@@ -7839,7 +7839,7 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogoff *r)
+static NTSTATUS ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogoff *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -7878,7 +7878,7 @@ NTSTATUS ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogoff *r)
+static NTSTATUS ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogoff *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_computer_name;
@@ -8027,7 +8027,7 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr, int flags, const struct netr_ServerReqChallenge *r)
+static NTSTATUS ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr, int flags, const struct netr_ServerReqChallenge *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -8052,7 +8052,7 @@ NTSTATUS ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr, int flags, struct netr_ServerReqChallenge *r)
+static NTSTATUS ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr, int flags, struct netr_ServerReqChallenge *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -8144,7 +8144,7 @@ _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate *r)
+static NTSTATUS ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -8174,7 +8174,7 @@ NTSTATUS ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate *r)
+static NTSTATUS ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -8276,7 +8276,7 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordSet *r)
+static NTSTATUS ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordSet *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -8306,7 +8306,7 @@ NTSTATUS ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordSet *r)
+static NTSTATUS ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordSet *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -8401,7 +8401,7 @@ _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int flags, const struct netr_DatabaseDeltas *r)
+static NTSTATUS ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int flags, const struct netr_DatabaseDeltas *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
@@ -8434,7 +8434,7 @@ NTSTATUS ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int flags, struct netr_DatabaseDeltas *r)
+static NTSTATUS ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int flags, struct netr_DatabaseDeltas *r)
{
uint32_t _ptr_delta_enum_array;
TALLOC_CTX *_mem_save_return_authenticator_0;
@@ -8559,7 +8559,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DatabaseSync(struct ndr_push *ndr, int flags, const struct netr_DatabaseSync *r)
+static NTSTATUS ndr_push_netr_DatabaseSync(struct ndr_push *ndr, int flags, const struct netr_DatabaseSync *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
@@ -8592,7 +8592,7 @@ NTSTATUS ndr_push_netr_DatabaseSync(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync *r)
+static NTSTATUS ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync *r)
{
uint32_t _ptr_delta_enum_array;
TALLOC_CTX *_mem_save_return_authenticator_0;
@@ -8717,7 +8717,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_AccountDeltas(struct ndr_push *ndr, int flags, const struct netr_AccountDeltas *r)
+static NTSTATUS ndr_push_netr_AccountDeltas(struct ndr_push *ndr, int flags, const struct netr_AccountDeltas *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
@@ -8760,7 +8760,7 @@ NTSTATUS ndr_push_netr_AccountDeltas(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_AccountDeltas(struct ndr_pull *ndr, int flags, struct netr_AccountDeltas *r)
+static NTSTATUS ndr_pull_netr_AccountDeltas(struct ndr_pull *ndr, int flags, struct netr_AccountDeltas *r)
{
uint32_t _ptr_logon_server;
TALLOC_CTX *_mem_save_logon_server_0;
@@ -8923,7 +8923,7 @@ _PUBLIC_ void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_AccountSync(struct ndr_push *ndr, int flags, const struct netr_AccountSync *r)
+static NTSTATUS ndr_push_netr_AccountSync(struct ndr_push *ndr, int flags, const struct netr_AccountSync *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
@@ -8969,7 +8969,7 @@ NTSTATUS ndr_push_netr_AccountSync(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_AccountSync(struct ndr_pull *ndr, int flags, struct netr_AccountSync *r)
+static NTSTATUS ndr_pull_netr_AccountSync(struct ndr_pull *ndr, int flags, struct netr_AccountSync *r)
{
uint32_t _ptr_logon_server;
TALLOC_CTX *_mem_save_logon_server_0;
@@ -9155,7 +9155,7 @@ _PUBLIC_ void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_netr_GetDcName(struct ndr_push *ndr, int flags, const struct netr_GetDcName *r)
+static NTSTATUS ndr_push_netr_GetDcName(struct ndr_push *ndr, int flags, const struct netr_GetDcName *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
@@ -9183,7 +9183,7 @@ NTSTATUS ndr_push_netr_GetDcName(struct ndr_push *ndr, int flags, const struct n
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_GetDcName(struct ndr_pull *ndr, int flags, struct netr_GetDcName *r)
+static NTSTATUS ndr_pull_netr_GetDcName(struct ndr_pull *ndr, int flags, struct netr_GetDcName *r)
{
uint32_t _ptr_domainname;
uint32_t _ptr_dcname;
@@ -9275,7 +9275,7 @@ _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonControl(struct ndr_push *ndr, int flags, const struct netr_LogonControl *r)
+static NTSTATUS ndr_push_netr_LogonControl(struct ndr_push *ndr, int flags, const struct netr_LogonControl *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
@@ -9297,7 +9297,7 @@ NTSTATUS ndr_push_netr_LogonControl(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonControl(struct ndr_pull *ndr, int flags, struct netr_LogonControl *r)
+static NTSTATUS ndr_pull_netr_LogonControl(struct ndr_pull *ndr, int flags, struct netr_LogonControl *r)
{
uint32_t _ptr_logon_server;
TALLOC_CTX *_mem_save_logon_server_0;
@@ -9376,7 +9376,7 @@ _PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_GetAnyDCName(struct ndr_push *ndr, int flags, const struct netr_GetAnyDCName *r)
+static NTSTATUS ndr_push_netr_GetAnyDCName(struct ndr_push *ndr, int flags, const struct netr_GetAnyDCName *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
@@ -9407,7 +9407,7 @@ NTSTATUS ndr_push_netr_GetAnyDCName(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_GetAnyDCName(struct ndr_pull *ndr, int flags, struct netr_GetAnyDCName *r)
+static NTSTATUS ndr_pull_netr_GetAnyDCName(struct ndr_pull *ndr, int flags, struct netr_GetAnyDCName *r)
{
uint32_t _ptr_logon_server;
uint32_t _ptr_domainname;
@@ -9517,7 +9517,7 @@ _PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonControl2(struct ndr_push *ndr, int flags, const struct netr_LogonControl2 *r)
+static NTSTATUS ndr_push_netr_LogonControl2(struct ndr_push *ndr, int flags, const struct netr_LogonControl2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
@@ -9541,7 +9541,7 @@ NTSTATUS ndr_push_netr_LogonControl2(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int flags, struct netr_LogonControl2 *r)
+static NTSTATUS ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int flags, struct netr_LogonControl2 *r)
{
uint32_t _ptr_logon_server;
TALLOC_CTX *_mem_save_logon_server_0;
@@ -9624,7 +9624,7 @@ _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate2 *r)
+static NTSTATUS ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -9658,7 +9658,7 @@ NTSTATUS ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate2 *r)
+static NTSTATUS ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate2 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -9785,7 +9785,7 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int flags, const struct netr_DatabaseSync2 *r)
+static NTSTATUS ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int flags, const struct netr_DatabaseSync2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
@@ -9819,7 +9819,7 @@ NTSTATUS ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync2 *r)
+static NTSTATUS ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync2 *r)
{
uint32_t _ptr_delta_enum_array;
TALLOC_CTX *_mem_save_return_authenticator_0;
@@ -9946,7 +9946,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int flags, const struct netr_DatabaseRedo *r)
+static NTSTATUS ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int flags, const struct netr_DatabaseRedo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
@@ -9979,7 +9979,7 @@ NTSTATUS ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int flags, struct netr_DatabaseRedo *r)
+static NTSTATUS ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int flags, struct netr_DatabaseRedo *r)
{
uint32_t _ptr_change_log_entry;
uint32_t _ptr_delta_enum_array;
@@ -10102,7 +10102,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonControl2Ex(struct ndr_push *ndr, int flags, const struct netr_LogonControl2Ex *r)
+static NTSTATUS ndr_push_netr_LogonControl2Ex(struct ndr_push *ndr, int flags, const struct netr_LogonControl2Ex *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
@@ -10126,7 +10126,7 @@ NTSTATUS ndr_push_netr_LogonControl2Ex(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonControl2Ex(struct ndr_pull *ndr, int flags, struct netr_LogonControl2Ex *r)
+static NTSTATUS ndr_pull_netr_LogonControl2Ex(struct ndr_pull *ndr, int flags, struct netr_LogonControl2Ex *r)
{
uint32_t _ptr_logon_server;
TALLOC_CTX *_mem_save_logon_server_0;
@@ -10209,7 +10209,7 @@ _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_push *ndr, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINS *r)
+static NTSTATUS ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_push *ndr, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINS *r)
{
if (flags & NDR_IN) {
}
@@ -10219,7 +10219,7 @@ NTSTATUS ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_push *ndr, int fla
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_pull *ndr, int flags, struct netr_NETRENUMERATETRUSTEDDOMAINS *r)
+static NTSTATUS ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_pull *ndr, int flags, struct netr_NETRENUMERATETRUSTEDDOMAINS *r)
{
if (flags & NDR_IN) {
}
@@ -10250,7 +10250,7 @@ _PUBLIC_ void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCName *r)
+static NTSTATUS ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCName *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -10287,7 +10287,7 @@ NTSTATUS ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCName *r)
+static NTSTATUS ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCName *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_domain_name;
@@ -10434,7 +10434,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRLOGONDUMMYROUTINE1(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r)
+static NTSTATUS ndr_push_netr_NETRLOGONDUMMYROUTINE1(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r)
{
if (flags & NDR_IN) {
}
@@ -10444,7 +10444,7 @@ NTSTATUS ndr_push_netr_NETRLOGONDUMMYROUTINE1(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRLOGONDUMMYROUTINE1(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONDUMMYROUTINE1 *r)
+static NTSTATUS ndr_pull_netr_NETRLOGONDUMMYROUTINE1(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONDUMMYROUTINE1 *r)
{
if (flags & NDR_IN) {
}
@@ -10475,7 +10475,7 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRLOGONSETSERVICEBITS(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
+static NTSTATUS ndr_push_netr_NETRLOGONSETSERVICEBITS(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
{
if (flags & NDR_IN) {
}
@@ -10485,7 +10485,7 @@ NTSTATUS ndr_push_netr_NETRLOGONSETSERVICEBITS(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRLOGONSETSERVICEBITS(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONSETSERVICEBITS *r)
+static NTSTATUS ndr_pull_netr_NETRLOGONSETSERVICEBITS(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONSETSERVICEBITS *r)
{
if (flags & NDR_IN) {
}
@@ -10516,7 +10516,7 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRLOGONGETTRUSTRID(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONGETTRUSTRID *r)
+static NTSTATUS ndr_push_netr_NETRLOGONGETTRUSTRID(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONGETTRUSTRID *r)
{
if (flags & NDR_IN) {
}
@@ -10526,7 +10526,7 @@ NTSTATUS ndr_push_netr_NETRLOGONGETTRUSTRID(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRLOGONGETTRUSTRID(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONGETTRUSTRID *r)
+static NTSTATUS ndr_pull_netr_NETRLOGONGETTRUSTRID(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONGETTRUSTRID *r)
{
if (flags & NDR_IN) {
}
@@ -10557,7 +10557,7 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONGETTRUSTRID(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
+static NTSTATUS ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
{
if (flags & NDR_IN) {
}
@@ -10567,7 +10567,7 @@ NTSTATUS ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
+static NTSTATUS ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
{
if (flags & NDR_IN) {
}
@@ -10598,7 +10598,7 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
+static NTSTATUS ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
{
if (flags & NDR_IN) {
}
@@ -10608,7 +10608,7 @@ NTSTATUS ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
+static NTSTATUS ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
{
if (flags & NDR_IN) {
}
@@ -10639,7 +10639,7 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_ServerAuthenticate3(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate3 *r)
+static NTSTATUS ndr_push_netr_ServerAuthenticate3(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate3 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -10675,7 +10675,7 @@ NTSTATUS ndr_push_netr_ServerAuthenticate3(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_ServerAuthenticate3(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate3 *r)
+static NTSTATUS ndr_pull_netr_ServerAuthenticate3(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate3 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -10816,7 +10816,7 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCNameEx *r)
+static NTSTATUS ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCNameEx *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -10856,7 +10856,7 @@ NTSTATUS ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCNameEx *r)
+static NTSTATUS ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCNameEx *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_domain_name;
@@ -11009,7 +11009,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DsRGetSiteName(struct ndr_push *ndr, int flags, const struct netr_DsRGetSiteName *r)
+static NTSTATUS ndr_push_netr_DsRGetSiteName(struct ndr_push *ndr, int flags, const struct netr_DsRGetSiteName *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
@@ -11033,7 +11033,7 @@ NTSTATUS ndr_push_netr_DsRGetSiteName(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DsRGetSiteName(struct ndr_pull *ndr, int flags, struct netr_DsRGetSiteName *r)
+static NTSTATUS ndr_pull_netr_DsRGetSiteName(struct ndr_pull *ndr, int flags, struct netr_DsRGetSiteName *r)
{
uint32_t _ptr_computer_name;
uint32_t _ptr_site;
@@ -11117,7 +11117,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonGetDomainInfo(struct ndr_push *ndr, int flags, const struct netr_LogonGetDomainInfo *r)
+static NTSTATUS ndr_push_netr_LogonGetDomainInfo(struct ndr_push *ndr, int flags, const struct netr_LogonGetDomainInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
@@ -11150,7 +11150,7 @@ NTSTATUS ndr_push_netr_LogonGetDomainInfo(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonGetDomainInfo(struct ndr_pull *ndr, int flags, struct netr_LogonGetDomainInfo *r)
+static NTSTATUS ndr_pull_netr_LogonGetDomainInfo(struct ndr_pull *ndr, int flags, struct netr_LogonGetDomainInfo *r)
{
uint32_t _ptr_computer_name;
TALLOC_CTX *_mem_save_computer_name_0;
@@ -11276,7 +11276,7 @@ _PUBLIC_ void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_netr_ServerPasswordSet2(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordSet2 *r)
+static NTSTATUS ndr_push_netr_ServerPasswordSet2(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordSet2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -11306,7 +11306,7 @@ NTSTATUS ndr_push_netr_ServerPasswordSet2(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_ServerPasswordSet2(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordSet2 *r)
+static NTSTATUS ndr_pull_netr_ServerPasswordSet2(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordSet2 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -11401,7 +11401,7 @@ _PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRSERVERPASSWORDGET(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERPASSWORDGET *r)
+static NTSTATUS ndr_push_netr_NETRSERVERPASSWORDGET(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERPASSWORDGET *r)
{
if (flags & NDR_IN) {
}
@@ -11411,7 +11411,7 @@ NTSTATUS ndr_push_netr_NETRSERVERPASSWORDGET(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRSERVERPASSWORDGET(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERPASSWORDGET *r)
+static NTSTATUS ndr_pull_netr_NETRSERVERPASSWORDGET(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERPASSWORDGET *r)
{
if (flags & NDR_IN) {
}
@@ -11442,7 +11442,7 @@ _PUBLIC_ void ndr_print_netr_NETRSERVERPASSWORDGET(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRLOGONSENDTOSAM(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONSENDTOSAM *r)
+static NTSTATUS ndr_push_netr_NETRLOGONSENDTOSAM(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONSENDTOSAM *r)
{
if (flags & NDR_IN) {
}
@@ -11452,7 +11452,7 @@ NTSTATUS ndr_push_netr_NETRLOGONSENDTOSAM(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRLOGONSENDTOSAM(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONSENDTOSAM *r)
+static NTSTATUS ndr_pull_netr_NETRLOGONSENDTOSAM(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONSENDTOSAM *r)
{
if (flags & NDR_IN) {
}
@@ -11483,7 +11483,7 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DSRADDRESSTOSITENAMESW(struct ndr_push *ndr, int flags, const struct netr_DSRADDRESSTOSITENAMESW *r)
+static NTSTATUS ndr_push_netr_DSRADDRESSTOSITENAMESW(struct ndr_push *ndr, int flags, const struct netr_DSRADDRESSTOSITENAMESW *r)
{
if (flags & NDR_IN) {
}
@@ -11493,7 +11493,7 @@ NTSTATUS ndr_push_netr_DSRADDRESSTOSITENAMESW(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DSRADDRESSTOSITENAMESW(struct ndr_pull *ndr, int flags, struct netr_DSRADDRESSTOSITENAMESW *r)
+static NTSTATUS ndr_pull_netr_DSRADDRESSTOSITENAMESW(struct ndr_pull *ndr, int flags, struct netr_DSRADDRESSTOSITENAMESW *r)
{
if (flags & NDR_IN) {
}
@@ -11524,7 +11524,7 @@ _PUBLIC_ void ndr_print_netr_DSRADDRESSTOSITENAMESW(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCNameEx2 *r)
+static NTSTATUS ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCNameEx2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -11572,7 +11572,7 @@ NTSTATUS ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCNameEx2 *r)
+static NTSTATUS ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCNameEx2 *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_client_account;
@@ -11753,7 +11753,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
+static NTSTATUS ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
{
if (flags & NDR_IN) {
}
@@ -11763,7 +11763,7 @@ NTSTATUS ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_push *ndr,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
+static NTSTATUS ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
{
if (flags & NDR_IN) {
}
@@ -11794,7 +11794,7 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_prin
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_push *ndr, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r)
+static NTSTATUS ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_push *ndr, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r)
{
if (flags & NDR_IN) {
}
@@ -11804,7 +11804,7 @@ NTSTATUS ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_push *ndr, int f
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_pull *ndr, int flags, struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r)
+static NTSTATUS ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_pull *ndr, int flags, struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r)
{
if (flags & NDR_IN) {
}
@@ -11835,7 +11835,7 @@ _PUBLIC_ void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_print *ndr
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_push *ndr, int flags, const struct netr_DSRADDRESSTOSITENAMESEXW *r)
+static NTSTATUS ndr_push_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_push *ndr, int flags, const struct netr_DSRADDRESSTOSITENAMESEXW *r)
{
if (flags & NDR_IN) {
}
@@ -11845,7 +11845,7 @@ NTSTATUS ndr_push_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_pull *ndr, int flags, struct netr_DSRADDRESSTOSITENAMESEXW *r)
+static NTSTATUS ndr_pull_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_pull *ndr, int flags, struct netr_DSRADDRESSTOSITENAMESEXW *r)
{
if (flags & NDR_IN) {
}
@@ -11876,7 +11876,7 @@ _PUBLIC_ void ndr_print_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DSRGETDCSITECOVERAGEW(struct ndr_push *ndr, int flags, const struct netr_DSRGETDCSITECOVERAGEW *r)
+static NTSTATUS ndr_push_netr_DSRGETDCSITECOVERAGEW(struct ndr_push *ndr, int flags, const struct netr_DSRGETDCSITECOVERAGEW *r)
{
if (flags & NDR_IN) {
}
@@ -11886,7 +11886,7 @@ NTSTATUS ndr_push_netr_DSRGETDCSITECOVERAGEW(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DSRGETDCSITECOVERAGEW(struct ndr_pull *ndr, int flags, struct netr_DSRGETDCSITECOVERAGEW *r)
+static NTSTATUS ndr_pull_netr_DSRGETDCSITECOVERAGEW(struct ndr_pull *ndr, int flags, struct netr_DSRGETDCSITECOVERAGEW *r)
{
if (flags & NDR_IN) {
}
@@ -11917,7 +11917,7 @@ _PUBLIC_ void ndr_print_netr_DSRGETDCSITECOVERAGEW(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogonEx *r)
+static NTSTATUS ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogonEx *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -11954,7 +11954,7 @@ NTSTATUS ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogonEx *r)
+static NTSTATUS ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogonEx *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_computer_name;
@@ -12102,7 +12102,7 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push *ndr, int flags, const struct netr_DsrEnumerateDomainTrusts *r)
+static NTSTATUS ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push *ndr, int flags, const struct netr_DsrEnumerateDomainTrusts *r)
{
uint32_t cntr_trusts_1;
if (flags & NDR_IN) {
@@ -12132,7 +12132,7 @@ NTSTATUS ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull *ndr, int flags, struct netr_DsrEnumerateDomainTrusts *r)
+static NTSTATUS ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull *ndr, int flags, struct netr_DsrEnumerateDomainTrusts *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_trusts;
@@ -12253,7 +12253,7 @@ _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_push *ndr, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r)
+static NTSTATUS ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_push *ndr, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r)
{
if (flags & NDR_IN) {
}
@@ -12263,7 +12263,7 @@ NTSTATUS ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_push *ndr, int fla
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_pull *ndr, int flags, struct netr_DSRDEREGISTERDNSHOSTRECORDS *r)
+static NTSTATUS ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_pull *ndr, int flags, struct netr_DSRDEREGISTERDNSHOSTRECORDS *r)
{
if (flags & NDR_IN) {
}
@@ -12294,7 +12294,7 @@ _PUBLIC_ void ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERTRUSTPASSWORDSGET *r)
+static NTSTATUS ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERTRUSTPASSWORDSGET *r)
{
if (flags & NDR_IN) {
}
@@ -12304,7 +12304,7 @@ NTSTATUS ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_push *ndr, int fla
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERTRUSTPASSWORDSGET *r)
+static NTSTATUS ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERTRUSTPASSWORDSGET *r)
{
if (flags & NDR_IN) {
}
@@ -12335,7 +12335,7 @@ _PUBLIC_ void ndr_print_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct netr_DSRGETFORESTTRUSTINFORMATION *r)
+static NTSTATUS ndr_push_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct netr_DSRGETFORESTTRUSTINFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -12345,7 +12345,7 @@ NTSTATUS ndr_push_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct netr_DSRGETFORESTTRUSTINFORMATION *r)
+static NTSTATUS ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct netr_DSRGETFORESTTRUSTINFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -12376,7 +12376,7 @@ _PUBLIC_ void ndr_print_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct netr_NETRGETFORESTTRUSTINFORMATION *r)
+static NTSTATUS ndr_push_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct netr_NETRGETFORESTTRUSTINFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -12386,7 +12386,7 @@ NTSTATUS ndr_push_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int f
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct netr_NETRGETFORESTTRUSTINFORMATION *r)
+static NTSTATUS ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct netr_NETRGETFORESTTRUSTINFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -12417,7 +12417,7 @@ _PUBLIC_ void ndr_print_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr
ndr->depth--;
}
-NTSTATUS ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogonWithFlags *r)
+static NTSTATUS ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogonWithFlags *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -12466,7 +12466,7 @@ NTSTATUS ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogonWithFlags *r)
+static NTSTATUS ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogonWithFlags *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_computer_name;
@@ -12672,7 +12672,7 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_netr_NETRSERVERGETTRUSTINFO(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r)
+static NTSTATUS ndr_push_netr_NETRSERVERGETTRUSTINFO(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r)
{
if (flags & NDR_IN) {
}
@@ -12682,7 +12682,7 @@ NTSTATUS ndr_push_netr_NETRSERVERGETTRUSTINFO(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_netr_NETRSERVERGETTRUSTINFO(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERGETTRUSTINFO *r)
+static NTSTATUS ndr_pull_netr_NETRSERVERGETTRUSTINFO(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERGETTRUSTINFO *r)
{
if (flags & NDR_IN) {
}
@@ -12713,14 +12713,14 @@ _PUBLIC_ void ndr_print_netr_NETRSERVERGETTRUSTINFO(struct ndr_print *ndr, const
ndr->depth--;
}
-const struct ndr_interface_call netlogon_calls[] = {
+static const struct ndr_interface_call netlogon_calls[] = {
{
"netr_LogonUasLogon",
sizeof(struct netr_LogonUasLogon),
(ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogon,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogon,
(ndr_print_function_t) ndr_print_netr_LogonUasLogon,
- False,
+ false,
},
{
"netr_LogonUasLogoff",
@@ -12728,7 +12728,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogoff,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogoff,
(ndr_print_function_t) ndr_print_netr_LogonUasLogoff,
- False,
+ false,
},
{
"netr_LogonSamLogon",
@@ -12736,7 +12736,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogon,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogon,
(ndr_print_function_t) ndr_print_netr_LogonSamLogon,
- False,
+ false,
},
{
"netr_LogonSamLogoff",
@@ -12744,7 +12744,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogoff,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogoff,
(ndr_print_function_t) ndr_print_netr_LogonSamLogoff,
- False,
+ false,
},
{
"netr_ServerReqChallenge",
@@ -12752,7 +12752,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_ServerReqChallenge,
(ndr_pull_flags_fn_t) ndr_pull_netr_ServerReqChallenge,
(ndr_print_function_t) ndr_print_netr_ServerReqChallenge,
- False,
+ false,
},
{
"netr_ServerAuthenticate",
@@ -12760,7 +12760,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate,
(ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate,
(ndr_print_function_t) ndr_print_netr_ServerAuthenticate,
- False,
+ false,
},
{
"netr_ServerPasswordSet",
@@ -12768,7 +12768,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet,
(ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet,
(ndr_print_function_t) ndr_print_netr_ServerPasswordSet,
- False,
+ false,
},
{
"netr_DatabaseDeltas",
@@ -12776,7 +12776,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DatabaseDeltas,
(ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseDeltas,
(ndr_print_function_t) ndr_print_netr_DatabaseDeltas,
- False,
+ false,
},
{
"netr_DatabaseSync",
@@ -12784,7 +12784,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync,
(ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync,
(ndr_print_function_t) ndr_print_netr_DatabaseSync,
- False,
+ false,
},
{
"netr_AccountDeltas",
@@ -12792,7 +12792,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_AccountDeltas,
(ndr_pull_flags_fn_t) ndr_pull_netr_AccountDeltas,
(ndr_print_function_t) ndr_print_netr_AccountDeltas,
- False,
+ false,
},
{
"netr_AccountSync",
@@ -12800,7 +12800,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_AccountSync,
(ndr_pull_flags_fn_t) ndr_pull_netr_AccountSync,
(ndr_print_function_t) ndr_print_netr_AccountSync,
- False,
+ false,
},
{
"netr_GetDcName",
@@ -12808,7 +12808,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_GetDcName,
(ndr_pull_flags_fn_t) ndr_pull_netr_GetDcName,
(ndr_print_function_t) ndr_print_netr_GetDcName,
- False,
+ false,
},
{
"netr_LogonControl",
@@ -12816,7 +12816,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonControl,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl,
(ndr_print_function_t) ndr_print_netr_LogonControl,
- False,
+ false,
},
{
"netr_GetAnyDCName",
@@ -12824,7 +12824,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_GetAnyDCName,
(ndr_pull_flags_fn_t) ndr_pull_netr_GetAnyDCName,
(ndr_print_function_t) ndr_print_netr_GetAnyDCName,
- False,
+ false,
},
{
"netr_LogonControl2",
@@ -12832,7 +12832,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonControl2,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2,
(ndr_print_function_t) ndr_print_netr_LogonControl2,
- False,
+ false,
},
{
"netr_ServerAuthenticate2",
@@ -12840,7 +12840,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate2,
(ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate2,
(ndr_print_function_t) ndr_print_netr_ServerAuthenticate2,
- False,
+ false,
},
{
"netr_DatabaseSync2",
@@ -12848,7 +12848,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync2,
(ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync2,
(ndr_print_function_t) ndr_print_netr_DatabaseSync2,
- False,
+ false,
},
{
"netr_DatabaseRedo",
@@ -12856,7 +12856,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DatabaseRedo,
(ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseRedo,
(ndr_print_function_t) ndr_print_netr_DatabaseRedo,
- False,
+ false,
},
{
"netr_LogonControl2Ex",
@@ -12864,7 +12864,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonControl2Ex,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2Ex,
(ndr_print_function_t) ndr_print_netr_LogonControl2Ex,
- False,
+ false,
},
{
"netr_NETRENUMERATETRUSTEDDOMAINS",
@@ -12872,7 +12872,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS,
(ndr_print_function_t) ndr_print_netr_NETRENUMERATETRUSTEDDOMAINS,
- False,
+ false,
},
{
"netr_DsRGetDCName",
@@ -12880,7 +12880,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCName,
(ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCName,
(ndr_print_function_t) ndr_print_netr_DsRGetDCName,
- False,
+ false,
},
{
"netr_NETRLOGONDUMMYROUTINE1",
@@ -12888,7 +12888,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONDUMMYROUTINE1,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONDUMMYROUTINE1,
(ndr_print_function_t) ndr_print_netr_NETRLOGONDUMMYROUTINE1,
- False,
+ false,
},
{
"netr_NETRLOGONSETSERVICEBITS",
@@ -12896,7 +12896,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONSETSERVICEBITS,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONSETSERVICEBITS,
(ndr_print_function_t) ndr_print_netr_NETRLOGONSETSERVICEBITS,
- False,
+ false,
},
{
"netr_NETRLOGONGETTRUSTRID",
@@ -12904,7 +12904,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONGETTRUSTRID,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONGETTRUSTRID,
(ndr_print_function_t) ndr_print_netr_NETRLOGONGETTRUSTRID,
- False,
+ false,
},
{
"netr_NETRLOGONCOMPUTESERVERDIGEST",
@@ -12912,7 +12912,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST,
(ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST,
- False,
+ false,
},
{
"netr_NETRLOGONCOMPUTECLIENTDIGEST",
@@ -12920,7 +12920,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST,
(ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST,
- False,
+ false,
},
{
"netr_ServerAuthenticate3",
@@ -12928,7 +12928,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate3,
(ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate3,
(ndr_print_function_t) ndr_print_netr_ServerAuthenticate3,
- False,
+ false,
},
{
"netr_DsRGetDCNameEx",
@@ -12936,7 +12936,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx,
(ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx,
(ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx,
- False,
+ false,
},
{
"netr_DsRGetSiteName",
@@ -12944,7 +12944,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DsRGetSiteName,
(ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetSiteName,
(ndr_print_function_t) ndr_print_netr_DsRGetSiteName,
- False,
+ false,
},
{
"netr_LogonGetDomainInfo",
@@ -12952,7 +12952,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonGetDomainInfo,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetDomainInfo,
(ndr_print_function_t) ndr_print_netr_LogonGetDomainInfo,
- False,
+ false,
},
{
"netr_ServerPasswordSet2",
@@ -12960,7 +12960,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet2,
(ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet2,
(ndr_print_function_t) ndr_print_netr_ServerPasswordSet2,
- False,
+ false,
},
{
"netr_NETRSERVERPASSWORDGET",
@@ -12968,7 +12968,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRSERVERPASSWORDGET,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRSERVERPASSWORDGET,
(ndr_print_function_t) ndr_print_netr_NETRSERVERPASSWORDGET,
- False,
+ false,
},
{
"netr_NETRLOGONSENDTOSAM",
@@ -12976,7 +12976,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONSENDTOSAM,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONSENDTOSAM,
(ndr_print_function_t) ndr_print_netr_NETRLOGONSENDTOSAM,
- False,
+ false,
},
{
"netr_DSRADDRESSTOSITENAMESW",
@@ -12984,7 +12984,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DSRADDRESSTOSITENAMESW,
(ndr_pull_flags_fn_t) ndr_pull_netr_DSRADDRESSTOSITENAMESW,
(ndr_print_function_t) ndr_print_netr_DSRADDRESSTOSITENAMESW,
- False,
+ false,
},
{
"netr_DsRGetDCNameEx2",
@@ -12992,7 +12992,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx2,
(ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx2,
(ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx2,
- False,
+ false,
},
{
"netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN",
@@ -13000,7 +13000,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
(ndr_print_function_t) ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
- False,
+ false,
},
{
"netr_NETRENUMERATETRUSTEDDOMAINSEX",
@@ -13008,7 +13008,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX,
(ndr_print_function_t) ndr_print_netr_NETRENUMERATETRUSTEDDOMAINSEX,
- False,
+ false,
},
{
"netr_DSRADDRESSTOSITENAMESEXW",
@@ -13016,7 +13016,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DSRADDRESSTOSITENAMESEXW,
(ndr_pull_flags_fn_t) ndr_pull_netr_DSRADDRESSTOSITENAMESEXW,
(ndr_print_function_t) ndr_print_netr_DSRADDRESSTOSITENAMESEXW,
- False,
+ false,
},
{
"netr_DSRGETDCSITECOVERAGEW",
@@ -13024,7 +13024,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DSRGETDCSITECOVERAGEW,
(ndr_pull_flags_fn_t) ndr_pull_netr_DSRGETDCSITECOVERAGEW,
(ndr_print_function_t) ndr_print_netr_DSRGETDCSITECOVERAGEW,
- False,
+ false,
},
{
"netr_LogonSamLogonEx",
@@ -13032,7 +13032,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonEx,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonEx,
(ndr_print_function_t) ndr_print_netr_LogonSamLogonEx,
- False,
+ false,
},
{
"netr_DsrEnumerateDomainTrusts",
@@ -13040,7 +13040,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DsrEnumerateDomainTrusts,
(ndr_pull_flags_fn_t) ndr_pull_netr_DsrEnumerateDomainTrusts,
(ndr_print_function_t) ndr_print_netr_DsrEnumerateDomainTrusts,
- False,
+ false,
},
{
"netr_DSRDEREGISTERDNSHOSTRECORDS",
@@ -13048,7 +13048,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS,
(ndr_pull_flags_fn_t) ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS,
(ndr_print_function_t) ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS,
- False,
+ false,
},
{
"netr_NETRSERVERTRUSTPASSWORDSGET",
@@ -13056,7 +13056,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET,
(ndr_print_function_t) ndr_print_netr_NETRSERVERTRUSTPASSWORDSGET,
- False,
+ false,
},
{
"netr_DSRGETFORESTTRUSTINFORMATION",
@@ -13064,7 +13064,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_DSRGETFORESTTRUSTINFORMATION,
(ndr_pull_flags_fn_t) ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION,
(ndr_print_function_t) ndr_print_netr_DSRGETFORESTTRUSTINFORMATION,
- False,
+ false,
},
{
"netr_NETRGETFORESTTRUSTINFORMATION",
@@ -13072,7 +13072,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRGETFORESTTRUSTINFORMATION,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION,
(ndr_print_function_t) ndr_print_netr_NETRGETFORESTTRUSTINFORMATION,
- False,
+ false,
},
{
"netr_LogonSamLogonWithFlags",
@@ -13080,7 +13080,7 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonWithFlags,
(ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonWithFlags,
(ndr_print_function_t) ndr_print_netr_LogonSamLogonWithFlags,
- False,
+ false,
},
{
"netr_NETRSERVERGETTRUSTINFO",
@@ -13088,27 +13088,27 @@ const struct ndr_interface_call netlogon_calls[] = {
(ndr_push_flags_fn_t) ndr_push_netr_NETRSERVERGETTRUSTINFO,
(ndr_pull_flags_fn_t) ndr_pull_netr_NETRSERVERGETTRUSTINFO,
(ndr_print_function_t) ndr_print_netr_NETRSERVERGETTRUSTINFO,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const netlogon_endpoint_strings[] = {
+static const char * const netlogon_endpoint_strings[] = {
"ncacn_np:[\\pipe\\netlogon]",
"ncacn_ip_tcp:",
"ncalrpc:",
};
-const struct ndr_interface_string_array netlogon_endpoints = {
+static const struct ndr_interface_string_array netlogon_endpoints = {
.count = 3,
.names = netlogon_endpoint_strings
};
-const char * const netlogon_authservice_strings[] = {
+static const char * const netlogon_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array netlogon_authservices = {
+static const struct ndr_interface_string_array netlogon_authservices = {
.count = 3,
.names = netlogon_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_notify.c b/source/librpc/gen_ndr/ndr_notify.c
index c3873550bb0..b2b8ad34549 100644
--- a/source/librpc/gen_ndr/ndr_notify.c
+++ b/source/librpc/gen_ndr/ndr_notify.c
@@ -60,7 +60,7 @@ _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, co
ndr->depth--;
}
-NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r)
+static NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r)
{
uint32_t cntr_entries_0;
if (ndr_flags & NDR_SCALARS) {
@@ -80,7 +80,7 @@ NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r)
+static NTSTATUS ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r)
{
uint32_t cntr_entries_0;
TALLOC_CTX *_mem_save_entries_0;
diff --git a/source/librpc/gen_ndr/ndr_srvsvc.c b/source/librpc/gen_ndr/ndr_srvsvc.c
index 30d30d2f585..e4fe6f63920 100644
--- a/source/librpc/gen_ndr/ndr_srvsvc.c
+++ b/source/librpc/gen_ndr/ndr_srvsvc.c
@@ -5,7 +5,7 @@
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_svcctl.h"
-NTSTATUS ndr_push_srvsvc_NetCharDevInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo0 *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -22,7 +22,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevInfo0(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo0 *r)
{
uint32_t _ptr_device;
TALLOC_CTX *_mem_save_device_0;
@@ -65,7 +65,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr0 *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr0 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -87,7 +87,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr0 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -152,7 +152,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -178,7 +178,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
{
uint32_t _ptr_device;
TALLOC_CTX *_mem_save_device_0;
@@ -251,7 +251,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -273,7 +273,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -338,7 +338,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -380,7 +380,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
{
int level;
uint32_t _level;
@@ -476,7 +476,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char
}
}
-NTSTATUS ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -518,7 +518,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
{
int level;
uint32_t _level;
@@ -614,7 +614,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *
}
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -631,7 +631,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
{
uint32_t _ptr_device;
TALLOC_CTX *_mem_save_device_0;
@@ -674,7 +674,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -696,7 +696,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -761,7 +761,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -788,7 +788,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
{
uint32_t _ptr_device;
TALLOC_CTX *_mem_save_device_0;
@@ -863,7 +863,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -885,7 +885,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -950,7 +950,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -992,7 +992,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
{
int level;
uint32_t _level;
@@ -1088,7 +1088,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char
}
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -1130,7 +1130,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
{
int level;
uint32_t _level;
@@ -1226,7 +1226,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char
}
}
-NTSTATUS ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
+static NTSTATUS ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1237,7 +1237,7 @@ NTSTATUS ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1256,7 +1256,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
+static NTSTATUS ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1275,7 +1275,7 @@ NTSTATUS ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -1337,7 +1337,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
+static NTSTATUS ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1366,7 +1366,7 @@ NTSTATUS ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
{
uint32_t _ptr_user;
TALLOC_CTX *_mem_save_user_0;
@@ -1445,7 +1445,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
+static NTSTATUS ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1467,7 +1467,7 @@ NTSTATUS ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -1532,7 +1532,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
+static NTSTATUS ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -1574,7 +1574,7 @@ NTSTATUS ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const u
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
+static NTSTATUS ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
{
int level;
uint32_t _level;
@@ -1670,7 +1670,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *nam
}
}
-NTSTATUS ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
+static NTSTATUS ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1681,7 +1681,7 @@ NTSTATUS ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -1700,7 +1700,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
+static NTSTATUS ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1719,7 +1719,7 @@ NTSTATUS ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -1781,7 +1781,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
+static NTSTATUS ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1808,7 +1808,7 @@ NTSTATUS ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
{
uint32_t _ptr_path;
TALLOC_CTX *_mem_save_path_0;
@@ -1883,7 +1883,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
+static NTSTATUS ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1905,7 +1905,7 @@ NTSTATUS ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -1970,7 +1970,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -2012,7 +2012,7 @@ NTSTATUS ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
{
int level;
uint32_t _level;
@@ -2108,7 +2108,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *na
}
}
-NTSTATUS ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
+static NTSTATUS ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -2150,7 +2150,7 @@ NTSTATUS ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const u
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
{
int level;
uint32_t _level;
@@ -2246,7 +2246,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *nam
}
}
-NTSTATUS ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2263,7 +2263,7 @@ NTSTATUS ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
{
uint32_t _ptr_client;
TALLOC_CTX *_mem_save_client_0;
@@ -2306,7 +2306,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2328,7 +2328,7 @@ NTSTATUS ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -2393,7 +2393,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2421,7 +2421,7 @@ NTSTATUS ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
{
uint32_t _ptr_client;
TALLOC_CTX *_mem_save_client_0;
@@ -2498,7 +2498,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2520,7 +2520,7 @@ NTSTATUS ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -2585,7 +2585,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2620,7 +2620,7 @@ NTSTATUS ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
{
uint32_t _ptr_client;
TALLOC_CTX *_mem_save_client_0;
@@ -2723,7 +2723,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2745,7 +2745,7 @@ NTSTATUS ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -2810,7 +2810,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -2836,7 +2836,7 @@ NTSTATUS ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
{
uint32_t _ptr_client;
TALLOC_CTX *_mem_save_client_0;
@@ -2909,7 +2909,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -2931,7 +2931,7 @@ NTSTATUS ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -2996,7 +2996,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3038,7 +3038,7 @@ NTSTATUS ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
{
uint32_t _ptr_client;
TALLOC_CTX *_mem_save_client_0;
@@ -3167,7 +3167,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
+static NTSTATUS ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3189,7 +3189,7 @@ NTSTATUS ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -3254,7 +3254,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
+static NTSTATUS ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -3326,7 +3326,7 @@ NTSTATUS ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const u
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
{
int level;
uint32_t _level;
@@ -3509,7 +3509,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *nam
}
}
-NTSTATUS ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
+static NTSTATUS ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
{
{
uint32_t _flags_save_ENUM = ndr->flags;
@@ -3520,7 +3520,7 @@ NTSTATUS ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srv
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
+static NTSTATUS ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
{
uint32_t v;
{
@@ -3559,7 +3559,7 @@ _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name
}
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3576,7 +3576,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -3619,7 +3619,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3641,7 +3641,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -3706,7 +3706,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3731,7 +3731,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -3802,7 +3802,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -3824,7 +3824,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -3889,7 +3889,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -3931,7 +3931,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -4060,7 +4060,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -4082,7 +4082,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -4147,7 +4147,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -4173,7 +4173,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -4246,7 +4246,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -4268,7 +4268,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -4333,7 +4333,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -4385,7 +4385,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -4541,7 +4541,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -4563,7 +4563,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -4628,7 +4628,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -4645,7 +4645,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
{
uint32_t _ptr_comment;
TALLOC_CTX *_mem_save_comment_0;
@@ -4688,7 +4688,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -4710,7 +4710,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -4775,13 +4775,13 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+static NTSTATUS ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+static NTSTATUS ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -4798,7 +4798,7 @@ _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -4809,7 +4809,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -4828,7 +4828,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -4847,7 +4847,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -4909,7 +4909,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -4920,7 +4920,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -4939,7 +4939,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -4958,7 +4958,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -5020,7 +5020,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -5038,7 +5038,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
{
uint32_t _ptr_alternate_directory_name;
TALLOC_CTX *_mem_save_alternate_directory_name_0;
@@ -5083,7 +5083,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -5105,7 +5105,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -5170,7 +5170,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -5192,7 +5192,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -5257,7 +5257,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -5379,7 +5379,7 @@ NTSTATUS ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
{
int level;
uint32_t _level;
@@ -5707,7 +5707,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *n
}
}
-NTSTATUS ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -5829,7 +5829,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
{
int level;
uint32_t _level;
@@ -6185,7 +6185,7 @@ _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *nam
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -6203,7 +6203,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -6248,7 +6248,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -6276,7 +6276,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -6353,7 +6353,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -6394,7 +6394,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -6509,7 +6509,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -6567,7 +6567,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
{
uint32_t _ptr_alerts;
TALLOC_CTX *_mem_save_alerts_0;
@@ -6716,7 +6716,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -6783,7 +6783,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
{
uint32_t _ptr_alerts;
TALLOC_CTX *_mem_save_alerts_0;
@@ -6962,7 +6962,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -6990,7 +6990,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7043,7 +7043,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7101,7 +7101,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
{
uint32_t _ptr_domain;
TALLOC_CTX *_mem_save_domain_0;
@@ -7226,7 +7226,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7297,7 +7297,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
{
uint32_t _ptr_domain;
TALLOC_CTX *_mem_save_domain_0;
@@ -7448,7 +7448,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1005 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1005 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7465,7 +7465,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1005 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1005 *r)
{
uint32_t _ptr_comment;
TALLOC_CTX *_mem_save_comment_0;
@@ -7508,7 +7508,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1010 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1010 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7519,7 +7519,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1010 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1010 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7538,7 +7538,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1016 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1016 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7549,7 +7549,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1016 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1016 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7568,7 +7568,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1017 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1017 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7579,7 +7579,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1017 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1017 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7598,7 +7598,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1018 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1018 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7609,7 +7609,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1018 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1018 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7628,7 +7628,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1107 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1107 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7639,7 +7639,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1107 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1107 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7658,7 +7658,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1501 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1501 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7669,7 +7669,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1501 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1501 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7688,7 +7688,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1502 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1502 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7699,7 +7699,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1502 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1502 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7718,7 +7718,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1503 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1503 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7729,7 +7729,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1503 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1503 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7748,7 +7748,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1506 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1506 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7759,7 +7759,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1506 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1506 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7778,7 +7778,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1509 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1509 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7789,7 +7789,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1509 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1509 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7808,7 +7808,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1510 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1510 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7819,7 +7819,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1510 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1510 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7838,7 +7838,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1511 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1511 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7849,7 +7849,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1511 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1511 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7868,7 +7868,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1512 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1512 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7879,7 +7879,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1512 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1512 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7898,7 +7898,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1513 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1513 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7909,7 +7909,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1513 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1513 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7928,7 +7928,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1514 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1514 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7939,7 +7939,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1514 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1514 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7958,7 +7958,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1515 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1515 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7969,7 +7969,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1515 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1515 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -7988,7 +7988,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1516 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1516 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -7999,7 +7999,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1516 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1516 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8018,7 +8018,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1518 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1518 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8029,7 +8029,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1518 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1518 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8048,7 +8048,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1520 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1520 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8059,7 +8059,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1520 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1520 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8078,7 +8078,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1521 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1521 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8089,7 +8089,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1521 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1521 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8108,7 +8108,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1522 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1522 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8119,7 +8119,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1522 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1522 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8138,7 +8138,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1523 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1523 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8149,7 +8149,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1523 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1523 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8168,7 +8168,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1524 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1524 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8179,7 +8179,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1524 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1524 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8198,7 +8198,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1525 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1525 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8209,7 +8209,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1525 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1525 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8228,7 +8228,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1528 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1528 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8239,7 +8239,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1528 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1528 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8258,7 +8258,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1529 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1529 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8269,7 +8269,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1529 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1529 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8288,7 +8288,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1530 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1530 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8299,7 +8299,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1530 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1530 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8318,7 +8318,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1533 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1533 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8329,7 +8329,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1533 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1533 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8348,7 +8348,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1534 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1534 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8359,7 +8359,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1534 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1534 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8378,7 +8378,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1535 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1535 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8389,7 +8389,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1535 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1535 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8408,7 +8408,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1536 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1536 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8419,7 +8419,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1536 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1536 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8438,7 +8438,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1537 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1537 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8449,7 +8449,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1537 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1537 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8468,7 +8468,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1538 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1538 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8479,7 +8479,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1538 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1538 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8498,7 +8498,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1539 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1539 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8509,7 +8509,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1539 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1539 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8528,7 +8528,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1540 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1540 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8539,7 +8539,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1540 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1540 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8558,7 +8558,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1541 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1541 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8569,7 +8569,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1541 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1541 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8588,7 +8588,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1542 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1542 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8599,7 +8599,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1542 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1542 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8618,7 +8618,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1543 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1543 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8629,7 +8629,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1543 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1543 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8648,7 +8648,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1544 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1544 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8659,7 +8659,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1544 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1544 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8678,7 +8678,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1545 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1545 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8689,7 +8689,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1545 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1545 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8708,7 +8708,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1546 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1546 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8719,7 +8719,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1546 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1546 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8738,7 +8738,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1547 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1547 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8749,7 +8749,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1547 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1547 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8768,7 +8768,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1548 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1548 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8779,7 +8779,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1548 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1548 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8798,7 +8798,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1549 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1549 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8809,7 +8809,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1549 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1549 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8828,7 +8828,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1550 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1550 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8839,7 +8839,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1550 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1550 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8858,7 +8858,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1552 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1552 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8869,7 +8869,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1552 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1552 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8888,7 +8888,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1553 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1553 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8899,7 +8899,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1553 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1553 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8918,7 +8918,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1554 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1554 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8929,7 +8929,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1554 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1554 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8948,7 +8948,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1555 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1555 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8959,7 +8959,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1555 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1555 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -8978,7 +8978,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1556 *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1556 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -8989,7 +8989,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1556 *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1556 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -9008,7 +9008,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSrvInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSrvInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -9620,7 +9620,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const u
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSrvInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSrvInfo *r)
{
int level;
uint32_t _level;
@@ -11369,7 +11369,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *nam
}
}
-NTSTATUS ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo0 *r)
+static NTSTATUS ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -11385,7 +11385,7 @@ NTSTATUS ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -11409,7 +11409,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo *r)
{
uint32_t cntr_disks_1;
if (ndr_flags & NDR_SCALARS) {
@@ -11430,7 +11430,7 @@ NTSTATUS ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo *r)
{
uint32_t _ptr_disks;
uint32_t cntr_disks_1;
@@ -11499,7 +11499,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_Statistics *r)
+static NTSTATUS ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_Statistics *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -11526,7 +11526,7 @@ NTSTATUS ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_Statistics *r)
+static NTSTATUS ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_Statistics *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -11577,7 +11577,7 @@ _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo0 *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -11608,7 +11608,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo0 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -11706,7 +11706,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr0 *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr0 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -11728,7 +11728,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -11793,7 +11793,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo1 *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -11831,7 +11831,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo1 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -11955,7 +11955,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr1 *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr1 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -11977,7 +11977,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -12042,7 +12042,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo2 *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -12081,7 +12081,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo2 *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo2 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -12207,7 +12207,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr2 *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr2 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -12229,7 +12229,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -12294,7 +12294,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo3 *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo3 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -12335,7 +12335,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo3 *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo3 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -12465,7 +12465,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr3 *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr3 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -12487,7 +12487,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr3 *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr3 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -12552,7 +12552,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportCtr *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportCtr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -12614,7 +12614,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportCtr *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportCtr *r)
{
int level;
uint32_t _level;
@@ -12768,7 +12768,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char
}
}
-NTSTATUS ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetRemoteTODInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetRemoteTODInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -12790,7 +12790,7 @@ NTSTATUS ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetRemoteTODInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetRemoteTODInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -12831,7 +12831,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -12883,7 +12883,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportInfo *r)
{
int level;
uint32_t _level;
@@ -12966,7 +12966,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const cha
}
}
-NTSTATUS ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevEnum *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -13004,7 +13004,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevEnum *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevEnum *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_resume_handle;
@@ -13171,7 +13171,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevGetInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevGetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -13196,7 +13196,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevGetInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevGetInfo *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -13281,7 +13281,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevControl *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevControl *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -13303,7 +13303,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevControl(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevControl *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevControl(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevControl *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -13370,7 +13370,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQEnum *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -13415,7 +13415,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQEnum *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQEnum *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_user;
@@ -13608,7 +13608,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -13637,7 +13637,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQGetInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQGetInfo *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -13730,7 +13730,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -13762,7 +13762,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQSetInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQSetInfo *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_parm_error;
@@ -13873,7 +13873,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurge *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurge *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -13894,7 +13894,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQPurge(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurge *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQPurge(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurge *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -13959,7 +13959,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
+static NTSTATUS ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -13984,7 +13984,7 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetCharDevQPurgeSelf(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurgeSelf *r)
+static NTSTATUS ndr_pull_srvsvc_NetCharDevQPurgeSelf(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurgeSelf *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -14057,7 +14057,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetConnEnum *r)
+static NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetConnEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -14102,7 +14102,7 @@ NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetConnEnum *r)
+static NTSTATUS ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetConnEnum *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_path;
@@ -14295,7 +14295,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileEnum *r)
+static NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -14347,7 +14347,7 @@ NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileEnum *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileEnum *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_path;
@@ -14566,7 +14566,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileGetInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileGetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -14588,7 +14588,7 @@ NTSTATUS ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileGetInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileGetInfo *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -14667,7 +14667,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileClose *r)
+static NTSTATUS ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileClose *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -14685,7 +14685,7 @@ NTSTATUS ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetFileClose(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileClose *r)
+static NTSTATUS ndr_pull_srvsvc_NetFileClose(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileClose *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -14744,7 +14744,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessEnum *r)
+static NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -14796,7 +14796,7 @@ NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessEnum *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessEnum *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_client;
@@ -15015,7 +15015,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessDel *r)
+static NTSTATUS ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessDel *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -15046,7 +15046,7 @@ NTSTATUS ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSessDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessDel *r)
+static NTSTATUS ndr_pull_srvsvc_NetSessDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessDel *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_client;
@@ -15155,7 +15155,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareAdd *r)
+static NTSTATUS ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareAdd *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -15183,7 +15183,7 @@ NTSTATUS ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareAdd *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareAdd *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_parm_error;
@@ -15286,7 +15286,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnumAll *r)
+static NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnumAll *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -15324,7 +15324,7 @@ NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnumAll *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnumAll *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_resume_handle;
@@ -15491,7 +15491,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareGetInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareGetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -15516,7 +15516,7 @@ NTSTATUS ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareGetInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareGetInfo *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -15601,7 +15601,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareSetInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareSetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -15633,7 +15633,7 @@ NTSTATUS ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareSetInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareSetInfo *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_parm_error;
@@ -15744,7 +15744,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDel *r)
+static NTSTATUS ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDel *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -15766,7 +15766,7 @@ NTSTATUS ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDel *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDel *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -15833,7 +15833,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelSticky *r)
+static NTSTATUS ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelSticky *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -15855,7 +15855,7 @@ NTSTATUS ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareDelSticky(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelSticky *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareDelSticky(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelSticky *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -15922,7 +15922,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareCheck *r)
+static NTSTATUS ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareCheck *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -15945,7 +15945,7 @@ NTSTATUS ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareCheck(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareCheck *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareCheck(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareCheck *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -16026,7 +16026,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvGetInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvGetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -16047,7 +16047,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvGetInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvGetInfo *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -16124,7 +16124,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvSetInfo *r)
+static NTSTATUS ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvSetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -16152,7 +16152,7 @@ NTSTATUS ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvSetInfo *r)
+static NTSTATUS ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvSetInfo *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_parm_error;
@@ -16255,7 +16255,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetDiskEnum *r)
+static NTSTATUS ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetDiskEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -16288,7 +16288,7 @@ NTSTATUS ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetDiskEnum *r)
+static NTSTATUS ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetDiskEnum *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_resume_handle;
@@ -16428,7 +16428,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerStatisticsGet *r)
+static NTSTATUS ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerStatisticsGet *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -16456,7 +16456,7 @@ NTSTATUS ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetServerStatisticsGet(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerStatisticsGet *r)
+static NTSTATUS ndr_pull_srvsvc_NetServerStatisticsGet(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerStatisticsGet *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_service;
@@ -16559,7 +16559,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportAdd *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportAdd *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -16579,7 +16579,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportAdd *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportAdd *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -16642,7 +16642,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportEnum *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -16680,7 +16680,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportEnum *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportEnum *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_resume_handle;
@@ -16847,7 +16847,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportDel *r)
+static NTSTATUS ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportDel *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -16866,7 +16866,7 @@ NTSTATUS ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetTransportDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportDel *r)
+static NTSTATUS ndr_pull_srvsvc_NetTransportDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportDel *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -16927,7 +16927,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct srvsvc_NetRemoteTOD *r)
+static NTSTATUS ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct srvsvc_NetRemoteTOD *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -16948,7 +16948,7 @@ NTSTATUS ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct srvsvc_NetRemoteTOD *r)
+static NTSTATUS ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct srvsvc_NetRemoteTOD *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_info;
@@ -17027,7 +17027,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetServiceBits *r)
+static NTSTATUS ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetServiceBits *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -17053,7 +17053,7 @@ NTSTATUS ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSetServiceBits(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetServiceBits *r)
+static NTSTATUS ndr_pull_srvsvc_NetSetServiceBits(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetServiceBits *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_transport;
@@ -17140,7 +17140,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathType *r)
+static NTSTATUS ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathType *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -17164,7 +17164,7 @@ NTSTATUS ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetPathType(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathType *r)
+static NTSTATUS ndr_pull_srvsvc_NetPathType(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathType *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -17247,7 +17247,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCanonicalize *r)
+static NTSTATUS ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCanonicalize *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -17280,7 +17280,7 @@ NTSTATUS ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetPathCanonicalize(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCanonicalize *r)
+static NTSTATUS ndr_pull_srvsvc_NetPathCanonicalize(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCanonicalize *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -17391,7 +17391,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCompare *r)
+static NTSTATUS ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCompare *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -17418,7 +17418,7 @@ NTSTATUS ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetPathCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCompare *r)
+static NTSTATUS ndr_pull_srvsvc_NetPathCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCompare *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -17495,7 +17495,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const struct srvsvc_NetNameValidate *r)
+static NTSTATUS ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const struct srvsvc_NetNameValidate *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -17518,7 +17518,7 @@ NTSTATUS ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetNameValidate(struct ndr_pull *ndr, int flags, struct srvsvc_NetNameValidate *r)
+static NTSTATUS ndr_pull_srvsvc_NetNameValidate(struct ndr_pull *ndr, int flags, struct srvsvc_NetNameValidate *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -17587,7 +17587,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
+static NTSTATUS ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
{
if (flags & NDR_IN) {
}
@@ -17597,7 +17597,7 @@ NTSTATUS ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRPRNAMECANONICALIZE *r)
+static NTSTATUS ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRPRNAMECANONICALIZE *r)
{
if (flags & NDR_IN) {
}
@@ -17628,7 +17628,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPRNameCompare *r)
+static NTSTATUS ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPRNameCompare *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -17655,7 +17655,7 @@ NTSTATUS ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetPRNameCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPRNameCompare *r)
+static NTSTATUS ndr_pull_srvsvc_NetPRNameCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPRNameCompare *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -17732,7 +17732,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnum *r)
+static NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -17770,7 +17770,7 @@ NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnum *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnum *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_resume_handle;
@@ -17937,7 +17937,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelStart *r)
+static NTSTATUS ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelStart *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -17963,7 +17963,7 @@ NTSTATUS ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelStart *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelStart *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_hnd;
@@ -18052,7 +18052,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelCommit *r)
+static NTSTATUS ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelCommit *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hnd));
@@ -18070,7 +18070,7 @@ NTSTATUS ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelCommit *r)
+static NTSTATUS ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelCommit *r)
{
uint32_t _ptr_hnd;
TALLOC_CTX *_mem_save_hnd_0;
@@ -18141,7 +18141,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetGetFileSecurity *r)
+static NTSTATUS ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetGetFileSecurity *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -18174,7 +18174,7 @@ NTSTATUS ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetGetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetGetFileSecurity *r)
+static NTSTATUS ndr_pull_srvsvc_NetGetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetGetFileSecurity *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_share;
@@ -18289,7 +18289,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetFileSecurity *r)
+static NTSTATUS ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetFileSecurity *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -18319,7 +18319,7 @@ NTSTATUS ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetSetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetFileSecurity *r)
+static NTSTATUS ndr_pull_srvsvc_NetSetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetFileSecurity *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_share;
@@ -18414,7 +18414,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerTransportAddEx *r)
+static NTSTATUS ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerTransportAddEx *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -18434,7 +18434,7 @@ NTSTATUS ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetServerTransportAddEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerTransportAddEx *r)
+static NTSTATUS ndr_pull_srvsvc_NetServerTransportAddEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerTransportAddEx *r)
{
uint32_t _ptr_server_unc;
TALLOC_CTX *_mem_save_server_unc_0;
@@ -18497,7 +18497,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, co
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
+static NTSTATUS ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
@@ -18531,7 +18531,7 @@ NTSTATUS ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int fla
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NetServerSetServiceBitsEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerSetServiceBitsEx *r)
+static NTSTATUS ndr_pull_srvsvc_NetServerSetServiceBitsEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerSetServiceBitsEx *r)
{
uint32_t _ptr_server_unc;
uint32_t _ptr_emulated_server_unc;
@@ -18646,7 +18646,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
{
if (flags & NDR_IN) {
}
@@ -18656,7 +18656,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSGETVERSION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSGETVERSION *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSGETVERSION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSGETVERSION *r)
{
if (flags & NDR_IN) {
}
@@ -18687,7 +18687,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
{
if (flags & NDR_IN) {
}
@@ -18697,7 +18697,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int f
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
{
if (flags & NDR_IN) {
}
@@ -18728,7 +18728,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
{
if (flags & NDR_IN) {
}
@@ -18738,7 +18738,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int f
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
{
if (flags & NDR_IN) {
}
@@ -18769,7 +18769,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
{
if (flags & NDR_IN) {
}
@@ -18779,7 +18779,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
{
if (flags & NDR_IN) {
}
@@ -18810,7 +18810,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
{
if (flags & NDR_IN) {
}
@@ -18820,7 +18820,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSSETSERVERINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETSERVERINFO *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSSETSERVERINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETSERVERINFO *r)
{
if (flags & NDR_IN) {
}
@@ -18851,7 +18851,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
{
if (flags & NDR_IN) {
}
@@ -18861,7 +18861,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATEEXITPOINT *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATEEXITPOINT *r)
{
if (flags & NDR_IN) {
}
@@ -18892,7 +18892,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
{
if (flags & NDR_IN) {
}
@@ -18902,7 +18902,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETEEXITPOINT *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETEEXITPOINT *r)
{
if (flags & NDR_IN) {
}
@@ -18933,7 +18933,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
{
if (flags & NDR_IN) {
}
@@ -18943,7 +18943,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMODIFYPREFIX *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMODIFYPREFIX *r)
{
if (flags & NDR_IN) {
}
@@ -18974,7 +18974,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
{
if (flags & NDR_IN) {
}
@@ -18984,7 +18984,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
{
if (flags & NDR_IN) {
}
@@ -19015,7 +19015,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
+static NTSTATUS ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
{
if (flags & NDR_IN) {
}
@@ -19025,7 +19025,7 @@ NTSTATUS ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
+static NTSTATUS ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
{
if (flags & NDR_IN) {
}
@@ -19056,7 +19056,7 @@ _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *nd
ndr->depth--;
}
-NTSTATUS ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
+static NTSTATUS ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
{
if (flags & NDR_IN) {
}
@@ -19066,7 +19066,7 @@ NTSTATUS ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
+static NTSTATUS ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
{
if (flags & NDR_IN) {
}
@@ -19097,14 +19097,14 @@ _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, c
ndr->depth--;
}
-const struct ndr_interface_call srvsvc_calls[] = {
+static const struct ndr_interface_call srvsvc_calls[] = {
{
"srvsvc_NetCharDevEnum",
sizeof(struct srvsvc_NetCharDevEnum),
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevEnum,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevEnum,
(ndr_print_function_t) ndr_print_srvsvc_NetCharDevEnum,
- False,
+ false,
},
{
"srvsvc_NetCharDevGetInfo",
@@ -19112,7 +19112,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevGetInfo,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevGetInfo,
(ndr_print_function_t) ndr_print_srvsvc_NetCharDevGetInfo,
- False,
+ false,
},
{
"srvsvc_NetCharDevControl",
@@ -19120,7 +19120,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevControl,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevControl,
(ndr_print_function_t) ndr_print_srvsvc_NetCharDevControl,
- False,
+ false,
},
{
"srvsvc_NetCharDevQEnum",
@@ -19128,7 +19128,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQEnum,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQEnum,
(ndr_print_function_t) ndr_print_srvsvc_NetCharDevQEnum,
- False,
+ false,
},
{
"srvsvc_NetCharDevQGetInfo",
@@ -19136,7 +19136,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQGetInfo,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQGetInfo,
(ndr_print_function_t) ndr_print_srvsvc_NetCharDevQGetInfo,
- False,
+ false,
},
{
"srvsvc_NetCharDevQSetInfo",
@@ -19144,7 +19144,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQSetInfo,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQSetInfo,
(ndr_print_function_t) ndr_print_srvsvc_NetCharDevQSetInfo,
- False,
+ false,
},
{
"srvsvc_NetCharDevQPurge",
@@ -19152,7 +19152,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurge,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurge,
(ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurge,
- False,
+ false,
},
{
"srvsvc_NetCharDevQPurgeSelf",
@@ -19160,7 +19160,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurgeSelf,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurgeSelf,
(ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurgeSelf,
- False,
+ false,
},
{
"srvsvc_NetConnEnum",
@@ -19168,7 +19168,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetConnEnum,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetConnEnum,
(ndr_print_function_t) ndr_print_srvsvc_NetConnEnum,
- False,
+ false,
},
{
"srvsvc_NetFileEnum",
@@ -19176,7 +19176,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileEnum,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileEnum,
(ndr_print_function_t) ndr_print_srvsvc_NetFileEnum,
- False,
+ false,
},
{
"srvsvc_NetFileGetInfo",
@@ -19184,7 +19184,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileGetInfo,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileGetInfo,
(ndr_print_function_t) ndr_print_srvsvc_NetFileGetInfo,
- False,
+ false,
},
{
"srvsvc_NetFileClose",
@@ -19192,7 +19192,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileClose,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileClose,
(ndr_print_function_t) ndr_print_srvsvc_NetFileClose,
- False,
+ false,
},
{
"srvsvc_NetSessEnum",
@@ -19200,7 +19200,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessEnum,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessEnum,
(ndr_print_function_t) ndr_print_srvsvc_NetSessEnum,
- False,
+ false,
},
{
"srvsvc_NetSessDel",
@@ -19208,7 +19208,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessDel,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessDel,
(ndr_print_function_t) ndr_print_srvsvc_NetSessDel,
- False,
+ false,
},
{
"srvsvc_NetShareAdd",
@@ -19216,7 +19216,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareAdd,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareAdd,
(ndr_print_function_t) ndr_print_srvsvc_NetShareAdd,
- False,
+ false,
},
{
"srvsvc_NetShareEnumAll",
@@ -19224,7 +19224,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnumAll,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnumAll,
(ndr_print_function_t) ndr_print_srvsvc_NetShareEnumAll,
- False,
+ false,
},
{
"srvsvc_NetShareGetInfo",
@@ -19232,7 +19232,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareGetInfo,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareGetInfo,
(ndr_print_function_t) ndr_print_srvsvc_NetShareGetInfo,
- False,
+ false,
},
{
"srvsvc_NetShareSetInfo",
@@ -19240,7 +19240,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareSetInfo,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareSetInfo,
(ndr_print_function_t) ndr_print_srvsvc_NetShareSetInfo,
- False,
+ false,
},
{
"srvsvc_NetShareDel",
@@ -19248,7 +19248,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDel,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDel,
(ndr_print_function_t) ndr_print_srvsvc_NetShareDel,
- False,
+ false,
},
{
"srvsvc_NetShareDelSticky",
@@ -19256,7 +19256,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelSticky,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelSticky,
(ndr_print_function_t) ndr_print_srvsvc_NetShareDelSticky,
- False,
+ false,
},
{
"srvsvc_NetShareCheck",
@@ -19264,7 +19264,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareCheck,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareCheck,
(ndr_print_function_t) ndr_print_srvsvc_NetShareCheck,
- False,
+ false,
},
{
"srvsvc_NetSrvGetInfo",
@@ -19272,7 +19272,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvGetInfo,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvGetInfo,
(ndr_print_function_t) ndr_print_srvsvc_NetSrvGetInfo,
- False,
+ false,
},
{
"srvsvc_NetSrvSetInfo",
@@ -19280,7 +19280,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvSetInfo,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvSetInfo,
(ndr_print_function_t) ndr_print_srvsvc_NetSrvSetInfo,
- False,
+ false,
},
{
"srvsvc_NetDiskEnum",
@@ -19288,7 +19288,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetDiskEnum,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetDiskEnum,
(ndr_print_function_t) ndr_print_srvsvc_NetDiskEnum,
- False,
+ false,
},
{
"srvsvc_NetServerStatisticsGet",
@@ -19296,7 +19296,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerStatisticsGet,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerStatisticsGet,
(ndr_print_function_t) ndr_print_srvsvc_NetServerStatisticsGet,
- False,
+ false,
},
{
"srvsvc_NetTransportAdd",
@@ -19304,7 +19304,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportAdd,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportAdd,
(ndr_print_function_t) ndr_print_srvsvc_NetTransportAdd,
- False,
+ false,
},
{
"srvsvc_NetTransportEnum",
@@ -19312,7 +19312,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportEnum,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportEnum,
(ndr_print_function_t) ndr_print_srvsvc_NetTransportEnum,
- False,
+ false,
},
{
"srvsvc_NetTransportDel",
@@ -19320,7 +19320,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportDel,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportDel,
(ndr_print_function_t) ndr_print_srvsvc_NetTransportDel,
- False,
+ false,
},
{
"srvsvc_NetRemoteTOD",
@@ -19328,7 +19328,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetRemoteTOD,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetRemoteTOD,
(ndr_print_function_t) ndr_print_srvsvc_NetRemoteTOD,
- False,
+ false,
},
{
"srvsvc_NetSetServiceBits",
@@ -19336,7 +19336,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetServiceBits,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetServiceBits,
(ndr_print_function_t) ndr_print_srvsvc_NetSetServiceBits,
- False,
+ false,
},
{
"srvsvc_NetPathType",
@@ -19344,7 +19344,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathType,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathType,
(ndr_print_function_t) ndr_print_srvsvc_NetPathType,
- False,
+ false,
},
{
"srvsvc_NetPathCanonicalize",
@@ -19352,7 +19352,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCanonicalize,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCanonicalize,
(ndr_print_function_t) ndr_print_srvsvc_NetPathCanonicalize,
- False,
+ false,
},
{
"srvsvc_NetPathCompare",
@@ -19360,7 +19360,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCompare,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCompare,
(ndr_print_function_t) ndr_print_srvsvc_NetPathCompare,
- False,
+ false,
},
{
"srvsvc_NetNameValidate",
@@ -19368,7 +19368,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetNameValidate,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetNameValidate,
(ndr_print_function_t) ndr_print_srvsvc_NetNameValidate,
- False,
+ false,
},
{
"srvsvc_NETRPRNAMECANONICALIZE",
@@ -19376,7 +19376,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRPRNAMECANONICALIZE,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRPRNAMECANONICALIZE,
(ndr_print_function_t) ndr_print_srvsvc_NETRPRNAMECANONICALIZE,
- False,
+ false,
},
{
"srvsvc_NetPRNameCompare",
@@ -19384,7 +19384,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetPRNameCompare,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPRNameCompare,
(ndr_print_function_t) ndr_print_srvsvc_NetPRNameCompare,
- False,
+ false,
},
{
"srvsvc_NetShareEnum",
@@ -19392,7 +19392,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnum,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnum,
(ndr_print_function_t) ndr_print_srvsvc_NetShareEnum,
- False,
+ false,
},
{
"srvsvc_NetShareDelStart",
@@ -19400,7 +19400,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelStart,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelStart,
(ndr_print_function_t) ndr_print_srvsvc_NetShareDelStart,
- False,
+ false,
},
{
"srvsvc_NetShareDelCommit",
@@ -19408,7 +19408,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelCommit,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelCommit,
(ndr_print_function_t) ndr_print_srvsvc_NetShareDelCommit,
- False,
+ false,
},
{
"srvsvc_NetGetFileSecurity",
@@ -19416,7 +19416,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetGetFileSecurity,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetGetFileSecurity,
(ndr_print_function_t) ndr_print_srvsvc_NetGetFileSecurity,
- False,
+ false,
},
{
"srvsvc_NetSetFileSecurity",
@@ -19424,7 +19424,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetFileSecurity,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetFileSecurity,
(ndr_print_function_t) ndr_print_srvsvc_NetSetFileSecurity,
- False,
+ false,
},
{
"srvsvc_NetServerTransportAddEx",
@@ -19432,7 +19432,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerTransportAddEx,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerTransportAddEx,
(ndr_print_function_t) ndr_print_srvsvc_NetServerTransportAddEx,
- False,
+ false,
},
{
"srvsvc_NetServerSetServiceBitsEx",
@@ -19440,7 +19440,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerSetServiceBitsEx,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerSetServiceBitsEx,
(ndr_print_function_t) ndr_print_srvsvc_NetServerSetServiceBitsEx,
- False,
+ false,
},
{
"srvsvc_NETRDFSGETVERSION",
@@ -19448,7 +19448,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSGETVERSION,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSGETVERSION,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSGETVERSION,
- False,
+ false,
},
{
"srvsvc_NETRDFSCREATELOCALPARTITION",
@@ -19456,7 +19456,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION,
- False,
+ false,
},
{
"srvsvc_NETRDFSDELETELOCALPARTITION",
@@ -19464,7 +19464,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION,
- False,
+ false,
},
{
"srvsvc_NETRDFSSETLOCALVOLUMESTATE",
@@ -19472,7 +19472,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
- False,
+ false,
},
{
"srvsvc_NETRDFSSETSERVERINFO",
@@ -19480,7 +19480,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETSERVERINFO,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETSERVERINFO,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETSERVERINFO,
- False,
+ false,
},
{
"srvsvc_NETRDFSCREATEEXITPOINT",
@@ -19488,7 +19488,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATEEXITPOINT,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATEEXITPOINT,
- False,
+ false,
},
{
"srvsvc_NETRDFSDELETEEXITPOINT",
@@ -19496,7 +19496,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETEEXITPOINT,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETEEXITPOINT,
- False,
+ false,
},
{
"srvsvc_NETRDFSMODIFYPREFIX",
@@ -19504,7 +19504,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMODIFYPREFIX,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMODIFYPREFIX,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSMODIFYPREFIX,
- False,
+ false,
},
{
"srvsvc_NETRDFSFIXLOCALVOLUME",
@@ -19512,7 +19512,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME,
- False,
+ false,
},
{
"srvsvc_NETRDFSMANAGERREPORTSITEINFO",
@@ -19520,7 +19520,7 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
(ndr_print_function_t) ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
- False,
+ false,
},
{
"srvsvc_NETRSERVERTRANSPORTDELEX",
@@ -19528,27 +19528,27 @@ const struct ndr_interface_call srvsvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX,
(ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX,
(ndr_print_function_t) ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const srvsvc_endpoint_strings[] = {
+static const char * const srvsvc_endpoint_strings[] = {
"ncacn_np:[\\pipe\\srvsvc]",
"ncacn_ip_tcp:",
"ncalrpc:",
};
-const struct ndr_interface_string_array srvsvc_endpoints = {
+static const struct ndr_interface_string_array srvsvc_endpoints = {
.count = 3,
.names = srvsvc_endpoint_strings
};
-const char * const srvsvc_authservice_strings[] = {
+static const char * const srvsvc_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array srvsvc_authservices = {
+static const struct ndr_interface_string_array srvsvc_authservices = {
.count = 3,
.names = srvsvc_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_svcctl.c b/source/librpc/gen_ndr/ndr_svcctl.c
index 5d98c465aa6..fd6dc1b20ca 100644
--- a/source/librpc/gen_ndr/ndr_svcctl.c
+++ b/source/librpc/gen_ndr/ndr_svcctl.c
@@ -3,7 +3,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_svcctl.h"
-NTSTATUS ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_LOCK_STATUS *r)
+static NTSTATUS ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_LOCK_STATUS *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -22,7 +22,7 @@ NTSTATUS ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_SERVICE_LOCK_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_LOCK_STATUS *r)
+static NTSTATUS ndr_pull_SERVICE_LOCK_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_LOCK_STATUS *r)
{
uint32_t _ptr_lock_owner;
TALLOC_CTX *_mem_save_lock_owner_0;
@@ -69,7 +69,7 @@ _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS *r)
+static NTSTATUS ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -86,7 +86,7 @@ NTSTATUS ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS *r)
+static NTSTATUS ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -117,7 +117,7 @@ _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_ENUM_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUS *r)
+static NTSTATUS ndr_push_ENUM_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUS *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -158,7 +158,7 @@ NTSTATUS ndr_push_ENUM_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_ENUM_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUS *r)
+static NTSTATUS ndr_pull_ENUM_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUS *r)
{
uint32_t _ptr_service_name;
TALLOC_CTX *_mem_save_service_name_0;
@@ -295,7 +295,7 @@ _PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
+static NTSTATUS ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -309,7 +309,7 @@ NTSTATUS ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, int flags, struct svcctl_CloseServiceHandle *r)
+static NTSTATUS ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, int flags, struct svcctl_CloseServiceHandle *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -367,7 +367,7 @@ _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const struct svcctl_ControlService *r)
+static NTSTATUS ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const struct svcctl_ControlService *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -382,7 +382,7 @@ NTSTATUS ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, int flags, struct svcctl_ControlService *r)
+static NTSTATUS ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, int flags, struct svcctl_ControlService *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_service_status_0;
@@ -443,7 +443,7 @@ _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int flags, const struct svcctl_DeleteService *r)
+static NTSTATUS ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int flags, const struct svcctl_DeleteService *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -455,7 +455,7 @@ NTSTATUS ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int flags, struct svcctl_DeleteService *r)
+static NTSTATUS ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int flags, struct svcctl_DeleteService *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -498,7 +498,7 @@ _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_LockServiceDatabase *r)
+static NTSTATUS ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_LockServiceDatabase *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -512,7 +512,7 @@ NTSTATUS ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_LockServiceDatabase *r)
+static NTSTATUS ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_LockServiceDatabase *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_lock_0;
@@ -571,7 +571,7 @@ _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
{
if (flags & NDR_IN) {
}
@@ -581,7 +581,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
{
if (flags & NDR_IN) {
}
@@ -612,7 +612,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
+static NTSTATUS ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
{
if (flags & NDR_IN) {
}
@@ -622,7 +622,7 @@ NTSTATUS ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
+static NTSTATUS ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
{
if (flags & NDR_IN) {
}
@@ -653,7 +653,7 @@ _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, c
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatus *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatus *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -667,7 +667,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatus *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatus *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_service_status_0;
@@ -726,7 +726,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceStatus *r)
+static NTSTATUS ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceStatus *r)
{
if (flags & NDR_IN) {
}
@@ -736,7 +736,7 @@ NTSTATUS ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceStatus *r)
+static NTSTATUS ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceStatus *r)
{
if (flags & NDR_IN) {
}
@@ -767,7 +767,7 @@ _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_UnlockServiceDatabase *r)
+static NTSTATUS ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_UnlockServiceDatabase *r)
{
if (flags & NDR_IN) {
if (r->in.lock == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -781,7 +781,7 @@ NTSTATUS ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_UnlockServiceDatabase *r)
+static NTSTATUS ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_UnlockServiceDatabase *r)
{
TALLOC_CTX *_mem_save_lock_0;
if (flags & NDR_IN) {
@@ -839,7 +839,7 @@ _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags, const struct svcctl_NotifyBootConfigStatus *r)
+static NTSTATUS ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags, const struct svcctl_NotifyBootConfigStatus *r)
{
if (flags & NDR_IN) {
}
@@ -849,7 +849,7 @@ NTSTATUS ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, int flags, struct svcctl_NotifyBootConfigStatus *r)
+static NTSTATUS ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, int flags, struct svcctl_NotifyBootConfigStatus *r)
{
if (flags & NDR_IN) {
}
@@ -880,7 +880,7 @@ _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsW *r)
+static NTSTATUS ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -895,7 +895,7 @@ NTSTATUS ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsW *r)
+static NTSTATUS ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsW *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -944,7 +944,7 @@ _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r)
+static NTSTATUS ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1003,7 +1003,7 @@ NTSTATUS ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r)
+static NTSTATUS ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r)
{
uint32_t _ptr_binary_path;
uint32_t _ptr_load_order_group;
@@ -1224,7 +1224,7 @@ _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceW *r)
+static NTSTATUS ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceW *r)
{
if (flags & NDR_IN) {
if (r->in.scmanager_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1291,7 +1291,7 @@ NTSTATUS ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceW *r)
+static NTSTATUS ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceW *r)
{
uint32_t _ptr_DisplayName;
uint32_t _ptr_LoadOrderGroupKey;
@@ -1544,7 +1544,7 @@ _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesW *r)
+static NTSTATUS ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesW *r)
{
if (flags & NDR_IN) {
if (r->in.service == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1566,7 +1566,7 @@ NTSTATUS ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
+static NTSTATUS ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
{
uint32_t _ptr_service_status;
TALLOC_CTX *_mem_save_service_0;
@@ -1663,7 +1663,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusW *r)
+static NTSTATUS ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1692,7 +1692,7 @@ NTSTATUS ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusW *r)
+static NTSTATUS ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusW *r)
{
uint32_t _ptr_resume_handle;
TALLOC_CTX *_mem_save_handle_0;
@@ -1816,7 +1816,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerW *r)
+static NTSTATUS ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerW *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
@@ -1843,7 +1843,7 @@ NTSTATUS ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerW *r)
+static NTSTATUS ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerW *r)
{
uint32_t _ptr_MachineName;
uint32_t _ptr_DatabaseName;
@@ -1944,7 +1944,7 @@ _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceW *r)
+static NTSTATUS ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceW *r)
{
if (flags & NDR_IN) {
if (r->in.scmanager_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1963,7 +1963,7 @@ NTSTATUS ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceW *r)
+static NTSTATUS ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceW *r)
{
TALLOC_CTX *_mem_save_scmanager_handle_0;
TALLOC_CTX *_mem_save_handle_0;
@@ -2032,7 +2032,7 @@ _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigW *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2048,7 +2048,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_bytes_needed_0;
@@ -2112,7 +2112,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusW *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2129,7 +2129,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusW *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusW *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_lock_status_0;
@@ -2204,7 +2204,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, co
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceW *r)
+static NTSTATUS ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2224,7 +2224,7 @@ NTSTATUS ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceW *r)
+static NTSTATUS ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceW *r)
{
uint32_t _ptr_Arguments;
TALLOC_CTX *_mem_save_handle_0;
@@ -2295,7 +2295,7 @@ _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameW *r)
+static NTSTATUS ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2329,7 +2329,7 @@ NTSTATUS ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameW *r)
+static NTSTATUS ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameW *r)
{
uint32_t _ptr_service_name;
uint32_t _ptr_display_name;
@@ -2463,7 +2463,7 @@ _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameW *r)
+static NTSTATUS ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameW *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2497,7 +2497,7 @@ NTSTATUS ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameW *r)
+static NTSTATUS ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameW *r)
{
uint32_t _ptr_service_name;
uint32_t _ptr_key_name;
@@ -2631,7 +2631,7 @@ _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsA *r)
+static NTSTATUS ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2646,7 +2646,7 @@ NTSTATUS ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsA *r)
+static NTSTATUS ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsA *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -2695,7 +2695,7 @@ _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigA *r)
+static NTSTATUS ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2754,7 +2754,7 @@ NTSTATUS ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigA *r)
+static NTSTATUS ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigA *r)
{
uint32_t _ptr_binary_path;
uint32_t _ptr_load_order_group;
@@ -2975,7 +2975,7 @@ _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceA *r)
+static NTSTATUS ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3044,7 +3044,7 @@ NTSTATUS ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceA *r)
+static NTSTATUS ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceA *r)
{
uint32_t _ptr_ServiceName;
uint32_t _ptr_DisplayName;
@@ -3299,7 +3299,7 @@ _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesA *r)
+static NTSTATUS ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesA *r)
{
if (flags & NDR_IN) {
if (r->in.service == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3321,7 +3321,7 @@ NTSTATUS ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesA *r)
+static NTSTATUS ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesA *r)
{
uint32_t _ptr_service_status;
TALLOC_CTX *_mem_save_service_0;
@@ -3418,7 +3418,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusA *r)
+static NTSTATUS ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3447,7 +3447,7 @@ NTSTATUS ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusA *r)
+static NTSTATUS ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusA *r)
{
uint32_t _ptr_resume_handle;
TALLOC_CTX *_mem_save_handle_0;
@@ -3571,7 +3571,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerA *r)
+static NTSTATUS ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerA *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
@@ -3598,7 +3598,7 @@ NTSTATUS ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerA *r)
+static NTSTATUS ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerA *r)
{
uint32_t _ptr_MachineName;
uint32_t _ptr_DatabaseName;
@@ -3699,7 +3699,7 @@ _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceA *r)
+static NTSTATUS ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceA *r)
{
if (flags & NDR_IN) {
if (r->in.scmanager_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3719,7 +3719,7 @@ NTSTATUS ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceA *r)
+static NTSTATUS ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceA *r)
{
uint32_t _ptr_ServiceName;
TALLOC_CTX *_mem_save_scmanager_handle_0;
@@ -3790,7 +3790,7 @@ _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigA *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3806,7 +3806,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_bytes_needed_0;
@@ -3870,7 +3870,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusA *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3887,7 +3887,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusA *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusA *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_lock_status_0;
@@ -3962,7 +3962,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, co
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceA *r)
+static NTSTATUS ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3982,7 +3982,7 @@ NTSTATUS ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceA *r)
+static NTSTATUS ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceA *r)
{
uint32_t _ptr_Arguments;
TALLOC_CTX *_mem_save_handle_0;
@@ -4053,7 +4053,7 @@ _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameA *r)
+static NTSTATUS ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4087,7 +4087,7 @@ NTSTATUS ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameA *r)
+static NTSTATUS ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameA *r)
{
uint32_t _ptr_service_name;
uint32_t _ptr_display_name;
@@ -4221,7 +4221,7 @@ _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameA *r)
+static NTSTATUS ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameA *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4255,7 +4255,7 @@ NTSTATUS ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameA *r)
+static NTSTATUS ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameA *r)
{
uint32_t _ptr_service_name;
uint32_t _ptr_key_name;
@@ -4389,7 +4389,7 @@ _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
+static NTSTATUS ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
{
if (flags & NDR_IN) {
}
@@ -4399,7 +4399,7 @@ NTSTATUS ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, int flags, struct svcctl_GetCurrentGroupeStateW *r)
+static NTSTATUS ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, int flags, struct svcctl_GetCurrentGroupeStateW *r)
{
if (flags & NDR_IN) {
}
@@ -4430,7 +4430,7 @@ _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServiceGroupW *r)
+static NTSTATUS ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServiceGroupW *r)
{
if (flags & NDR_IN) {
}
@@ -4440,7 +4440,7 @@ NTSTATUS ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServiceGroupW *r)
+static NTSTATUS ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServiceGroupW *r)
{
if (flags & NDR_IN) {
}
@@ -4471,7 +4471,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2A *r)
+static NTSTATUS ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2A *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4488,7 +4488,7 @@ NTSTATUS ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2A *r)
+static NTSTATUS ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2A *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -4553,7 +4553,7 @@ _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2W *r)
+static NTSTATUS ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2W *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4570,7 +4570,7 @@ NTSTATUS ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2W *r)
+static NTSTATUS ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2W *r)
{
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
@@ -4635,7 +4635,7 @@ _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2A *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2A *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4652,7 +4652,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_bytes_needed_0;
@@ -4718,7 +4718,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2W *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2W *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4735,7 +4735,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_bytes_needed_0;
@@ -4801,7 +4801,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatusEx *r)
+static NTSTATUS ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatusEx *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4818,7 +4818,7 @@ NTSTATUS ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
+static NTSTATUS ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_bytes_needed_0;
@@ -4884,7 +4884,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExA *r)
+static NTSTATUS ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExA *r)
{
if (flags & NDR_IN) {
if (r->in.scmanager == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -4920,7 +4920,7 @@ NTSTATUS ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExA *r)
+static NTSTATUS ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExA *r)
{
uint32_t _ptr_resume_handle;
uint32_t _ptr_group_name;
@@ -5067,7 +5067,7 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExW *r)
+static NTSTATUS ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExW *r)
{
if (flags & NDR_IN) {
if (r->in.scmanager == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -5103,7 +5103,7 @@ NTSTATUS ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExW *r)
+static NTSTATUS ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExW *r)
{
uint32_t _ptr_resume_handle;
uint32_t _ptr_group_name;
@@ -5250,7 +5250,7 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const struct svcctl_SCSendTSMessage *r)
+static NTSTATUS ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const struct svcctl_SCSendTSMessage *r)
{
if (flags & NDR_IN) {
}
@@ -5260,7 +5260,7 @@ NTSTATUS ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, int flags, struct svcctl_SCSendTSMessage *r)
+static NTSTATUS ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, int flags, struct svcctl_SCSendTSMessage *r)
{
if (flags & NDR_IN) {
}
@@ -5291,14 +5291,14 @@ _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char
ndr->depth--;
}
-const struct ndr_interface_call svcctl_calls[] = {
+static const struct ndr_interface_call svcctl_calls[] = {
{
"svcctl_CloseServiceHandle",
sizeof(struct svcctl_CloseServiceHandle),
(ndr_push_flags_fn_t) ndr_push_svcctl_CloseServiceHandle,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseServiceHandle,
(ndr_print_function_t) ndr_print_svcctl_CloseServiceHandle,
- False,
+ false,
},
{
"svcctl_ControlService",
@@ -5306,7 +5306,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_ControlService,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlService,
(ndr_print_function_t) ndr_print_svcctl_ControlService,
- False,
+ false,
},
{
"svcctl_DeleteService",
@@ -5314,7 +5314,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_DeleteService,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_DeleteService,
(ndr_print_function_t) ndr_print_svcctl_DeleteService,
- False,
+ false,
},
{
"svcctl_LockServiceDatabase",
@@ -5322,7 +5322,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_LockServiceDatabase,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_LockServiceDatabase,
(ndr_print_function_t) ndr_print_svcctl_LockServiceDatabase,
- False,
+ false,
},
{
"svcctl_QueryServiceObjectSecurity",
@@ -5330,7 +5330,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceObjectSecurity,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceObjectSecurity,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceObjectSecurity,
- False,
+ false,
},
{
"svcctl_SetServiceObjectSecurity",
@@ -5338,7 +5338,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceObjectSecurity,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceObjectSecurity,
(ndr_print_function_t) ndr_print_svcctl_SetServiceObjectSecurity,
- False,
+ false,
},
{
"svcctl_QueryServiceStatus",
@@ -5346,7 +5346,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatus,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatus,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceStatus,
- False,
+ false,
},
{
"svcctl_SetServiceStatus",
@@ -5354,7 +5354,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceStatus,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceStatus,
(ndr_print_function_t) ndr_print_svcctl_SetServiceStatus,
- False,
+ false,
},
{
"svcctl_UnlockServiceDatabase",
@@ -5362,7 +5362,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_UnlockServiceDatabase,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_UnlockServiceDatabase,
(ndr_print_function_t) ndr_print_svcctl_UnlockServiceDatabase,
- False,
+ false,
},
{
"svcctl_NotifyBootConfigStatus",
@@ -5370,7 +5370,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_NotifyBootConfigStatus,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyBootConfigStatus,
(ndr_print_function_t) ndr_print_svcctl_NotifyBootConfigStatus,
- False,
+ false,
},
{
"svcctl_SCSetServiceBitsW",
@@ -5378,7 +5378,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsW,
(ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsW,
- False,
+ false,
},
{
"svcctl_ChangeServiceConfigW",
@@ -5386,7 +5386,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigW,
(ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigW,
- False,
+ false,
},
{
"svcctl_CreateServiceW",
@@ -5394,7 +5394,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceW,
(ndr_print_function_t) ndr_print_svcctl_CreateServiceW,
- False,
+ false,
},
{
"svcctl_EnumDependentServicesW",
@@ -5402,7 +5402,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesW,
(ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesW,
- False,
+ false,
},
{
"svcctl_EnumServicesStatusW",
@@ -5410,7 +5410,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusW,
(ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusW,
- False,
+ false,
},
{
"svcctl_OpenSCManagerW",
@@ -5418,7 +5418,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerW,
(ndr_print_function_t) ndr_print_svcctl_OpenSCManagerW,
- False,
+ false,
},
{
"svcctl_OpenServiceW",
@@ -5426,7 +5426,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceW,
(ndr_print_function_t) ndr_print_svcctl_OpenServiceW,
- False,
+ false,
},
{
"svcctl_QueryServiceConfigW",
@@ -5434,7 +5434,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigW,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigW,
- False,
+ false,
},
{
"svcctl_QueryServiceLockStatusW",
@@ -5442,7 +5442,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusW,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusW,
- False,
+ false,
},
{
"svcctl_StartServiceW",
@@ -5450,7 +5450,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceW,
(ndr_print_function_t) ndr_print_svcctl_StartServiceW,
- False,
+ false,
},
{
"svcctl_GetServiceDisplayNameW",
@@ -5458,7 +5458,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameW,
(ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameW,
- False,
+ false,
},
{
"svcctl_GetServiceKeyNameW",
@@ -5466,7 +5466,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameW,
(ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameW,
- False,
+ false,
},
{
"svcctl_SCSetServiceBitsA",
@@ -5474,7 +5474,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsA,
(ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsA,
- False,
+ false,
},
{
"svcctl_ChangeServiceConfigA",
@@ -5482,7 +5482,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigA,
(ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigA,
- False,
+ false,
},
{
"svcctl_CreateServiceA",
@@ -5490,7 +5490,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceA,
(ndr_print_function_t) ndr_print_svcctl_CreateServiceA,
- False,
+ false,
},
{
"svcctl_EnumDependentServicesA",
@@ -5498,7 +5498,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesA,
(ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesA,
- False,
+ false,
},
{
"svcctl_EnumServicesStatusA",
@@ -5506,7 +5506,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusA,
(ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusA,
- False,
+ false,
},
{
"svcctl_OpenSCManagerA",
@@ -5514,7 +5514,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerA,
(ndr_print_function_t) ndr_print_svcctl_OpenSCManagerA,
- False,
+ false,
},
{
"svcctl_OpenServiceA",
@@ -5522,7 +5522,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceA,
(ndr_print_function_t) ndr_print_svcctl_OpenServiceA,
- False,
+ false,
},
{
"svcctl_QueryServiceConfigA",
@@ -5530,7 +5530,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigA,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigA,
- False,
+ false,
},
{
"svcctl_QueryServiceLockStatusA",
@@ -5538,7 +5538,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusA,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusA,
- False,
+ false,
},
{
"svcctl_StartServiceA",
@@ -5546,7 +5546,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceA,
(ndr_print_function_t) ndr_print_svcctl_StartServiceA,
- False,
+ false,
},
{
"svcctl_GetServiceDisplayNameA",
@@ -5554,7 +5554,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameA,
(ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameA,
- False,
+ false,
},
{
"svcctl_GetServiceKeyNameA",
@@ -5562,7 +5562,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameA,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameA,
(ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameA,
- False,
+ false,
},
{
"svcctl_GetCurrentGroupeStateW",
@@ -5570,7 +5570,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_GetCurrentGroupeStateW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_GetCurrentGroupeStateW,
(ndr_print_function_t) ndr_print_svcctl_GetCurrentGroupeStateW,
- False,
+ false,
},
{
"svcctl_EnumServiceGroupW",
@@ -5578,7 +5578,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_EnumServiceGroupW,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServiceGroupW,
(ndr_print_function_t) ndr_print_svcctl_EnumServiceGroupW,
- False,
+ false,
},
{
"svcctl_ChangeServiceConfig2A",
@@ -5586,7 +5586,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2A,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2A,
(ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2A,
- False,
+ false,
},
{
"svcctl_ChangeServiceConfig2W",
@@ -5594,7 +5594,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2W,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2W,
(ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2W,
- False,
+ false,
},
{
"svcctl_QueryServiceConfig2A",
@@ -5602,7 +5602,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2A,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2A,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2A,
- False,
+ false,
},
{
"svcctl_QueryServiceConfig2W",
@@ -5610,7 +5610,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2W,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2W,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2W,
- False,
+ false,
},
{
"svcctl_QueryServiceStatusEx",
@@ -5618,7 +5618,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatusEx,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatusEx,
(ndr_print_function_t) ndr_print_svcctl_QueryServiceStatusEx,
- False,
+ false,
},
{
"EnumServicesStatusExA",
@@ -5626,7 +5626,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExA,
(ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExA,
(ndr_print_function_t) ndr_print_EnumServicesStatusExA,
- False,
+ false,
},
{
"EnumServicesStatusExW",
@@ -5634,7 +5634,7 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExW,
(ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExW,
(ndr_print_function_t) ndr_print_EnumServicesStatusExW,
- False,
+ false,
},
{
"svcctl_SCSendTSMessage",
@@ -5642,26 +5642,26 @@ const struct ndr_interface_call svcctl_calls[] = {
(ndr_push_flags_fn_t) ndr_push_svcctl_SCSendTSMessage,
(ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSendTSMessage,
(ndr_print_function_t) ndr_print_svcctl_SCSendTSMessage,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const svcctl_endpoint_strings[] = {
+static const char * const svcctl_endpoint_strings[] = {
"ncacn_np:[\\pipe\\svcctl]",
"ncalrpc:",
};
-const struct ndr_interface_string_array svcctl_endpoints = {
+static const struct ndr_interface_string_array svcctl_endpoints = {
.count = 2,
.names = svcctl_endpoint_strings
};
-const char * const svcctl_authservice_strings[] = {
+static const char * const svcctl_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array svcctl_authservices = {
+static const struct ndr_interface_string_array svcctl_authservices = {
.count = 2,
.names = svcctl_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_unixinfo.c b/source/librpc/gen_ndr/ndr_unixinfo.c
index f41248dbd11..a26b6a6d2de 100644
--- a/source/librpc/gen_ndr/ndr_unixinfo.c
+++ b/source/librpc/gen_ndr/ndr_unixinfo.c
@@ -4,7 +4,7 @@
#include "librpc/gen_ndr/ndr_unixinfo.h"
#include "librpc/gen_ndr/ndr_security.h"
-NTSTATUS ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, const struct unixinfo_GetPWUidInfo *r)
+static NTSTATUS ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, const struct unixinfo_GetPWUidInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -27,7 +27,7 @@ NTSTATUS ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, int ndr_flags, struct unixinfo_GetPWUidInfo *r)
+static NTSTATUS ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, int ndr_flags, struct unixinfo_GetPWUidInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -60,7 +60,7 @@ _PUBLIC_ void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToUid *r)
+static NTSTATUS ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToUid *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
@@ -73,7 +73,7 @@ NTSTATUS ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToUid *r)
+static NTSTATUS ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToUid *r)
{
TALLOC_CTX *_mem_save_uid_0;
if (flags & NDR_IN) {
@@ -122,7 +122,7 @@ _PUBLIC_ void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_UidToSid *r)
+static NTSTATUS ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_UidToSid *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
@@ -135,7 +135,7 @@ NTSTATUS ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_UidToSid *r)
+static NTSTATUS ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_UidToSid *r)
{
TALLOC_CTX *_mem_save_sid_0;
if (flags & NDR_IN) {
@@ -184,7 +184,7 @@ _PUBLIC_ void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToGid *r)
+static NTSTATUS ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToGid *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
@@ -197,7 +197,7 @@ NTSTATUS ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToGid *r)
+static NTSTATUS ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToGid *r)
{
TALLOC_CTX *_mem_save_gid_0;
if (flags & NDR_IN) {
@@ -246,7 +246,7 @@ _PUBLIC_ void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_GidToSid *r)
+static NTSTATUS ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_GidToSid *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
@@ -259,7 +259,7 @@ NTSTATUS ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_GidToSid *r)
+static NTSTATUS ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_GidToSid *r)
{
TALLOC_CTX *_mem_save_sid_0;
if (flags & NDR_IN) {
@@ -308,7 +308,7 @@ _PUBLIC_ void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struct unixinfo_GetPWUid *r)
+static NTSTATUS ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struct unixinfo_GetPWUid *r)
{
uint32_t cntr_uids_0;
uint32_t cntr_infos_0;
@@ -332,7 +332,7 @@ NTSTATUS ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unixinfo_GetPWUid *r)
+static NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unixinfo_GetPWUid *r)
{
uint32_t cntr_uids_0;
uint32_t cntr_infos_0;
@@ -446,14 +446,14 @@ _PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-const struct ndr_interface_call unixinfo_calls[] = {
+static const struct ndr_interface_call unixinfo_calls[] = {
{
"unixinfo_SidToUid",
sizeof(struct unixinfo_SidToUid),
(ndr_push_flags_fn_t) ndr_push_unixinfo_SidToUid,
(ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToUid,
(ndr_print_function_t) ndr_print_unixinfo_SidToUid,
- False,
+ false,
},
{
"unixinfo_UidToSid",
@@ -461,7 +461,7 @@ const struct ndr_interface_call unixinfo_calls[] = {
(ndr_push_flags_fn_t) ndr_push_unixinfo_UidToSid,
(ndr_pull_flags_fn_t) ndr_pull_unixinfo_UidToSid,
(ndr_print_function_t) ndr_print_unixinfo_UidToSid,
- False,
+ false,
},
{
"unixinfo_SidToGid",
@@ -469,7 +469,7 @@ const struct ndr_interface_call unixinfo_calls[] = {
(ndr_push_flags_fn_t) ndr_push_unixinfo_SidToGid,
(ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToGid,
(ndr_print_function_t) ndr_print_unixinfo_SidToGid,
- False,
+ false,
},
{
"unixinfo_GidToSid",
@@ -477,7 +477,7 @@ const struct ndr_interface_call unixinfo_calls[] = {
(ndr_push_flags_fn_t) ndr_push_unixinfo_GidToSid,
(ndr_pull_flags_fn_t) ndr_pull_unixinfo_GidToSid,
(ndr_print_function_t) ndr_print_unixinfo_GidToSid,
- False,
+ false,
},
{
"unixinfo_GetPWUid",
@@ -485,27 +485,27 @@ const struct ndr_interface_call unixinfo_calls[] = {
(ndr_push_flags_fn_t) ndr_push_unixinfo_GetPWUid,
(ndr_pull_flags_fn_t) ndr_pull_unixinfo_GetPWUid,
(ndr_print_function_t) ndr_print_unixinfo_GetPWUid,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const unixinfo_endpoint_strings[] = {
+static const char * const unixinfo_endpoint_strings[] = {
"ncacn_np:[\\pipe\\unixinfo]",
"ncacn_ip_tcp:",
"ncalrpc:",
};
-const struct ndr_interface_string_array unixinfo_endpoints = {
+static const struct ndr_interface_string_array unixinfo_endpoints = {
.count = 3,
.names = unixinfo_endpoint_strings
};
-const char * const unixinfo_authservice_strings[] = {
+static const char * const unixinfo_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array unixinfo_authservices = {
+static const struct ndr_interface_string_array unixinfo_authservices = {
.count = 3,
.names = unixinfo_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_winreg.c b/source/librpc/gen_ndr/ndr_winreg.c
index beb9e5c7a58..336e3389660 100644
--- a/source/librpc/gen_ndr/ndr_winreg.c
+++ b/source/librpc/gen_ndr/ndr_winreg.c
@@ -6,13 +6,13 @@
#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_initshutdown.h"
#include "librpc/gen_ndr/ndr_security.h"
-NTSTATUS ndr_push_winreg_AccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+static NTSTATUS ndr_push_winreg_AccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_AccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+static NTSTATUS ndr_pull_winreg_AccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -35,13 +35,13 @@ _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
+static NTSTATUS ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
+static NTSTATUS ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -136,7 +136,7 @@ _PUBLIC_ void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_KeySecurityData(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityData *r)
+static NTSTATUS ndr_push_KeySecurityData(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityData *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -155,7 +155,7 @@ NTSTATUS ndr_push_KeySecurityData(struct ndr_push *ndr, int ndr_flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_KeySecurityData(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityData *r)
+static NTSTATUS ndr_pull_KeySecurityData(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityData *r)
{
uint32_t _ptr_data;
TALLOC_CTX *_mem_save_data_0;
@@ -208,7 +208,7 @@ _PUBLIC_ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SecBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_SecBuf *r)
+static NTSTATUS ndr_push_winreg_SecBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_SecBuf *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -222,7 +222,7 @@ NTSTATUS ndr_push_winreg_SecBuf(struct ndr_push *ndr, int ndr_flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_SecBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_SecBuf *r)
+static NTSTATUS ndr_pull_winreg_SecBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_SecBuf *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -246,13 +246,13 @@ _PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_CreateAction(struct ndr_push *ndr, int ndr_flags, enum winreg_CreateAction r)
+static NTSTATUS ndr_push_winreg_CreateAction(struct ndr_push *ndr, int ndr_flags, enum winreg_CreateAction r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_CreateAction(struct ndr_pull *ndr, int ndr_flags, enum winreg_CreateAction *r)
+static NTSTATUS ndr_pull_winreg_CreateAction(struct ndr_pull *ndr, int ndr_flags, enum winreg_CreateAction *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -272,7 +272,7 @@ _PUBLIC_ void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *n
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-NTSTATUS ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_StringBuf *r)
+static NTSTATUS ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_StringBuf *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -291,7 +291,7 @@ NTSTATUS ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const st
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_StringBuf *r)
+static NTSTATUS ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_StringBuf *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -343,7 +343,7 @@ _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_ValNameBuf *r)
+static NTSTATUS ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_ValNameBuf *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -362,7 +362,7 @@ NTSTATUS ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int ndr_flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_ValNameBuf *r)
+static NTSTATUS ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_ValNameBuf *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -414,7 +414,7 @@ _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityAttribute *r)
+static NTSTATUS ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -428,7 +428,7 @@ NTSTATUS ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int ndr_flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_KeySecurityAttribute(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityAttribute *r)
+static NTSTATUS ndr_pull_KeySecurityAttribute(struct ndr_pull *ndr, int ndr_flags, struct KeySecurityAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -452,7 +452,7 @@ _PUBLIC_ void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *
ndr->depth--;
}
-NTSTATUS ndr_push_QueryMultipleValue(struct ndr_push *ndr, int ndr_flags, const struct QueryMultipleValue *r)
+static NTSTATUS ndr_push_QueryMultipleValue(struct ndr_push *ndr, int ndr_flags, const struct QueryMultipleValue *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -469,7 +469,7 @@ NTSTATUS ndr_push_QueryMultipleValue(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_QueryMultipleValue(struct ndr_pull *ndr, int ndr_flags, struct QueryMultipleValue *r)
+static NTSTATUS ndr_pull_QueryMultipleValue(struct ndr_pull *ndr, int ndr_flags, struct QueryMultipleValue *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -512,7 +512,7 @@ _PUBLIC_ void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKCR(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCR *r)
+static NTSTATUS ndr_push_winreg_OpenHKCR(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCR *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -529,7 +529,7 @@ NTSTATUS ndr_push_winreg_OpenHKCR(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKCR(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCR *r)
+static NTSTATUS ndr_pull_winreg_OpenHKCR(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCR *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -598,7 +598,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKCU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCU *r)
+static NTSTATUS ndr_push_winreg_OpenHKCU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCU *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -615,7 +615,7 @@ NTSTATUS ndr_push_winreg_OpenHKCU(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKCU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCU *r)
+static NTSTATUS ndr_pull_winreg_OpenHKCU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCU *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -684,7 +684,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
+static NTSTATUS ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -701,7 +701,7 @@ NTSTATUS ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
+static NTSTATUS ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -770,7 +770,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKPD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPD *r)
+static NTSTATUS ndr_push_winreg_OpenHKPD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPD *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -787,7 +787,7 @@ NTSTATUS ndr_push_winreg_OpenHKPD(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKPD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPD *r)
+static NTSTATUS ndr_pull_winreg_OpenHKPD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPD *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -856,7 +856,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKU *r)
+static NTSTATUS ndr_push_winreg_OpenHKU(struct ndr_push *ndr, int flags, const struct winreg_OpenHKU *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -873,7 +873,7 @@ NTSTATUS ndr_push_winreg_OpenHKU(struct ndr_push *ndr, int flags, const struct w
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKU *r)
+static NTSTATUS ndr_pull_winreg_OpenHKU(struct ndr_pull *ndr, int flags, struct winreg_OpenHKU *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -942,7 +942,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
+static NTSTATUS ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -956,7 +956,7 @@ NTSTATUS ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
+static NTSTATUS ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -1014,7 +1014,7 @@ _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
+static NTSTATUS ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1044,7 +1044,7 @@ NTSTATUS ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
+static NTSTATUS ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
{
uint32_t _ptr_secdesc;
uint32_t _ptr_action_taken;
@@ -1169,7 +1169,7 @@ _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
+static NTSTATUS ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1182,7 +1182,7 @@ NTSTATUS ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
+static NTSTATUS ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -1227,7 +1227,7 @@ _PUBLIC_ void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_DeleteValue(struct ndr_push *ndr, int flags, const struct winreg_DeleteValue *r)
+static NTSTATUS ndr_push_winreg_DeleteValue(struct ndr_push *ndr, int flags, const struct winreg_DeleteValue *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1240,7 +1240,7 @@ NTSTATUS ndr_push_winreg_DeleteValue(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_DeleteValue(struct ndr_pull *ndr, int flags, struct winreg_DeleteValue *r)
+static NTSTATUS ndr_pull_winreg_DeleteValue(struct ndr_pull *ndr, int flags, struct winreg_DeleteValue *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -1285,7 +1285,7 @@ _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
+static NTSTATUS ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1318,7 +1318,7 @@ NTSTATUS ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct w
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
+static NTSTATUS ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
{
uint32_t _ptr_keyclass;
uint32_t _ptr_last_changed_time;
@@ -1466,7 +1466,7 @@ _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r)
+static NTSTATUS ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1521,7 +1521,7 @@ NTSTATUS ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r)
+static NTSTATUS ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r)
{
uint32_t _ptr_type;
uint32_t _ptr_value;
@@ -1775,7 +1775,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
+static NTSTATUS ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1787,7 +1787,7 @@ NTSTATUS ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
+static NTSTATUS ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -1830,7 +1830,7 @@ _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
+static NTSTATUS ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1847,7 +1847,7 @@ NTSTATUS ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
+static NTSTATUS ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sd_0;
@@ -1919,7 +1919,7 @@ _PUBLIC_ void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_LoadKey(struct ndr_push *ndr, int flags, const struct winreg_LoadKey *r)
+static NTSTATUS ndr_push_winreg_LoadKey(struct ndr_push *ndr, int flags, const struct winreg_LoadKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -1939,7 +1939,7 @@ NTSTATUS ndr_push_winreg_LoadKey(struct ndr_push *ndr, int flags, const struct w
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_LoadKey(struct ndr_pull *ndr, int flags, struct winreg_LoadKey *r)
+static NTSTATUS ndr_pull_winreg_LoadKey(struct ndr_pull *ndr, int flags, struct winreg_LoadKey *r)
{
uint32_t _ptr_keyname;
uint32_t _ptr_filename;
@@ -2022,7 +2022,7 @@ _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
+static NTSTATUS ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2040,7 +2040,7 @@ NTSTATUS ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
+static NTSTATUS ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -2095,7 +2095,7 @@ _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
+static NTSTATUS ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
{
if (flags & NDR_IN) {
if (r->in.parent_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2112,7 +2112,7 @@ NTSTATUS ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct w
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
+static NTSTATUS ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
{
TALLOC_CTX *_mem_save_parent_handle_0;
TALLOC_CTX *_mem_save_handle_0;
@@ -2177,7 +2177,7 @@ _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r)
+static NTSTATUS ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2209,7 +2209,7 @@ NTSTATUS ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const str
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r)
+static NTSTATUS ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_classname_0;
@@ -2391,7 +2391,7 @@ _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r)
+static NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2442,7 +2442,7 @@ NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r)
+static NTSTATUS ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r)
{
uint32_t _ptr_type;
uint32_t _ptr_data;
@@ -2671,7 +2671,7 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_ReplaceKey(struct ndr_push *ndr, int flags, const struct winreg_ReplaceKey *r)
+static NTSTATUS ndr_push_winreg_ReplaceKey(struct ndr_push *ndr, int flags, const struct winreg_ReplaceKey *r)
{
if (flags & NDR_IN) {
}
@@ -2681,7 +2681,7 @@ NTSTATUS ndr_push_winreg_ReplaceKey(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_ReplaceKey(struct ndr_pull *ndr, int flags, struct winreg_ReplaceKey *r)
+static NTSTATUS ndr_pull_winreg_ReplaceKey(struct ndr_pull *ndr, int flags, struct winreg_ReplaceKey *r)
{
if (flags & NDR_IN) {
}
@@ -2712,7 +2712,7 @@ _PUBLIC_ void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_RestoreKey(struct ndr_push *ndr, int flags, const struct winreg_RestoreKey *r)
+static NTSTATUS ndr_push_winreg_RestoreKey(struct ndr_push *ndr, int flags, const struct winreg_RestoreKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2727,7 +2727,7 @@ NTSTATUS ndr_push_winreg_RestoreKey(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_RestoreKey(struct ndr_pull *ndr, int flags, struct winreg_RestoreKey *r)
+static NTSTATUS ndr_pull_winreg_RestoreKey(struct ndr_pull *ndr, int flags, struct winreg_RestoreKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_filename_0;
@@ -2784,7 +2784,7 @@ _PUBLIC_ void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SaveKey(struct ndr_push *ndr, int flags, const struct winreg_SaveKey *r)
+static NTSTATUS ndr_push_winreg_SaveKey(struct ndr_push *ndr, int flags, const struct winreg_SaveKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2802,7 +2802,7 @@ NTSTATUS ndr_push_winreg_SaveKey(struct ndr_push *ndr, int flags, const struct w
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_SaveKey(struct ndr_pull *ndr, int flags, struct winreg_SaveKey *r)
+static NTSTATUS ndr_pull_winreg_SaveKey(struct ndr_pull *ndr, int flags, struct winreg_SaveKey *r)
{
uint32_t _ptr_sec_attrib;
TALLOC_CTX *_mem_save_handle_0;
@@ -2877,7 +2877,7 @@ _PUBLIC_ void ndr_print_winreg_SaveKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_SetKeySecurity *r)
+static NTSTATUS ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_SetKeySecurity *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2892,7 +2892,7 @@ NTSTATUS ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_SetKeySecurity *r)
+static NTSTATUS ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_SetKeySecurity *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sd_0;
@@ -2949,7 +2949,7 @@ _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SetValue(struct ndr_push *ndr, int flags, const struct winreg_SetValue *r)
+static NTSTATUS ndr_push_winreg_SetValue(struct ndr_push *ndr, int flags, const struct winreg_SetValue *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -2967,7 +2967,7 @@ NTSTATUS ndr_push_winreg_SetValue(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_SetValue(struct ndr_pull *ndr, int flags, struct winreg_SetValue *r)
+static NTSTATUS ndr_pull_winreg_SetValue(struct ndr_pull *ndr, int flags, struct winreg_SetValue *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -3028,7 +3028,7 @@ _PUBLIC_ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_UnLoadKey(struct ndr_push *ndr, int flags, const struct winreg_UnLoadKey *r)
+static NTSTATUS ndr_push_winreg_UnLoadKey(struct ndr_push *ndr, int flags, const struct winreg_UnLoadKey *r)
{
if (flags & NDR_IN) {
}
@@ -3038,7 +3038,7 @@ NTSTATUS ndr_push_winreg_UnLoadKey(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_UnLoadKey(struct ndr_pull *ndr, int flags, struct winreg_UnLoadKey *r)
+static NTSTATUS ndr_pull_winreg_UnLoadKey(struct ndr_pull *ndr, int flags, struct winreg_UnLoadKey *r)
{
if (flags & NDR_IN) {
}
@@ -3069,7 +3069,7 @@ _PUBLIC_ void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_InitiateSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdown *r)
+static NTSTATUS ndr_push_winreg_InitiateSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdown *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
@@ -3090,7 +3090,7 @@ NTSTATUS ndr_push_winreg_InitiateSystemShutdown(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdown *r)
+static NTSTATUS ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdown *r)
{
uint32_t _ptr_hostname;
uint32_t _ptr_message;
@@ -3167,7 +3167,7 @@ _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_AbortSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_AbortSystemShutdown *r)
+static NTSTATUS ndr_push_winreg_AbortSystemShutdown(struct ndr_push *ndr, int flags, const struct winreg_AbortSystemShutdown *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
@@ -3181,7 +3181,7 @@ NTSTATUS ndr_push_winreg_AbortSystemShutdown(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_AbortSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_AbortSystemShutdown *r)
+static NTSTATUS ndr_pull_winreg_AbortSystemShutdown(struct ndr_pull *ndr, int flags, struct winreg_AbortSystemShutdown *r)
{
uint32_t _ptr_server;
TALLOC_CTX *_mem_save_server_0;
@@ -3232,7 +3232,7 @@ _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
+static NTSTATUS ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -3246,7 +3246,7 @@ NTSTATUS ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
+static NTSTATUS ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_version_0;
@@ -3305,7 +3305,7 @@ _PUBLIC_ void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKCC(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCC *r)
+static NTSTATUS ndr_push_winreg_OpenHKCC(struct ndr_push *ndr, int flags, const struct winreg_OpenHKCC *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -3322,7 +3322,7 @@ NTSTATUS ndr_push_winreg_OpenHKCC(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKCC(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCC *r)
+static NTSTATUS ndr_pull_winreg_OpenHKCC(struct ndr_pull *ndr, int flags, struct winreg_OpenHKCC *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -3391,7 +3391,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKDD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKDD *r)
+static NTSTATUS ndr_push_winreg_OpenHKDD(struct ndr_push *ndr, int flags, const struct winreg_OpenHKDD *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -3408,7 +3408,7 @@ NTSTATUS ndr_push_winreg_OpenHKDD(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKDD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKDD *r)
+static NTSTATUS ndr_pull_winreg_OpenHKDD(struct ndr_pull *ndr, int flags, struct winreg_OpenHKDD *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -3477,7 +3477,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
+static NTSTATUS ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
{
uint32_t cntr_values_1;
if (flags & NDR_IN) {
@@ -3529,7 +3529,7 @@ NTSTATUS ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
+static NTSTATUS ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
{
uint32_t cntr_values_1;
uint32_t _ptr_buffer;
@@ -3744,7 +3744,7 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdownEx *r)
+static NTSTATUS ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_push *ndr, int flags, const struct winreg_InitiateSystemShutdownEx *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
@@ -3766,7 +3766,7 @@ NTSTATUS ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_push *ndr, int flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdownEx *r)
+static NTSTATUS ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pull *ndr, int flags, struct winreg_InitiateSystemShutdownEx *r)
{
uint32_t _ptr_hostname;
uint32_t _ptr_message;
@@ -3845,7 +3845,7 @@ _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, c
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_SaveKeyEx(struct ndr_push *ndr, int flags, const struct winreg_SaveKeyEx *r)
+static NTSTATUS ndr_push_winreg_SaveKeyEx(struct ndr_push *ndr, int flags, const struct winreg_SaveKeyEx *r)
{
if (flags & NDR_IN) {
}
@@ -3855,7 +3855,7 @@ NTSTATUS ndr_push_winreg_SaveKeyEx(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_SaveKeyEx(struct ndr_pull *ndr, int flags, struct winreg_SaveKeyEx *r)
+static NTSTATUS ndr_pull_winreg_SaveKeyEx(struct ndr_pull *ndr, int flags, struct winreg_SaveKeyEx *r)
{
if (flags & NDR_IN) {
}
@@ -3886,7 +3886,7 @@ _PUBLIC_ void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKPT(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPT *r)
+static NTSTATUS ndr_push_winreg_OpenHKPT(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPT *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -3903,7 +3903,7 @@ NTSTATUS ndr_push_winreg_OpenHKPT(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKPT(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPT *r)
+static NTSTATUS ndr_pull_winreg_OpenHKPT(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPT *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -3972,7 +3972,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKPT(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_OpenHKPN(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPN *r)
+static NTSTATUS ndr_push_winreg_OpenHKPN(struct ndr_push *ndr, int flags, const struct winreg_OpenHKPN *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -3989,7 +3989,7 @@ NTSTATUS ndr_push_winreg_OpenHKPN(struct ndr_push *ndr, int flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_OpenHKPN(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPN *r)
+static NTSTATUS ndr_pull_winreg_OpenHKPN(struct ndr_pull *ndr, int flags, struct winreg_OpenHKPN *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -4058,7 +4058,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKPN(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-NTSTATUS ndr_push_winreg_QueryMultipleValues2(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues2 *r)
+static NTSTATUS ndr_push_winreg_QueryMultipleValues2(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues2 *r)
{
if (flags & NDR_IN) {
}
@@ -4068,7 +4068,7 @@ NTSTATUS ndr_push_winreg_QueryMultipleValues2(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_winreg_QueryMultipleValues2(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues2 *r)
+static NTSTATUS ndr_pull_winreg_QueryMultipleValues2(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues2 *r)
{
if (flags & NDR_IN) {
}
@@ -4099,14 +4099,14 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const
ndr->depth--;
}
-const struct ndr_interface_call winreg_calls[] = {
+static const struct ndr_interface_call winreg_calls[] = {
{
"winreg_OpenHKCR",
sizeof(struct winreg_OpenHKCR),
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCR,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCR,
(ndr_print_function_t) ndr_print_winreg_OpenHKCR,
- False,
+ false,
},
{
"winreg_OpenHKCU",
@@ -4114,7 +4114,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCU,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCU,
(ndr_print_function_t) ndr_print_winreg_OpenHKCU,
- False,
+ false,
},
{
"winreg_OpenHKLM",
@@ -4122,7 +4122,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKLM,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKLM,
(ndr_print_function_t) ndr_print_winreg_OpenHKLM,
- False,
+ false,
},
{
"winreg_OpenHKPD",
@@ -4130,7 +4130,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPD,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPD,
(ndr_print_function_t) ndr_print_winreg_OpenHKPD,
- False,
+ false,
},
{
"winreg_OpenHKU",
@@ -4138,7 +4138,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKU,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKU,
(ndr_print_function_t) ndr_print_winreg_OpenHKU,
- False,
+ false,
},
{
"winreg_CloseKey",
@@ -4146,7 +4146,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_CloseKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_CloseKey,
(ndr_print_function_t) ndr_print_winreg_CloseKey,
- False,
+ false,
},
{
"winreg_CreateKey",
@@ -4154,7 +4154,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_CreateKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_CreateKey,
(ndr_print_function_t) ndr_print_winreg_CreateKey,
- False,
+ false,
},
{
"winreg_DeleteKey",
@@ -4162,7 +4162,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_DeleteKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteKey,
(ndr_print_function_t) ndr_print_winreg_DeleteKey,
- False,
+ false,
},
{
"winreg_DeleteValue",
@@ -4170,7 +4170,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_DeleteValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteValue,
(ndr_print_function_t) ndr_print_winreg_DeleteValue,
- False,
+ false,
},
{
"winreg_EnumKey",
@@ -4178,7 +4178,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_EnumKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_EnumKey,
(ndr_print_function_t) ndr_print_winreg_EnumKey,
- False,
+ false,
},
{
"winreg_EnumValue",
@@ -4186,7 +4186,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_EnumValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_EnumValue,
(ndr_print_function_t) ndr_print_winreg_EnumValue,
- False,
+ false,
},
{
"winreg_FlushKey",
@@ -4194,7 +4194,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_FlushKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_FlushKey,
(ndr_print_function_t) ndr_print_winreg_FlushKey,
- False,
+ false,
},
{
"winreg_GetKeySecurity",
@@ -4202,7 +4202,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_GetKeySecurity,
(ndr_pull_flags_fn_t) ndr_pull_winreg_GetKeySecurity,
(ndr_print_function_t) ndr_print_winreg_GetKeySecurity,
- False,
+ false,
},
{
"winreg_LoadKey",
@@ -4210,7 +4210,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_LoadKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_LoadKey,
(ndr_print_function_t) ndr_print_winreg_LoadKey,
- False,
+ false,
},
{
"winreg_NotifyChangeKeyValue",
@@ -4218,7 +4218,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_NotifyChangeKeyValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_NotifyChangeKeyValue,
(ndr_print_function_t) ndr_print_winreg_NotifyChangeKeyValue,
- False,
+ false,
},
{
"winreg_OpenKey",
@@ -4226,7 +4226,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenKey,
(ndr_print_function_t) ndr_print_winreg_OpenKey,
- False,
+ false,
},
{
"winreg_QueryInfoKey",
@@ -4234,7 +4234,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_QueryInfoKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_QueryInfoKey,
(ndr_print_function_t) ndr_print_winreg_QueryInfoKey,
- False,
+ false,
},
{
"winreg_QueryValue",
@@ -4242,7 +4242,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_QueryValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_QueryValue,
(ndr_print_function_t) ndr_print_winreg_QueryValue,
- False,
+ false,
},
{
"winreg_ReplaceKey",
@@ -4250,7 +4250,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_ReplaceKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_ReplaceKey,
(ndr_print_function_t) ndr_print_winreg_ReplaceKey,
- False,
+ false,
},
{
"winreg_RestoreKey",
@@ -4258,7 +4258,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_RestoreKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_RestoreKey,
(ndr_print_function_t) ndr_print_winreg_RestoreKey,
- False,
+ false,
},
{
"winreg_SaveKey",
@@ -4266,7 +4266,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_SaveKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_SaveKey,
(ndr_print_function_t) ndr_print_winreg_SaveKey,
- False,
+ false,
},
{
"winreg_SetKeySecurity",
@@ -4274,7 +4274,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_SetKeySecurity,
(ndr_pull_flags_fn_t) ndr_pull_winreg_SetKeySecurity,
(ndr_print_function_t) ndr_print_winreg_SetKeySecurity,
- False,
+ false,
},
{
"winreg_SetValue",
@@ -4282,7 +4282,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_SetValue,
(ndr_pull_flags_fn_t) ndr_pull_winreg_SetValue,
(ndr_print_function_t) ndr_print_winreg_SetValue,
- False,
+ false,
},
{
"winreg_UnLoadKey",
@@ -4290,7 +4290,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_UnLoadKey,
(ndr_pull_flags_fn_t) ndr_pull_winreg_UnLoadKey,
(ndr_print_function_t) ndr_print_winreg_UnLoadKey,
- False,
+ false,
},
{
"winreg_InitiateSystemShutdown",
@@ -4298,7 +4298,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_InitiateSystemShutdown,
(ndr_pull_flags_fn_t) ndr_pull_winreg_InitiateSystemShutdown,
(ndr_print_function_t) ndr_print_winreg_InitiateSystemShutdown,
- False,
+ false,
},
{
"winreg_AbortSystemShutdown",
@@ -4306,7 +4306,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_AbortSystemShutdown,
(ndr_pull_flags_fn_t) ndr_pull_winreg_AbortSystemShutdown,
(ndr_print_function_t) ndr_print_winreg_AbortSystemShutdown,
- False,
+ false,
},
{
"winreg_GetVersion",
@@ -4314,7 +4314,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_GetVersion,
(ndr_pull_flags_fn_t) ndr_pull_winreg_GetVersion,
(ndr_print_function_t) ndr_print_winreg_GetVersion,
- False,
+ false,
},
{
"winreg_OpenHKCC",
@@ -4322,7 +4322,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCC,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCC,
(ndr_print_function_t) ndr_print_winreg_OpenHKCC,
- False,
+ false,
},
{
"winreg_OpenHKDD",
@@ -4330,7 +4330,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKDD,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKDD,
(ndr_print_function_t) ndr_print_winreg_OpenHKDD,
- False,
+ false,
},
{
"winreg_QueryMultipleValues",
@@ -4338,7 +4338,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_QueryMultipleValues,
(ndr_pull_flags_fn_t) ndr_pull_winreg_QueryMultipleValues,
(ndr_print_function_t) ndr_print_winreg_QueryMultipleValues,
- False,
+ false,
},
{
"winreg_InitiateSystemShutdownEx",
@@ -4346,7 +4346,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_InitiateSystemShutdownEx,
(ndr_pull_flags_fn_t) ndr_pull_winreg_InitiateSystemShutdownEx,
(ndr_print_function_t) ndr_print_winreg_InitiateSystemShutdownEx,
- False,
+ false,
},
{
"winreg_SaveKeyEx",
@@ -4354,7 +4354,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_SaveKeyEx,
(ndr_pull_flags_fn_t) ndr_pull_winreg_SaveKeyEx,
(ndr_print_function_t) ndr_print_winreg_SaveKeyEx,
- False,
+ false,
},
{
"winreg_OpenHKPT",
@@ -4362,7 +4362,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPT,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPT,
(ndr_print_function_t) ndr_print_winreg_OpenHKPT,
- False,
+ false,
},
{
"winreg_OpenHKPN",
@@ -4370,7 +4370,7 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPN,
(ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPN,
(ndr_print_function_t) ndr_print_winreg_OpenHKPN,
- False,
+ false,
},
{
"winreg_QueryMultipleValues2",
@@ -4378,27 +4378,27 @@ const struct ndr_interface_call winreg_calls[] = {
(ndr_push_flags_fn_t) ndr_push_winreg_QueryMultipleValues2,
(ndr_pull_flags_fn_t) ndr_pull_winreg_QueryMultipleValues2,
(ndr_print_function_t) ndr_print_winreg_QueryMultipleValues2,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const winreg_endpoint_strings[] = {
+static const char * const winreg_endpoint_strings[] = {
"ncacn_np:[\\pipe\\winreg]",
"ncacn_ip_tcp:",
"ncalrpc:",
};
-const struct ndr_interface_string_array winreg_endpoints = {
+static const struct ndr_interface_string_array winreg_endpoints = {
.count = 3,
.names = winreg_endpoint_strings
};
-const char * const winreg_authservice_strings[] = {
+static const char * const winreg_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array winreg_authservices = {
+static const struct ndr_interface_string_array winreg_authservices = {
.count = 3,
.names = winreg_authservice_strings
};
diff --git a/source/librpc/gen_ndr/ndr_wkssvc.c b/source/librpc/gen_ndr/ndr_wkssvc.c
index 875260a4bb9..0e0a31e7a36 100644
--- a/source/librpc/gen_ndr/ndr_wkssvc.c
+++ b/source/librpc/gen_ndr/ndr_wkssvc.c
@@ -4,7 +4,7 @@
#include "librpc/gen_ndr/ndr_wkssvc.h"
#include "librpc/gen_ndr/ndr_srvsvc.h"
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo100(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo100 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo100(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo100 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -31,7 +31,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo100(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo100(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo100 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo100(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo100 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -106,7 +106,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo100(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo101(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo101 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo101(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo101 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -140,7 +140,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo101(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo101(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo101 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo101(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo101 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -241,7 +241,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo101(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo102(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo102 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo102(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo102 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -276,7 +276,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo102(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo102(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo102 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo102(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo102 *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -379,7 +379,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo102(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo502(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo502 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo502(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo502 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -424,7 +424,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo502(struct ndr_push *ndr, int ndr_flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo502(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo502 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo502(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo502 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -511,7 +511,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo502(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo1010(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1010 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo1010(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1010 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -522,7 +522,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo1010(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1010(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1010 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1010(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1010 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -541,7 +541,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1010(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo1011(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1011 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo1011(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1011 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -552,7 +552,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo1011(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1011(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1011 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1011(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1011 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -571,7 +571,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1011(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo1012(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1012 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo1012(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1012 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -582,7 +582,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo1012(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1012(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1012 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1012(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1012 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -601,7 +601,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1012(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo1013(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1013 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo1013(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1013 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -612,7 +612,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo1013(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1013(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1013 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1013(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1013 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -631,7 +631,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1013(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo1018(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1018 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo1018(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1018 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -642,7 +642,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo1018(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1018(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1018 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1018(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1018 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -661,7 +661,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1018(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo1023(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1023 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo1023(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1023 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -672,7 +672,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo1023(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1023(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1023 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1023(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1023 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -691,7 +691,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1023(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo1027(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1027 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo1027(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1027 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -702,7 +702,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo1027(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1027(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1027 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1027(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1027 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -721,7 +721,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1027(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo1033(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1033 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo1033(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaInfo1033 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -732,7 +732,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo1033(struct ndr_push *ndr, int ndr_flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1033(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1033 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo1033(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaInfo1033 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -751,7 +751,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo1033(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaInfo(struct ndr_push *ndr, int ndr_flags, const union wkssvc_NetWkstaInfo *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaInfo(struct ndr_push *ndr, int ndr_flags, const union wkssvc_NetWkstaInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -893,7 +893,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaInfo(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaInfo(struct ndr_pull *ndr, int ndr_flags, union wkssvc_NetWkstaInfo *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaInfo(struct ndr_pull *ndr, int ndr_flags, union wkssvc_NetWkstaInfo *r)
{
int level;
uint32_t _level;
@@ -1279,7 +1279,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaInfo(struct ndr_print *ndr, const char *n
}
}
-NTSTATUS ndr_push_USER_INFO_0(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_0 *r)
+static NTSTATUS ndr_push_USER_INFO_0(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1296,7 +1296,7 @@ NTSTATUS ndr_push_USER_INFO_0(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_USER_INFO_0(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_0 *r)
+static NTSTATUS ndr_pull_USER_INFO_0(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_0 *r)
{
uint32_t _ptr_user;
TALLOC_CTX *_mem_save_user_0;
@@ -1339,7 +1339,7 @@ _PUBLIC_ void ndr_print_USER_INFO_0(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_USER_INFO_0_CONTAINER(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_0_CONTAINER *r)
+static NTSTATUS ndr_push_USER_INFO_0_CONTAINER(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_0_CONTAINER *r)
{
uint32_t cntr_user0_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1361,7 +1361,7 @@ NTSTATUS ndr_push_USER_INFO_0_CONTAINER(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_USER_INFO_0_CONTAINER(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_0_CONTAINER *r)
+static NTSTATUS ndr_pull_USER_INFO_0_CONTAINER(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_0_CONTAINER *r)
{
uint32_t _ptr_user0;
uint32_t cntr_user0_1;
@@ -1426,7 +1426,7 @@ _PUBLIC_ void ndr_print_USER_INFO_0_CONTAINER(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_USER_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_1 *r)
+static NTSTATUS ndr_push_USER_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1464,7 +1464,7 @@ NTSTATUS ndr_push_USER_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_USER_INFO_1(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_1 *r)
+static NTSTATUS ndr_pull_USER_INFO_1(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_1 *r)
{
uint32_t _ptr_user_name;
TALLOC_CTX *_mem_save_user_name_0;
@@ -1585,7 +1585,7 @@ _PUBLIC_ void ndr_print_USER_INFO_1(struct ndr_print *ndr, const char *name, con
ndr->depth--;
}
-NTSTATUS ndr_push_USER_INFO_1_CONTAINER(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_1_CONTAINER *r)
+static NTSTATUS ndr_push_USER_INFO_1_CONTAINER(struct ndr_push *ndr, int ndr_flags, const struct USER_INFO_1_CONTAINER *r)
{
uint32_t cntr_user1_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1607,7 +1607,7 @@ NTSTATUS ndr_push_USER_INFO_1_CONTAINER(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_USER_INFO_1_CONTAINER(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_1_CONTAINER *r)
+static NTSTATUS ndr_pull_USER_INFO_1_CONTAINER(struct ndr_pull *ndr, int ndr_flags, struct USER_INFO_1_CONTAINER *r)
{
uint32_t _ptr_user1;
uint32_t cntr_user1_1;
@@ -1672,7 +1672,7 @@ _PUBLIC_ void ndr_print_USER_INFO_1_CONTAINER(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_WKS_USER_ENUM_UNION(struct ndr_push *ndr, int ndr_flags, const union WKS_USER_ENUM_UNION *r)
+static NTSTATUS ndr_push_WKS_USER_ENUM_UNION(struct ndr_push *ndr, int ndr_flags, const union WKS_USER_ENUM_UNION *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -1712,7 +1712,7 @@ NTSTATUS ndr_push_WKS_USER_ENUM_UNION(struct ndr_push *ndr, int ndr_flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKS_USER_ENUM_UNION(struct ndr_pull *ndr, int ndr_flags, union WKS_USER_ENUM_UNION *r)
+static NTSTATUS ndr_pull_WKS_USER_ENUM_UNION(struct ndr_pull *ndr, int ndr_flags, union WKS_USER_ENUM_UNION *r)
{
int level;
uint32_t _level;
@@ -1805,7 +1805,7 @@ _PUBLIC_ void ndr_print_WKS_USER_ENUM_UNION(struct ndr_print *ndr, const char *n
}
}
-NTSTATUS ndr_push_wkssvc_NetWkstaTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaTransportInfo0 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaTransportInfo0 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -1832,7 +1832,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportInfo0(struct ndr_push *ndr, int ndr_fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaTransportInfo0 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaTransportInfo0 *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -1907,7 +1907,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportInfo0(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaTransportCtr0 *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_NetWkstaTransportCtr0 *r)
{
uint32_t cntr_array_1;
if (ndr_flags & NDR_SCALARS) {
@@ -1929,7 +1929,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportCtr0(struct ndr_push *ndr, int ndr_fla
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaTransportCtr0 *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_NetWkstaTransportCtr0 *r)
{
uint32_t _ptr_array;
uint32_t cntr_array_1;
@@ -1994,7 +1994,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaTransportCtr(struct ndr_push *ndr, int ndr_flags, const union wkssvc_NetWkstaTransportCtr *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaTransportCtr(struct ndr_push *ndr, int ndr_flags, const union wkssvc_NetWkstaTransportCtr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -2026,7 +2026,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportCtr(struct ndr_push *ndr, int ndr_flag
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaTransportCtr(struct ndr_pull *ndr, int ndr_flags, union wkssvc_NetWkstaTransportCtr *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaTransportCtr(struct ndr_pull *ndr, int ndr_flags, union wkssvc_NetWkstaTransportCtr *r)
{
int level;
uint32_t _level;
@@ -2093,7 +2093,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr(struct ndr_print *ndr, const
}
}
-NTSTATUS ndr_push_wkssvc_PasswordBuffer(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_PasswordBuffer *r)
+static NTSTATUS ndr_push_wkssvc_PasswordBuffer(struct ndr_push *ndr, int ndr_flags, const struct wkssvc_PasswordBuffer *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
@@ -2104,7 +2104,7 @@ NTSTATUS ndr_push_wkssvc_PasswordBuffer(struct ndr_push *ndr, int ndr_flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_PasswordBuffer(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_PasswordBuffer *r)
+static NTSTATUS ndr_pull_wkssvc_PasswordBuffer(struct ndr_pull *ndr, int ndr_flags, struct wkssvc_PasswordBuffer *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
@@ -2123,13 +2123,13 @@ _PUBLIC_ void ndr_print_wkssvc_PasswordBuffer(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_joinflags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+static NTSTATUS ndr_push_wkssvc_joinflags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_joinflags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+static NTSTATUS ndr_pull_wkssvc_joinflags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -2152,13 +2152,13 @@ _PUBLIC_ void ndr_print_wkssvc_joinflags(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_renameflags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+static NTSTATUS ndr_push_wkssvc_renameflags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_renameflags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+static NTSTATUS ndr_pull_wkssvc_renameflags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -2174,7 +2174,7 @@ _PUBLIC_ void ndr_print_wkssvc_renameflags(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaGetInfo(struct ndr_push *ndr, int flags, const struct wkssvc_NetWkstaGetInfo *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaGetInfo(struct ndr_push *ndr, int flags, const struct wkssvc_NetWkstaGetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -2195,7 +2195,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaGetInfo(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaGetInfo(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaGetInfo *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaGetInfo(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaGetInfo *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -2272,7 +2272,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaGetInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaSetInfo(struct ndr_push *ndr, int flags, const struct wkssvc_NetWkstaSetInfo *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaSetInfo(struct ndr_push *ndr, int flags, const struct wkssvc_NetWkstaSetInfo *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -2297,7 +2297,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaSetInfo(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaSetInfo(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaSetInfo *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaSetInfo(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaSetInfo *r)
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
@@ -2397,7 +2397,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaSetInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaEnumUsers(struct ndr_push *ndr, int flags, const struct wkssvc_NetWkstaEnumUsers *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaEnumUsers(struct ndr_push *ndr, int flags, const struct wkssvc_NetWkstaEnumUsers *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -2432,7 +2432,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaEnumUsers(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaEnumUsers(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaEnumUsers *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaEnumUsers(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaEnumUsers *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_entriesread;
@@ -2585,7 +2585,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsers(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWKSTAUSERGETINFO *r)
+static NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWKSTAUSERGETINFO *r)
{
if (flags & NDR_IN) {
}
@@ -2595,7 +2595,7 @@ NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWKSTAUSERGETINFO *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWKSTAUSERGETINFO *r)
{
if (flags & NDR_IN) {
}
@@ -2626,7 +2626,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRWKSTAUSERGETINFO(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWKSTAUSERSETINFO *r)
+static NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWKSTAUSERSETINFO *r)
{
if (flags & NDR_IN) {
}
@@ -2636,7 +2636,7 @@ NTSTATUS ndr_push_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_push *ndr, int flags, c
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWKSTAUSERSETINFO *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWKSTAUSERSETINFO *r)
{
if (flags & NDR_IN) {
}
@@ -2667,7 +2667,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRWKSTAUSERSETINFO(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags, const struct wkssvc_NetWkstaTransportEnum *r)
+static NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags, const struct wkssvc_NetWkstaTransportEnum *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -2703,7 +2703,7 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaTransportEnum *r)
+static NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags, struct wkssvc_NetWkstaTransportEnum *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_totalentries;
@@ -2863,7 +2863,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportEnum(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWKSTATRANSPORTADD *r)
+static NTSTATUS ndr_push_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWKSTATRANSPORTADD *r)
{
if (flags & NDR_IN) {
}
@@ -2873,7 +2873,7 @@ NTSTATUS ndr_push_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWKSTATRANSPORTADD *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWKSTATRANSPORTADD *r)
{
if (flags & NDR_IN) {
}
@@ -2904,7 +2904,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRWKSTATRANSPORTADD(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWKSTATRANSPORTDEL *r)
+static NTSTATUS ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWKSTATRANSPORTDEL *r)
{
if (flags & NDR_IN) {
}
@@ -2914,7 +2914,7 @@ NTSTATUS ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWKSTATRANSPORTDEL *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWKSTATRANSPORTDEL *r)
{
if (flags & NDR_IN) {
}
@@ -2945,7 +2945,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRWKSTATRANSPORTDEL(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRUSEADD(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUSEADD *r)
+static NTSTATUS ndr_push_WKSSVC_NETRUSEADD(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUSEADD *r)
{
if (flags & NDR_IN) {
}
@@ -2955,7 +2955,7 @@ NTSTATUS ndr_push_WKSSVC_NETRUSEADD(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRUSEADD(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUSEADD *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRUSEADD(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUSEADD *r)
{
if (flags & NDR_IN) {
}
@@ -2986,7 +2986,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRUSEADD(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRUSEGETINFO(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUSEGETINFO *r)
+static NTSTATUS ndr_push_WKSSVC_NETRUSEGETINFO(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUSEGETINFO *r)
{
if (flags & NDR_IN) {
}
@@ -2996,7 +2996,7 @@ NTSTATUS ndr_push_WKSSVC_NETRUSEGETINFO(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRUSEGETINFO(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUSEGETINFO *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRUSEGETINFO(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUSEGETINFO *r)
{
if (flags & NDR_IN) {
}
@@ -3027,7 +3027,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRUSEGETINFO(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRUSEDEL(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUSEDEL *r)
+static NTSTATUS ndr_push_WKSSVC_NETRUSEDEL(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUSEDEL *r)
{
if (flags & NDR_IN) {
}
@@ -3037,7 +3037,7 @@ NTSTATUS ndr_push_WKSSVC_NETRUSEDEL(struct ndr_push *ndr, int flags, const struc
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRUSEDEL(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUSEDEL *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRUSEDEL(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUSEDEL *r)
{
if (flags & NDR_IN) {
}
@@ -3068,7 +3068,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRUSEDEL(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRUSEENUM(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUSEENUM *r)
+static NTSTATUS ndr_push_WKSSVC_NETRUSEENUM(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUSEENUM *r)
{
if (flags & NDR_IN) {
}
@@ -3078,7 +3078,7 @@ NTSTATUS ndr_push_WKSSVC_NETRUSEENUM(struct ndr_push *ndr, int flags, const stru
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRUSEENUM(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUSEENUM *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRUSEENUM(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUSEENUM *r)
{
if (flags & NDR_IN) {
}
@@ -3109,7 +3109,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRUSEENUM(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRMESSAGEBUFFERSEND *r)
+static NTSTATUS ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRMESSAGEBUFFERSEND *r)
{
if (flags & NDR_IN) {
}
@@ -3119,7 +3119,7 @@ NTSTATUS ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRMESSAGEBUFFERSEND *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRMESSAGEBUFFERSEND *r)
{
if (flags & NDR_IN) {
}
@@ -3150,7 +3150,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRMESSAGEBUFFERSEND(struct ndr_print *ndr, cons
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r)
+static NTSTATUS ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r)
{
if (flags & NDR_IN) {
}
@@ -3160,7 +3160,7 @@ NTSTATUS ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_push *ndr, int
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r)
{
if (flags & NDR_IN) {
}
@@ -3191,7 +3191,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct ndr_print *nd
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRLOGONDOMAINNAMEADD *r)
+static NTSTATUS ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRLOGONDOMAINNAMEADD *r)
{
if (flags & NDR_IN) {
}
@@ -3201,7 +3201,7 @@ NTSTATUS ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRLOGONDOMAINNAMEADD *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRLOGONDOMAINNAMEADD *r)
{
if (flags & NDR_IN) {
}
@@ -3232,7 +3232,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRLOGONDOMAINNAMEADD(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r)
+static NTSTATUS ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r)
{
if (flags & NDR_IN) {
}
@@ -3242,7 +3242,7 @@ NTSTATUS ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r)
{
if (flags & NDR_IN) {
}
@@ -3273,7 +3273,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRJOINDOMAIN(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRJOINDOMAIN *r)
+static NTSTATUS ndr_push_WKSSVC_NETRJOINDOMAIN(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRJOINDOMAIN *r)
{
if (flags & NDR_IN) {
}
@@ -3283,7 +3283,7 @@ NTSTATUS ndr_push_WKSSVC_NETRJOINDOMAIN(struct ndr_push *ndr, int flags, const s
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRJOINDOMAIN(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRJOINDOMAIN *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRJOINDOMAIN(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRJOINDOMAIN *r)
{
if (flags & NDR_IN) {
}
@@ -3314,7 +3314,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRJOINDOMAIN(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRUNJOINDOMAIN(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUNJOINDOMAIN *r)
+static NTSTATUS ndr_push_WKSSVC_NETRUNJOINDOMAIN(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRUNJOINDOMAIN *r)
{
if (flags & NDR_IN) {
}
@@ -3324,7 +3324,7 @@ NTSTATUS ndr_push_WKSSVC_NETRUNJOINDOMAIN(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRUNJOINDOMAIN(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUNJOINDOMAIN *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRUNJOINDOMAIN(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRUNJOINDOMAIN *r)
{
if (flags & NDR_IN) {
}
@@ -3355,7 +3355,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRUNJOINDOMAIN(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r)
+static NTSTATUS ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r)
{
if (flags & NDR_IN) {
}
@@ -3365,7 +3365,7 @@ NTSTATUS ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_push *ndr, int fla
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r)
{
if (flags & NDR_IN) {
}
@@ -3396,7 +3396,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRVALIDATENAME(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRVALIDATENAME *r)
+static NTSTATUS ndr_push_WKSSVC_NETRVALIDATENAME(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRVALIDATENAME *r)
{
if (flags & NDR_IN) {
}
@@ -3406,7 +3406,7 @@ NTSTATUS ndr_push_WKSSVC_NETRVALIDATENAME(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRVALIDATENAME(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRVALIDATENAME *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRVALIDATENAME(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRVALIDATENAME *r)
{
if (flags & NDR_IN) {
}
@@ -3437,7 +3437,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRVALIDATENAME(struct ndr_print *ndr, const cha
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRGETJOININFORMATION(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRGETJOININFORMATION *r)
+static NTSTATUS ndr_push_WKSSVC_NETRGETJOININFORMATION(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRGETJOININFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -3447,7 +3447,7 @@ NTSTATUS ndr_push_WKSSVC_NETRGETJOININFORMATION(struct ndr_push *ndr, int flags,
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRGETJOININFORMATION(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRGETJOININFORMATION *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRGETJOININFORMATION(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRGETJOININFORMATION *r)
{
if (flags & NDR_IN) {
}
@@ -3478,7 +3478,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRGETJOININFORMATION(struct ndr_print *ndr, con
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRGETJOINABLEOUS(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRGETJOINABLEOUS *r)
+static NTSTATUS ndr_push_WKSSVC_NETRGETJOINABLEOUS(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRGETJOINABLEOUS *r)
{
if (flags & NDR_IN) {
}
@@ -3488,7 +3488,7 @@ NTSTATUS ndr_push_WKSSVC_NETRGETJOINABLEOUS(struct ndr_push *ndr, int flags, con
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRGETJOINABLEOUS(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRGETJOINABLEOUS *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRGETJOINABLEOUS(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRGETJOINABLEOUS *r)
{
if (flags & NDR_IN) {
}
@@ -3519,7 +3519,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRGETJOINABLEOUS(struct ndr_print *ndr, const c
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetrJoinDomain2(struct ndr_push *ndr, int flags, const struct wkssvc_NetrJoinDomain2 *r)
+static NTSTATUS ndr_push_wkssvc_NetrJoinDomain2(struct ndr_push *ndr, int flags, const struct wkssvc_NetrJoinDomain2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -3560,7 +3560,7 @@ NTSTATUS ndr_push_wkssvc_NetrJoinDomain2(struct ndr_push *ndr, int flags, const
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetrJoinDomain2(struct ndr_pull *ndr, int flags, struct wkssvc_NetrJoinDomain2 *r)
+static NTSTATUS ndr_pull_wkssvc_NetrJoinDomain2(struct ndr_pull *ndr, int flags, struct wkssvc_NetrJoinDomain2 *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_account_name;
@@ -3702,7 +3702,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrJoinDomain2(struct ndr_print *ndr, const char
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetrUnjoinDomain2(struct ndr_push *ndr, int flags, const struct wkssvc_NetrUnjoinDomain2 *r)
+static NTSTATUS ndr_push_wkssvc_NetrUnjoinDomain2(struct ndr_push *ndr, int flags, const struct wkssvc_NetrUnjoinDomain2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -3731,7 +3731,7 @@ NTSTATUS ndr_push_wkssvc_NetrUnjoinDomain2(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetrUnjoinDomain2(struct ndr_pull *ndr, int flags, struct wkssvc_NetrUnjoinDomain2 *r)
+static NTSTATUS ndr_pull_wkssvc_NetrUnjoinDomain2(struct ndr_pull *ndr, int flags, struct wkssvc_NetrUnjoinDomain2 *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_account;
@@ -3836,7 +3836,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUnjoinDomain2(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetrRenameMachineInDomain2(struct ndr_push *ndr, int flags, const struct wkssvc_NetrRenameMachineInDomain2 *r)
+static NTSTATUS ndr_push_wkssvc_NetrRenameMachineInDomain2(struct ndr_push *ndr, int flags, const struct wkssvc_NetrRenameMachineInDomain2 *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -3872,7 +3872,7 @@ NTSTATUS ndr_push_wkssvc_NetrRenameMachineInDomain2(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetrRenameMachineInDomain2(struct ndr_pull *ndr, int flags, struct wkssvc_NetrRenameMachineInDomain2 *r)
+static NTSTATUS ndr_pull_wkssvc_NetrRenameMachineInDomain2(struct ndr_pull *ndr, int flags, struct wkssvc_NetrRenameMachineInDomain2 *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_NewMachineName;
@@ -4003,7 +4003,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrRenameMachineInDomain2(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRVALIDATENAME2(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRVALIDATENAME2 *r)
+static NTSTATUS ndr_push_WKSSVC_NETRVALIDATENAME2(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRVALIDATENAME2 *r)
{
if (flags & NDR_IN) {
}
@@ -4013,7 +4013,7 @@ NTSTATUS ndr_push_WKSSVC_NETRVALIDATENAME2(struct ndr_push *ndr, int flags, cons
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRVALIDATENAME2(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRVALIDATENAME2 *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRVALIDATENAME2(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRVALIDATENAME2 *r)
{
if (flags & NDR_IN) {
}
@@ -4044,7 +4044,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRVALIDATENAME2(struct ndr_print *ndr, const ch
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRGETJOINABLEOUS2 *r)
+static NTSTATUS ndr_push_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRGETJOINABLEOUS2 *r)
{
if (flags & NDR_IN) {
}
@@ -4054,7 +4054,7 @@ NTSTATUS ndr_push_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_push *ndr, int flags, co
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRGETJOINABLEOUS2 *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRGETJOINABLEOUS2 *r)
{
if (flags & NDR_IN) {
}
@@ -4085,7 +4085,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRGETJOINABLEOUS2(struct ndr_print *ndr, const
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetrAddAlternateComputerName(struct ndr_push *ndr, int flags, const struct wkssvc_NetrAddAlternateComputerName *r)
+static NTSTATUS ndr_push_wkssvc_NetrAddAlternateComputerName(struct ndr_push *ndr, int flags, const struct wkssvc_NetrAddAlternateComputerName *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -4121,7 +4121,7 @@ NTSTATUS ndr_push_wkssvc_NetrAddAlternateComputerName(struct ndr_push *ndr, int
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetrAddAlternateComputerName(struct ndr_pull *ndr, int flags, struct wkssvc_NetrAddAlternateComputerName *r)
+static NTSTATUS ndr_pull_wkssvc_NetrAddAlternateComputerName(struct ndr_pull *ndr, int flags, struct wkssvc_NetrAddAlternateComputerName *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_NewAlternateMachineName;
@@ -4252,7 +4252,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrAddAlternateComputerName(struct ndr_print *nd
ndr->depth--;
}
-NTSTATUS ndr_push_wkssvc_NetrRemoveAlternateComputerName(struct ndr_push *ndr, int flags, const struct wkssvc_NetrRemoveAlternateComputerName *r)
+static NTSTATUS ndr_push_wkssvc_NetrRemoveAlternateComputerName(struct ndr_push *ndr, int flags, const struct wkssvc_NetrRemoveAlternateComputerName *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
@@ -4288,7 +4288,7 @@ NTSTATUS ndr_push_wkssvc_NetrRemoveAlternateComputerName(struct ndr_push *ndr, i
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_wkssvc_NetrRemoveAlternateComputerName(struct ndr_pull *ndr, int flags, struct wkssvc_NetrRemoveAlternateComputerName *r)
+static NTSTATUS ndr_pull_wkssvc_NetrRemoveAlternateComputerName(struct ndr_pull *ndr, int flags, struct wkssvc_NetrRemoveAlternateComputerName *r)
{
uint32_t _ptr_server_name;
uint32_t _ptr_AlternateMachineNameToRemove;
@@ -4419,7 +4419,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrRemoveAlternateComputerName(struct ndr_print
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r)
+static NTSTATUS ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r)
{
if (flags & NDR_IN) {
}
@@ -4429,7 +4429,7 @@ NTSTATUS ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r)
{
if (flags & NDR_IN) {
}
@@ -4460,7 +4460,7 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct ndr_print *ndr,
ndr->depth--;
}
-NTSTATUS ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r)
+static NTSTATUS ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_push *ndr, int flags, const struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r)
{
if (flags & NDR_IN) {
}
@@ -4470,7 +4470,7 @@ NTSTATUS ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_push *ndr, int fl
return NT_STATUS_OK;
}
-NTSTATUS ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r)
+static NTSTATUS ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_pull *ndr, int flags, struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r)
{
if (flags & NDR_IN) {
}
@@ -4501,14 +4501,14 @@ _PUBLIC_ void ndr_print_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct ndr_print *ndr,
ndr->depth--;
}
-const struct ndr_interface_call wkssvc_calls[] = {
+static const struct ndr_interface_call wkssvc_calls[] = {
{
"wkssvc_NetWkstaGetInfo",
sizeof(struct wkssvc_NetWkstaGetInfo),
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetWkstaGetInfo,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetWkstaGetInfo,
(ndr_print_function_t) ndr_print_wkssvc_NetWkstaGetInfo,
- False,
+ false,
},
{
"wkssvc_NetWkstaSetInfo",
@@ -4516,7 +4516,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetWkstaSetInfo,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetWkstaSetInfo,
(ndr_print_function_t) ndr_print_wkssvc_NetWkstaSetInfo,
- False,
+ false,
},
{
"wkssvc_NetWkstaEnumUsers",
@@ -4524,7 +4524,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetWkstaEnumUsers,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetWkstaEnumUsers,
(ndr_print_function_t) ndr_print_wkssvc_NetWkstaEnumUsers,
- False,
+ false,
},
{
"WKSSVC_NETRWKSTAUSERGETINFO",
@@ -4532,7 +4532,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRWKSTAUSERGETINFO,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO,
(ndr_print_function_t) ndr_print_WKSSVC_NETRWKSTAUSERGETINFO,
- False,
+ false,
},
{
"WKSSVC_NETRWKSTAUSERSETINFO",
@@ -4540,7 +4540,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRWKSTAUSERSETINFO,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO,
(ndr_print_function_t) ndr_print_WKSSVC_NETRWKSTAUSERSETINFO,
- False,
+ false,
},
{
"wkssvc_NetWkstaTransportEnum",
@@ -4548,7 +4548,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetWkstaTransportEnum,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetWkstaTransportEnum,
(ndr_print_function_t) ndr_print_wkssvc_NetWkstaTransportEnum,
- False,
+ false,
},
{
"WKSSVC_NETRWKSTATRANSPORTADD",
@@ -4556,7 +4556,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRWKSTATRANSPORTADD,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD,
(ndr_print_function_t) ndr_print_WKSSVC_NETRWKSTATRANSPORTADD,
- False,
+ false,
},
{
"WKSSVC_NETRWKSTATRANSPORTDEL",
@@ -4564,7 +4564,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL,
(ndr_print_function_t) ndr_print_WKSSVC_NETRWKSTATRANSPORTDEL,
- False,
+ false,
},
{
"WKSSVC_NETRUSEADD",
@@ -4572,7 +4572,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRUSEADD,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRUSEADD,
(ndr_print_function_t) ndr_print_WKSSVC_NETRUSEADD,
- False,
+ false,
},
{
"WKSSVC_NETRUSEGETINFO",
@@ -4580,7 +4580,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRUSEGETINFO,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRUSEGETINFO,
(ndr_print_function_t) ndr_print_WKSSVC_NETRUSEGETINFO,
- False,
+ false,
},
{
"WKSSVC_NETRUSEDEL",
@@ -4588,7 +4588,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRUSEDEL,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRUSEDEL,
(ndr_print_function_t) ndr_print_WKSSVC_NETRUSEDEL,
- False,
+ false,
},
{
"WKSSVC_NETRUSEENUM",
@@ -4596,7 +4596,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRUSEENUM,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRUSEENUM,
(ndr_print_function_t) ndr_print_WKSSVC_NETRUSEENUM,
- False,
+ false,
},
{
"WKSSVC_NETRMESSAGEBUFFERSEND",
@@ -4604,7 +4604,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND,
(ndr_print_function_t) ndr_print_WKSSVC_NETRMESSAGEBUFFERSEND,
- False,
+ false,
},
{
"WKSSVC_NETRWORKSTATIONSTATISTICSGET",
@@ -4612,7 +4612,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET,
(ndr_print_function_t) ndr_print_WKSSVC_NETRWORKSTATIONSTATISTICSGET,
- False,
+ false,
},
{
"WKSSVC_NETRLOGONDOMAINNAMEADD",
@@ -4620,7 +4620,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD,
(ndr_print_function_t) ndr_print_WKSSVC_NETRLOGONDOMAINNAMEADD,
- False,
+ false,
},
{
"WKSSVC_NETRLOGONDOMAINNAMEDEL",
@@ -4628,7 +4628,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL,
(ndr_print_function_t) ndr_print_WKSSVC_NETRLOGONDOMAINNAMEDEL,
- False,
+ false,
},
{
"WKSSVC_NETRJOINDOMAIN",
@@ -4636,7 +4636,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRJOINDOMAIN,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRJOINDOMAIN,
(ndr_print_function_t) ndr_print_WKSSVC_NETRJOINDOMAIN,
- False,
+ false,
},
{
"WKSSVC_NETRUNJOINDOMAIN",
@@ -4644,7 +4644,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRUNJOINDOMAIN,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRUNJOINDOMAIN,
(ndr_print_function_t) ndr_print_WKSSVC_NETRUNJOINDOMAIN,
- False,
+ false,
},
{
"WKSSVC_NETRRENAMEMACHINEINDOMAIN",
@@ -4652,7 +4652,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN,
(ndr_print_function_t) ndr_print_WKSSVC_NETRRENAMEMACHINEINDOMAIN,
- False,
+ false,
},
{
"WKSSVC_NETRVALIDATENAME",
@@ -4660,7 +4660,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRVALIDATENAME,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRVALIDATENAME,
(ndr_print_function_t) ndr_print_WKSSVC_NETRVALIDATENAME,
- False,
+ false,
},
{
"WKSSVC_NETRGETJOININFORMATION",
@@ -4668,7 +4668,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRGETJOININFORMATION,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRGETJOININFORMATION,
(ndr_print_function_t) ndr_print_WKSSVC_NETRGETJOININFORMATION,
- False,
+ false,
},
{
"WKSSVC_NETRGETJOINABLEOUS",
@@ -4676,7 +4676,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRGETJOINABLEOUS,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRGETJOINABLEOUS,
(ndr_print_function_t) ndr_print_WKSSVC_NETRGETJOINABLEOUS,
- False,
+ false,
},
{
"wkssvc_NetrJoinDomain2",
@@ -4684,7 +4684,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetrJoinDomain2,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrJoinDomain2,
(ndr_print_function_t) ndr_print_wkssvc_NetrJoinDomain2,
- False,
+ false,
},
{
"wkssvc_NetrUnjoinDomain2",
@@ -4692,7 +4692,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetrUnjoinDomain2,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrUnjoinDomain2,
(ndr_print_function_t) ndr_print_wkssvc_NetrUnjoinDomain2,
- False,
+ false,
},
{
"wkssvc_NetrRenameMachineInDomain2",
@@ -4700,7 +4700,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetrRenameMachineInDomain2,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrRenameMachineInDomain2,
(ndr_print_function_t) ndr_print_wkssvc_NetrRenameMachineInDomain2,
- False,
+ false,
},
{
"WKSSVC_NETRVALIDATENAME2",
@@ -4708,7 +4708,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRVALIDATENAME2,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRVALIDATENAME2,
(ndr_print_function_t) ndr_print_WKSSVC_NETRVALIDATENAME2,
- False,
+ false,
},
{
"WKSSVC_NETRGETJOINABLEOUS2",
@@ -4716,7 +4716,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRGETJOINABLEOUS2,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRGETJOINABLEOUS2,
(ndr_print_function_t) ndr_print_WKSSVC_NETRGETJOINABLEOUS2,
- False,
+ false,
},
{
"wkssvc_NetrAddAlternateComputerName",
@@ -4724,7 +4724,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetrAddAlternateComputerName,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrAddAlternateComputerName,
(ndr_print_function_t) ndr_print_wkssvc_NetrAddAlternateComputerName,
- False,
+ false,
},
{
"wkssvc_NetrRemoveAlternateComputerName",
@@ -4732,7 +4732,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_wkssvc_NetrRemoveAlternateComputerName,
(ndr_pull_flags_fn_t) ndr_pull_wkssvc_NetrRemoveAlternateComputerName,
(ndr_print_function_t) ndr_print_wkssvc_NetrRemoveAlternateComputerName,
- False,
+ false,
},
{
"WKSSVC_NETRSETPRIMARYCOMPUTERNAME",
@@ -4740,7 +4740,7 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME,
(ndr_print_function_t) ndr_print_WKSSVC_NETRSETPRIMARYCOMPUTERNAME,
- False,
+ false,
},
{
"WKSSVC_NETRENUMERATECOMPUTERNAMES",
@@ -4748,25 +4748,25 @@ const struct ndr_interface_call wkssvc_calls[] = {
(ndr_push_flags_fn_t) ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES,
(ndr_pull_flags_fn_t) ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES,
(ndr_print_function_t) ndr_print_WKSSVC_NETRENUMERATECOMPUTERNAMES,
- False,
+ false,
},
- { NULL, 0, NULL, NULL, NULL, False }
+ { NULL, 0, NULL, NULL, NULL, false }
};
-const char * const wkssvc_endpoint_strings[] = {
+static const char * const wkssvc_endpoint_strings[] = {
"ncacn_np:[\\pipe\\wkssvc]",
};
-const struct ndr_interface_string_array wkssvc_endpoints = {
+static const struct ndr_interface_string_array wkssvc_endpoints = {
.count = 1,
.names = wkssvc_endpoint_strings
};
-const char * const wkssvc_authservice_strings[] = {
+static const char * const wkssvc_authservice_strings[] = {
"host",
};
-const struct ndr_interface_string_array wkssvc_authservices = {
+static const struct ndr_interface_string_array wkssvc_authservices = {
.count = 1,
.names = wkssvc_authservice_strings
};
diff --git a/source/libsmb/clispnego.c b/source/libsmb/clispnego.c
index f93cbcf39b4..9432ce81d3c 100644
--- a/source/libsmb/clispnego.c
+++ b/source/libsmb/clispnego.c
@@ -557,6 +557,20 @@ BOOL spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status,
data.has_error = 1;
}
+ /* Binding against Win2K DC returns a duplicate of the responseToken in
+ * the optional mechListMIC field. This is a bug in Win2K. We ignore
+ * this field if it exists. Win2K8 may return a proper mechListMIC at
+ * which point we need to implement the integrity checking. */
+ if (asn1_tag_remaining(&data)) {
+ DATA_BLOB mechList = data_blob_null;
+ asn1_start_tag(&data, ASN1_CONTEXT(3));
+ asn1_read_OctetString(&data, &mechList);
+ asn1_end_tag(&data);
+ data_blob_free(&mechList);
+ DEBUG(5,("spnego_parse_auth_response received mechListMIC, "
+ "ignoring.\n"));
+ }
+
asn1_end_tag(&data);
asn1_end_tag(&data);
diff --git a/source/libsmb/ntlmssp_parse.c b/source/libsmb/ntlmssp_parse.c
index f17af38e8ed..15739d3068e 100644
--- a/source/libsmb/ntlmssp_parse.c
+++ b/source/libsmb/ntlmssp_parse.c
@@ -151,7 +151,8 @@ BOOL msrpc_gen(DATA_BLOB *blob,
break;
case 'C':
s = va_arg(ap, char *);
- head_ofs += push_string(NULL, blob->data+head_ofs, s, -1,
+ n = str_charnum(s) + 1;
+ head_ofs += push_string(NULL, blob->data+head_ofs, s, n,
STR_ASCII|STR_TERMINATE);
break;
}
diff --git a/source/modules/vfs_catia.c b/source/modules/vfs_catia.c
index 3bdd4116a8e..325ec16e499 100644
--- a/source/modules/vfs_catia.c
+++ b/source/modules/vfs_catia.c
@@ -39,7 +39,7 @@ static void catia_string_replace(char *s, unsigned char oldc, unsigned
for (;*ptr;ptr++)
if (*ptr==old) *ptr=newc;
- pull_ucs2(NULL, s, tmpbuf, -1, sizeof(tmpbuf), STR_TERMINATE);
+ pull_ucs2(NULL, s, tmpbuf, sizeof(pstring), sizeof(tmpbuf), STR_TERMINATE);
}
static void from_unix(char *s)
diff --git a/source/nmbd/nmbd_processlogon.c b/source/nmbd/nmbd_processlogon.c
index e837939fa36..abac2ac7764 100644
--- a/source/nmbd/nmbd_processlogon.c
+++ b/source/nmbd/nmbd_processlogon.c
@@ -53,6 +53,7 @@ void process_logon_packet(struct packet_struct *p, char *buf,int len,
char *uniuser; /* Unicode user name. */
pstring ascuser;
char *unicomp; /* Unicode computer name. */
+ size_t size;
memset(outbuf, 0, sizeof(outbuf));
@@ -68,7 +69,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
DEBUG(4,("process_logon_packet: Logon from %s: code = 0x%x\n", inet_ntoa(p->ip), code));
switch (code) {
- case 0:
+ case 0:
{
fstring mach_str, user_str, getdc_str;
char *q = buf + 2;
@@ -108,7 +109,12 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
fstrcpy(reply_name, "\\\\");
fstrcat(reply_name, my_name);
- push_ascii_fstring(q, reply_name);
+ size = push_ascii(q,reply_name,
+ sizeof(outbuf)-PTR_DIFF(q, outbuf),
+ STR_TERMINATE);
+ if (size == (size_t)-1) {
+ return;
+ }
q = skip_string(outbuf,sizeof(outbuf),q); /* PDC name */
SSVAL(q, 0, token);
@@ -116,7 +122,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
dump_data(4, (uint8 *)outbuf, PTR_DIFF(q, outbuf));
- send_mailslot(True, getdc_str,
+ send_mailslot(True, getdc_str,
outbuf,PTR_DIFF(q,outbuf),
global_myname(), 0x0,
mach_str,
@@ -132,7 +138,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
char *q = buf + 2;
char *machine = q;
- if (!lp_domain_master()) {
+ if (!lp_domain_master()) {
/* We're not Primary Domain Controller -- ignore this */
return;
}
@@ -204,7 +210,12 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
q += 2;
fstrcpy(reply_name,my_name);
- push_ascii_fstring(q, reply_name);
+ size = push_ascii(q, reply_name,
+ sizeof(outbuf)-PTR_DIFF(q, outbuf),
+ STR_TERMINATE);
+ if (size == (size_t)-1) {
+ return;
+ }
q = skip_string(outbuf,sizeof(outbuf),q); /* PDC name */
/* PDC and domain name */
@@ -212,8 +223,15 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
/* Make a full reply */
q = ALIGN2(q, outbuf);
- q += dos_PutUniCode(q, my_name, sizeof(pstring), True); /* PDC name */
- q += dos_PutUniCode(q, lp_workgroup(),sizeof(pstring), True); /* Domain name*/
+ q += dos_PutUniCode(q, my_name,
+ sizeof(pstring) - PTR_DIFF(q, outbuf),
+ True); /* PDC name */
+ q += dos_PutUniCode(q, lp_workgroup(),
+ sizeof(pstring) - PTR_DIFF(q, outbuf),
+ True); /* Domain name*/
+ if (sizeof(pstring) - PTR_DIFF(q, outbuf) < 8) {
+ return;
+ }
SIVAL(q, 0, 1); /* our nt version */
SSVAL(q, 4, 0xffff); /* our lmnttoken */
SSVAL(q, 6, 0xffff); /* our lm20token */
@@ -349,9 +367,15 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
q += 2;
- q += dos_PutUniCode(q, reply_name,sizeof(pstring), True);
- q += dos_PutUniCode(q, ascuser, sizeof(pstring), True);
- q += dos_PutUniCode(q, lp_workgroup(),sizeof(pstring), True);
+ q += dos_PutUniCode(q, reply_name,
+ sizeof(pstring) - PTR_DIFF(q, outbuf),
+ True);
+ q += dos_PutUniCode(q, ascuser,
+ sizeof(pstring) - PTR_DIFF(q, outbuf),
+ True);
+ q += dos_PutUniCode(q, lp_workgroup(),
+ sizeof(pstring) - PTR_DIFF(q, outbuf),
+ True);
}
#ifdef HAVE_ADS
else {
@@ -360,13 +384,15 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
pstring domain;
pstring hostname;
char *component, *dc, *q1;
- uint8 size;
char *q_orig = q;
int str_offset;
get_mydnsdomname(domain);
get_myname(hostname);
-
+
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 8) {
+ return;
+ }
if (SVAL(uniuser, 0) == 0) {
SIVAL(q, 0, SAMLOGON_AD_UNK_R); /* user unknown */
} else {
@@ -379,6 +405,9 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
q += 4;
/* Push Domain GUID */
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < UUID_FLAT_SIZE) {
+ return;
+ }
if (False == secrets_fetch_domain_guid(domain, &domain_guid)) {
DEBUG(2, ("Could not fetch DomainGUID for %s\n", domain));
return;
@@ -394,12 +423,23 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
q1 = q;
while ((component = strtok(dc, "."))) {
dc = NULL;
- size = push_ascii(&q[1], component, -1, 0);
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 1) {
+ return;
+ }
+ size = push_ascii(&q[1], component,
+ sizeof(outbuf) - PTR_DIFF(q+1, outbuf),
+ 0);
+ if (size == (size_t)-1 || size > 0xff) {
+ return;
+ }
SCVAL(q, 0, size);
q += (size + 1);
}
/* Unk0 */
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 4) {
+ return;
+ }
SCVAL(q, 0, 0);
q++;
@@ -409,44 +449,89 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
q += 2;
/* Hostname */
- size = push_ascii(&q[1], hostname, -1, 0);
+ size = push_ascii(&q[1], hostname,
+ sizeof(outbuf) - PTR_DIFF(q+1, outbuf),
+ 0);
+ if (size == (size_t)-1 || size > 0xff) {
+ return;
+ }
SCVAL(q, 0, size);
q += (size + 1);
+
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 3) {
+ return;
+ }
+
SCVAL(q, 0, 0xc0 | ((str_offset >> 8) & 0x3F));
SCVAL(q, 1, str_offset & 0xFF);
q += 2;
/* NETBIOS of domain */
- size = push_ascii(&q[1], lp_workgroup(), -1, STR_UPPER);
+ size = push_ascii(&q[1], lp_workgroup(),
+ sizeof(outbuf) - PTR_DIFF(q+1, outbuf),
+ STR_UPPER);
+ if (size == (size_t)-1 || size > 0xff) {
+ return;
+ }
SCVAL(q, 0, size);
q += (size + 1);
/* Unk1 */
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 2) {
+ return;
+ }
+
SCVAL(q, 0, 0);
q++;
/* NETBIOS of hostname */
- size = push_ascii(&q[1], my_name, -1, 0);
+ size = push_ascii(&q[1], my_name,
+ sizeof(outbuf) - PTR_DIFF(q+1, outbuf),
+ 0);
+ if (size == (size_t)-1 || size > 0xff) {
+ return;
+ }
SCVAL(q, 0, size);
q += (size + 1);
/* Unk2 */
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 4) {
+ return;
+ }
+
SCVAL(q, 0, 0);
q++;
/* User name */
if (SVAL(uniuser, 0) != 0) {
- size = push_ascii(&q[1], ascuser, -1, 0);
+ size = push_ascii(&q[1], ascuser,
+ sizeof(outbuf) - PTR_DIFF(q+1, outbuf),
+ 0);
+ if (size == (size_t)-1 || size > 0xff) {
+ return;
+ }
SCVAL(q, 0, size);
q += (size + 1);
}
q_orig = q;
/* Site name */
- size = push_ascii(&q[1], "Default-First-Site-Name", -1, 0);
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 1) {
+ return;
+ }
+ size = push_ascii(&q[1], "Default-First-Site-Name",
+ sizeof(outbuf) - PTR_DIFF(q+1, outbuf),
+ 0);
+ if (size == (size_t)-1 || size > 0xff) {
+ return;
+ }
SCVAL(q, 0, size);
q += (size + 1);
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 18) {
+ return;
+ }
+
/* Site name (2) */
str_offset = q - q_orig;
SCVAL(q, 0, 0xc0 | ((str_offset >> 8) & 0x3F));
@@ -464,13 +549,17 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
q += 4; /* unknown */
SIVAL(q, 0, 0x00000000);
q += 4; /* unknown */
- }
+ }
#endif
+ if (sizeof(outbuf) - PTR_DIFF(q, outbuf) < 8) {
+ return;
+ }
+
/* tell the client what version we are */
SIVAL(q, 0, ((ntversion < 11) || (SEC_ADS != lp_security())) ? 1 : 13);
/* our ntversion */
- SSVAL(q, 4, 0xffff); /* our lmnttoken */
+ SSVAL(q, 4, 0xffff); /* our lmnttoken */
SSVAL(q, 6, 0xffff); /* our lm20token */
q += 8;
@@ -484,7 +573,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
global_myname(), 0x0,
source_name,
dgram->source_name.name_type,
- p->ip, *iface_ip(p->ip), p->port);
+ p->ip, *iface_ip(p->ip), p->port);
break;
}
diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c
index 25f7540e066..fde5b036117 100644
--- a/source/nsswitch/pam_winbind.c
+++ b/source/nsswitch/pam_winbind.c
@@ -5,22 +5,24 @@
Copyright Andrew Bartlett <abartlet@samba.org> 2002
Copyright Guenther Deschner <gd@samba.org> 2005-2007
- largely based on pam_userdb by Cristian Gafton <gafton@redhat.com>
- also contains large slabs of code from pam_unix by Elliot Lee <sopwith@redhat.com>
- (see copyright below for full details)
+ largely based on pam_userdb by Cristian Gafton <gafton@redhat.com> also
+ contains large slabs of code from pam_unix by Elliot Lee
+ <sopwith@redhat.com> (see copyright below for full details)
*/
#include "pam_winbind.h"
#define _PAM_LOG_FUNCTION_ENTER(function, pamh, ctrl, flags) \
do { \
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "[pamh: %p] ENTER: " function " (flags: 0x%04x)", pamh, flags); \
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG, "[pamh: %p] ENTER: " \
+ function " (flags: 0x%04x)", pamh, flags); \
_pam_log_state(pamh, ctrl); \
} while (0)
#define _PAM_LOG_FUNCTION_LEAVE(function, pamh, ctrl, retval) \
do { \
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "[pamh: %p] LEAVE: " function " returning %d", pamh, retval); \
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG, "[pamh: %p] LEAVE: " \
+ function " returning %d", pamh, retval); \
_pam_log_state(pamh, ctrl); \
} while (0)
@@ -29,17 +31,19 @@
#define MAX_PASSWD_TRIES 3
/*
- * Work around the pam API that has functions with void ** as parameters.
+ * Work around the pam API that has functions with void ** as parameters
* These lead to strict aliasing warnings with gcc.
*/
-static int _pam_get_item(const pam_handle_t *pamh, int item_type,
+static int _pam_get_item(const pam_handle_t *pamh,
+ int item_type,
const void *_item)
{
const void **item = (const void **)_item;
return pam_get_item(pamh, item_type, item);
}
static int _pam_get_data(const pam_handle_t *pamh,
- const char *module_data_name, const void *_data)
+ const char *module_data_name,
+ const void *_data)
{
const void **data = (const void **)_data;
return pam_get_data(pamh, module_data_name, data);
@@ -48,12 +52,18 @@ static int _pam_get_data(const pam_handle_t *pamh,
/* some syslogging */
#ifdef HAVE_PAM_VSYSLOG
-static void _pam_log_int(const pam_handle_t *pamh, int err, const char *format, va_list args)
+static void _pam_log_int(const pam_handle_t *pamh,
+ int err,
+ const char *format,
+ va_list args)
{
pam_vsyslog(pamh, err, format, args);
}
#else
-static void _pam_log_int(const pam_handle_t *pamh, int err, const char *format, va_list args)
+static void _pam_log_int(const pam_handle_t *pamh,
+ int err,
+ const char *format,
+ va_list args)
{
char *format2 = NULL;
const char *service;
@@ -73,7 +83,7 @@ static void _pam_log_int(const pam_handle_t *pamh, int err, const char *format,
}
#endif /* HAVE_PAM_VSYSLOG */
-static BOOL _pam_log_is_silent(int ctrl)
+static bool _pam_log_is_silent(int ctrl)
{
return on(ctrl, WINBIND_SILENT);
}
@@ -92,27 +102,27 @@ static void _pam_log(const pam_handle_t *pamh, int ctrl, int err, const char *fo
va_end(args);
}
-static BOOL _pam_log_is_debug_enabled(int ctrl)
+static bool _pam_log_is_debug_enabled(int ctrl)
{
if (ctrl == -1) {
- return False;
+ return false;
}
if (_pam_log_is_silent(ctrl)) {
- return False;
+ return false;
}
if (!(ctrl & WINBIND_DEBUG_ARG)) {
- return False;
+ return false;
}
- return True;
+ return true;
}
-static BOOL _pam_log_is_debug_state_enabled(int ctrl)
+static bool _pam_log_is_debug_state_enabled(int ctrl)
{
if (!(ctrl & WINBIND_DEBUG_STATE)) {
- return False;
+ return false;
}
return _pam_log_is_debug_enabled(ctrl);
@@ -132,7 +142,11 @@ static void _pam_log_debug(const pam_handle_t *pamh, int ctrl, int err, const ch
va_end(args);
}
-static void _pam_log_state_datum(const pam_handle_t *pamh, int ctrl, int item_type, const char *key, int is_string)
+static void _pam_log_state_datum(const pam_handle_t *pamh,
+ int ctrl,
+ int item_type,
+ const char *key,
+ int is_string)
{
const void *data = NULL;
if (item_type != 0) {
@@ -143,9 +157,14 @@ static void _pam_log_state_datum(const pam_handle_t *pamh, int ctrl, int item_ty
if (data != NULL) {
const char *type = (item_type != 0) ? "ITEM" : "DATA";
if (is_string != 0) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "[pamh: %p] STATE: %s(%s) = \"%s\" (%p)", pamh, type, key, (const char *) data, data);
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "[pamh: %p] STATE: %s(%s) = \"%s\" (%p)",
+ pamh, type, key, (const char *)data,
+ data);
} else {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "[pamh: %p] STATE: %s(%s) = %p", pamh, type, key, data);
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "[pamh: %p] STATE: %s(%s) = %p",
+ pamh, type, key, data);
}
}
}
@@ -169,7 +188,8 @@ static void _pam_log_state_datum(const pam_handle_t *pamh, int ctrl, int item_ty
#endif
#define _PAM_LOG_STATE_ITEM_PASSWORD(pamh, ctrl, item_type) \
- _pam_log_state_datum(pamh, ctrl, item_type, #item_type, _LOG_PASSWORD_AS_STRING)
+ _pam_log_state_datum(pamh, ctrl, item_type, #item_type, \
+ _LOG_PASSWORD_AS_STRING)
static void _pam_log_state(const pam_handle_t *pamh, int ctrl)
{
@@ -197,12 +217,19 @@ static void _pam_log_state(const pam_handle_t *pamh, int ctrl)
_PAM_LOG_STATE_DATA_STRING(pamh, ctrl, PAM_WINBIND_LOGONSCRIPT);
_PAM_LOG_STATE_DATA_STRING(pamh, ctrl, PAM_WINBIND_LOGONSERVER);
_PAM_LOG_STATE_DATA_STRING(pamh, ctrl, PAM_WINBIND_PROFILEPATH);
- _PAM_LOG_STATE_DATA_STRING(pamh, ctrl, PAM_WINBIND_NEW_AUTHTOK_REQD); /* Use atoi to get PAM result code */
- _PAM_LOG_STATE_DATA_STRING(pamh, ctrl, PAM_WINBIND_NEW_AUTHTOK_REQD_DURING_AUTH);
+ _PAM_LOG_STATE_DATA_STRING(pamh, ctrl,
+ PAM_WINBIND_NEW_AUTHTOK_REQD);
+ /* Use atoi to get PAM result code */
+ _PAM_LOG_STATE_DATA_STRING(pamh, ctrl,
+ PAM_WINBIND_NEW_AUTHTOK_REQD_DURING_AUTH);
_PAM_LOG_STATE_DATA_POINTER(pamh, ctrl, PAM_WINBIND_PWD_LAST_SET);
}
-static int _pam_parse(const pam_handle_t *pamh, int flags, int argc, const char **argv, dictionary **result_d)
+static int _pam_parse(const pam_handle_t *pamh,
+ int flags,
+ int argc,
+ const char **argv,
+ dictionary **result_d)
{
int ctrl = 0;
const char *config_file = NULL;
@@ -231,23 +258,23 @@ static int _pam_parse(const pam_handle_t *pamh, int flags, int argc, const char
goto config_from_pam;
}
- if (iniparser_getboolean(d, "global:debug", False)) {
+ if (iniparser_getboolean(d, "global:debug", false)) {
ctrl |= WINBIND_DEBUG_ARG;
}
- if (iniparser_getboolean(d, "global:debug_state", False)) {
+ if (iniparser_getboolean(d, "global:debug_state", false)) {
ctrl |= WINBIND_DEBUG_STATE;
}
- if (iniparser_getboolean(d, "global:cached_login", False)) {
+ if (iniparser_getboolean(d, "global:cached_login", false)) {
ctrl |= WINBIND_CACHED_LOGIN;
}
- if (iniparser_getboolean(d, "global:krb5_auth", False)) {
+ if (iniparser_getboolean(d, "global:krb5_auth", false)) {
ctrl |= WINBIND_KRB5_AUTH;
}
- if (iniparser_getboolean(d, "global:silent", False)) {
+ if (iniparser_getboolean(d, "global:silent", false)) {
ctrl |= WINBIND_SILENT;
}
@@ -260,7 +287,7 @@ static int _pam_parse(const pam_handle_t *pamh, int flags, int argc, const char
ctrl |= WINBIND_REQUIRED_MEMBERSHIP;
}
- if (iniparser_getboolean(d, "global:try_first_pass", False)) {
+ if (iniparser_getboolean(d, "global:try_first_pass", false)) {
ctrl |= WINBIND_TRY_FIRST_PASS_ARG;
}
@@ -287,18 +314,22 @@ config_from_pam:
ctrl |= WINBIND_TRY_FIRST_PASS_ARG;
else if (!strcasecmp(*v, "unknown_ok"))
ctrl |= WINBIND_UNKNOWN_OK_ARG;
- else if (!strncasecmp(*v, "require_membership_of", strlen("require_membership_of")))
+ else if (!strncasecmp(*v, "require_membership_of",
+ strlen("require_membership_of")))
ctrl |= WINBIND_REQUIRED_MEMBERSHIP;
- else if (!strncasecmp(*v, "require-membership-of", strlen("require-membership-of")))
+ else if (!strncasecmp(*v, "require-membership-of",
+ strlen("require-membership-of")))
ctrl |= WINBIND_REQUIRED_MEMBERSHIP;
else if (!strcasecmp(*v, "krb5_auth"))
ctrl |= WINBIND_KRB5_AUTH;
- else if (!strncasecmp(*v, "krb5_ccache_type", strlen("krb5_ccache_type")))
+ else if (!strncasecmp(*v, "krb5_ccache_type",
+ strlen("krb5_ccache_type")))
ctrl |= WINBIND_KRB5_CCACHE_TYPE;
else if (!strcasecmp(*v, "cached_login"))
ctrl |= WINBIND_CACHED_LOGIN;
else {
- _pam_log(pamh, ctrl, LOG_ERR, "pam_parse: unknown option: %s", *v);
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "pam_parse: unknown option: %s", *v);
return -1;
}
@@ -315,11 +346,16 @@ config_from_pam:
return ctrl;
};
-static void _pam_winbind_cleanup_func(pam_handle_t *pamh, void *data, int error_status)
+static void _pam_winbind_cleanup_func(pam_handle_t *pamh,
+ void *data,
+ int error_status)
{
int ctrl = _pam_parse(pamh, 0, 0, NULL, NULL);
if (_pam_log_is_debug_state_enabled(ctrl)) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "[pamh: %p] CLEAN: cleaning up PAM data %p (error_status = %d)", pamh, data, error_status);
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "[pamh: %p] CLEAN: cleaning up PAM data %p "
+ "(error_status = %d)", pamh, data,
+ error_status);
}
SAFE_FREE(data);
}
@@ -329,32 +365,54 @@ static const struct ntstatus_errors {
const char *ntstatus_string;
const char *error_string;
} ntstatus_errors[] = {
- {"NT_STATUS_OK", "Success"},
- {"NT_STATUS_BACKUP_CONTROLLER", "No primary Domain Controler available"},
- {"NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND", "No domain controllers found"},
- {"NT_STATUS_NO_LOGON_SERVERS", "No logon servers"},
- {"NT_STATUS_PWD_TOO_SHORT", "Password too short"},
- {"NT_STATUS_PWD_TOO_RECENT", "The password of this user is too recent to change"},
- {"NT_STATUS_PWD_HISTORY_CONFLICT", "Password is already in password history"},
- {"NT_STATUS_PASSWORD_EXPIRED", "Your password has expired"},
- {"NT_STATUS_PASSWORD_MUST_CHANGE", "You need to change your password now"},
- {"NT_STATUS_INVALID_WORKSTATION", "You are not allowed to logon from this workstation"},
- {"NT_STATUS_INVALID_LOGON_HOURS", "You are not allowed to logon at this time"},
- {"NT_STATUS_ACCOUNT_EXPIRED", "Your account has expired. Please contact your System administrator"}, /* SCNR */
- {"NT_STATUS_ACCOUNT_DISABLED", "Your account is disabled. Please contact your System administrator"}, /* SCNR */
- {"NT_STATUS_ACCOUNT_LOCKED_OUT", "Your account has been locked. Please contact your System administrator"}, /* SCNR */
- {"NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT", "Invalid Trust Account"},
- {"NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT", "Invalid Trust Account"},
- {"NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT", "Invalid Trust Account"},
- {"NT_STATUS_ACCESS_DENIED", "Access is denied"},
+ {"NT_STATUS_OK",
+ "Success"},
+ {"NT_STATUS_BACKUP_CONTROLLER",
+ "No primary Domain Controler available"},
+ {"NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND",
+ "No domain controllers found"},
+ {"NT_STATUS_NO_LOGON_SERVERS",
+ "No logon servers"},
+ {"NT_STATUS_PWD_TOO_SHORT",
+ "Password too short"},
+ {"NT_STATUS_PWD_TOO_RECENT",
+ "The password of this user is too recent to change"},
+ {"NT_STATUS_PWD_HISTORY_CONFLICT",
+ "Password is already in password history"},
+ {"NT_STATUS_PASSWORD_EXPIRED",
+ "Your password has expired"},
+ {"NT_STATUS_PASSWORD_MUST_CHANGE",
+ "You need to change your password now"},
+ {"NT_STATUS_INVALID_WORKSTATION",
+ "You are not allowed to logon from this workstation"},
+ {"NT_STATUS_INVALID_LOGON_HOURS",
+ "You are not allowed to logon at this time"},
+ {"NT_STATUS_ACCOUNT_EXPIRED",
+ "Your account has expired. "
+ "Please contact your System administrator"}, /* SCNR */
+ {"NT_STATUS_ACCOUNT_DISABLED",
+ "Your account is disabled. "
+ "Please contact your System administrator"}, /* SCNR */
+ {"NT_STATUS_ACCOUNT_LOCKED_OUT",
+ "Your account has been locked. "
+ "Please contact your System administrator"}, /* SCNR */
+ {"NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT",
+ "Invalid Trust Account"},
+ {"NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT",
+ "Invalid Trust Account"},
+ {"NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT",
+ "Invalid Trust Account"},
+ {"NT_STATUS_ACCESS_DENIED",
+ "Access is denied"},
{NULL, NULL}
};
-const char *_get_ntstatus_error_string(const char *nt_status_string)
+const char *_get_ntstatus_error_string(const char *nt_status_string)
{
int i;
for (i=0; ntstatus_errors[i].ntstatus_string != NULL; i++) {
- if (!strcasecmp(ntstatus_errors[i].ntstatus_string, nt_status_string)) {
+ if (!strcasecmp(ntstatus_errors[i].ntstatus_string,
+ nt_status_string)) {
return ntstatus_errors[i].error_string;
}
}
@@ -365,48 +423,57 @@ const char *_get_ntstatus_error_string(const char *nt_status_string)
/* Attempt a conversation */
-static int converse(pam_handle_t *pamh, int nargs,
+static int converse(pam_handle_t *pamh,
+ int nargs,
struct pam_message **message,
struct pam_response **response)
{
int retval;
struct pam_conv *conv;
- retval = _pam_get_item(pamh, PAM_CONV, &conv );
+ retval = _pam_get_item(pamh, PAM_CONV, &conv);
if (retval == PAM_SUCCESS) {
- retval = conv->conv(nargs, (const struct pam_message **)message,
+ retval = conv->conv(nargs,
+ (const struct pam_message **)message,
response, conv->appdata_ptr);
}
-
+
return retval; /* propagate error status */
}
-static int _make_remark(pam_handle_t * pamh, int flags, int type, const char *text)
+static int _make_remark(pam_handle_t * pamh,
+ int flags,
+ int type,
+ const char *text)
{
int retval = PAM_SUCCESS;
struct pam_message *pmsg[1], msg[1];
struct pam_response *resp;
-
+
if (flags & WINBIND_SILENT) {
return PAM_SUCCESS;
}
pmsg[0] = &msg[0];
- msg[0].msg = CONST_DISCARD(char *, text);
+ msg[0].msg = discard_const_p(char, text);
msg[0].msg_style = type;
-
+
resp = NULL;
retval = converse(pamh, 1, pmsg, &resp);
-
+
if (resp) {
_pam_drop_reply(resp, 1);
}
return retval;
}
-static int _make_remark_v(pam_handle_t * pamh, int flags, int type, const char *format, va_list args)
+static int _make_remark_v(pam_handle_t *pamh,
+ int flags,
+ int type,
+ const char *format,
+ va_list args)
{
char *var;
int ret;
@@ -434,29 +501,32 @@ static int _make_remark_format(pam_handle_t * pamh, int flags, int type, const c
return ret;
}
-static int pam_winbind_request(pam_handle_t * pamh, int ctrl,
+static int pam_winbind_request(pam_handle_t *pamh,
+ int ctrl,
enum winbindd_cmd req_type,
struct winbindd_request *request,
struct winbindd_response *response)
{
/* Fill in request and send down pipe */
- init_request(request, req_type);
-
- if (write_sock(request, sizeof(*request), 0, 0) == -1) {
- _pam_log(pamh, ctrl, LOG_ERR, "pam_winbind_request: write to socket failed!");
- close_sock();
+ winbindd_init_request(request, req_type);
+
+ if (winbind_write_sock(request, sizeof(*request), 0, 0) == -1) {
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "pam_winbind_request: write to socket failed!");
+ winbind_close_sock();
return PAM_SERVICE_ERR;
}
-
+
/* Wait for reply */
- if (read_reply(response) == -1) {
- _pam_log(pamh, ctrl, LOG_ERR, "pam_winbind_request: read from socket failed!");
- close_sock();
+ if (winbindd_read_reply(response) == -1) {
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "pam_winbind_request: read from socket failed!");
+ winbind_close_sock();
return PAM_SERVICE_ERR;
}
/* We are done with the socket - close it and avoid mischeif */
- close_sock();
+ winbind_close_sock();
/* Copy reply data from socket */
if (response->result == WINBINDD_OK) {
@@ -469,8 +539,9 @@ static int pam_winbind_request(pam_handle_t * pamh, int ctrl,
case WINBINDD_GETPWNAM:
case WINBINDD_LOOKUPNAME:
if (strlen(response->data.auth.nt_status_string) > 0) {
- _pam_log(pamh, ctrl, LOG_ERR, "request failed, NT error was %s",
- response->data.auth.nt_status_string);
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "request failed, NT error was %s",
+ response->data.auth.nt_status_string);
} else {
_pam_log(pamh, ctrl, LOG_ERR, "request failed");
}
@@ -480,20 +551,22 @@ static int pam_winbind_request(pam_handle_t * pamh, int ctrl,
}
if (response->data.auth.pam_error != PAM_SUCCESS) {
- _pam_log(pamh, ctrl, LOG_ERR, "request failed: %s, PAM error was %s (%d), NT error was %s",
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "request failed: %s, "
+ "PAM error was %s (%d), NT error was %s",
response->data.auth.error_string,
pam_strerror(pamh, response->data.auth.pam_error),
response->data.auth.pam_error,
response->data.auth.nt_status_string);
return response->data.auth.pam_error;
- }
-
+ }
+
_pam_log(pamh, ctrl, LOG_ERR, "request failed, but PAM error 0!");
return PAM_SERVICE_ERR;
}
-static int pam_winbind_request_log(pam_handle_t * pamh,
+static int pam_winbind_request_log(pam_handle_t *pamh,
int ctrl,
enum winbindd_cmd req_type,
struct winbindd_request *request,
@@ -507,26 +580,31 @@ static int pam_winbind_request_log(pam_handle_t * pamh,
switch (retval) {
case PAM_AUTH_ERR:
/* incorrect password */
- _pam_log(pamh, ctrl, LOG_WARNING, "user '%s' denied access (incorrect password or invalid membership)", user);
+ _pam_log(pamh, ctrl, LOG_WARNING, "user '%s' denied access "
+ "(incorrect password or invalid membership)", user);
return retval;
case PAM_ACCT_EXPIRED:
/* account expired */
- _pam_log(pamh, ctrl, LOG_WARNING, "user '%s' account expired", user);
+ _pam_log(pamh, ctrl, LOG_WARNING, "user '%s' account expired",
+ user);
return retval;
case PAM_AUTHTOK_EXPIRED:
/* password expired */
- _pam_log(pamh, ctrl, LOG_WARNING, "user '%s' password expired", user);
+ _pam_log(pamh, ctrl, LOG_WARNING, "user '%s' password expired",
+ user);
return retval;
case PAM_NEW_AUTHTOK_REQD:
/* new password required */
- _pam_log(pamh, ctrl, LOG_WARNING, "user '%s' new password required", user);
+ _pam_log(pamh, ctrl, LOG_WARNING, "user '%s' new password "
+ "required", user);
return retval;
case PAM_USER_UNKNOWN:
/* the user does not exist */
- _pam_log_debug(pamh, ctrl, LOG_NOTICE, "user '%s' not found", user);
+ _pam_log_debug(pamh, ctrl, LOG_NOTICE, "user '%s' not found",
+ user);
if (ctrl & WINBIND_UNKNOWN_OK_ARG) {
return PAM_IGNORE;
- }
+ }
return retval;
case PAM_SUCCESS:
/* Otherwise, the authentication looked good */
@@ -534,20 +612,24 @@ static int pam_winbind_request_log(pam_handle_t * pamh,
case WINBINDD_INFO:
break;
case WINBINDD_PAM_AUTH:
- _pam_log(pamh, ctrl, LOG_NOTICE, "user '%s' granted access", user);
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "user '%s' granted access", user);
break;
case WINBINDD_PAM_CHAUTHTOK:
- _pam_log(pamh, ctrl, LOG_NOTICE, "user '%s' password changed", user);
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "user '%s' password changed", user);
break;
default:
- _pam_log(pamh, ctrl, LOG_NOTICE, "user '%s' OK", user);
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "user '%s' OK", user);
break;
}
-
+
return retval;
default:
/* we don't know anything about this return value */
- _pam_log(pamh, ctrl, LOG_ERR, "internal module error (retval = %d, user = '%s')",
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "internal module error (retval = %d, user = '%s')",
retval, user);
return retval;
}
@@ -555,62 +637,65 @@ static int pam_winbind_request_log(pam_handle_t * pamh,
/**
* send a password expiry message if required
- *
+ *
* @param pamh PAM handle
* @param ctrl PAM winbind options.
* @param next_change expected (calculated) next expiry date.
* @param already_expired pointer to a boolean to indicate if the password is
* already expired.
*
- * @return boolean Returns True if message has been sent, False if not.
+ * @return boolean Returns true if message has been sent, false if not.
*/
-static BOOL _pam_send_password_expiry_message(pam_handle_t *pamh,
+static bool _pam_send_password_expiry_message(pam_handle_t *pamh,
int ctrl,
time_t next_change,
time_t now,
int warn_pwd_expire,
- BOOL *already_expired)
+ bool *already_expired)
{
int days = 0;
struct tm tm_now, tm_next_change;
if (already_expired) {
- *already_expired = False;
+ *already_expired = false;
}
if (next_change <= now) {
PAM_WB_REMARK_DIRECT(pamh, ctrl, "NT_STATUS_PASSWORD_EXPIRED");
if (already_expired) {
- *already_expired = True;
+ *already_expired = true;
}
- return True;
+ return true;
}
if ((next_change < 0) ||
(next_change > now + warn_pwd_expire * SECONDS_PER_DAY)) {
- return False;
+ return false;
}
- if ((localtime_r(&now, &tm_now) == NULL) ||
+ if ((localtime_r(&now, &tm_now) == NULL) ||
(localtime_r(&next_change, &tm_next_change) == NULL)) {
- return False;
+ return false;
}
- days = (tm_next_change.tm_yday+tm_next_change.tm_year*365) - (tm_now.tm_yday+tm_now.tm_year*365);
+ days = (tm_next_change.tm_yday+tm_next_change.tm_year*365) -
+ (tm_now.tm_yday+tm_now.tm_year*365);
if (days == 0) {
- _make_remark(pamh, ctrl, PAM_TEXT_INFO, "Your password expires today");
- return True;
- }
-
+ _make_remark(pamh, ctrl, PAM_TEXT_INFO,
+ "Your password expires today");
+ return true;
+ }
+
if (days > 0 && days < warn_pwd_expire) {
- _make_remark_format(pamh, ctrl, PAM_TEXT_INFO, "Your password will expire in %d %s",
- days, (days > 1) ? "days":"day");
- return True;
+ _make_remark_format(pamh, ctrl, PAM_TEXT_INFO,
+ "Your password will expire in %d %s",
+ days, (days > 1) ? "days":"day");
+ return true;
}
- return False;
+ return false;
}
/**
@@ -624,17 +709,17 @@ static BOOL _pam_send_password_expiry_message(pam_handle_t *pamh,
* @return void.
*/
-static void _pam_warn_password_expiry(pam_handle_t *pamh,
- int flags,
+static void _pam_warn_password_expiry(pam_handle_t *pamh,
+ int flags,
const struct winbindd_response *response,
int warn_pwd_expire,
- BOOL *already_expired)
+ bool *already_expired)
{
time_t now = time(NULL);
time_t next_change = 0;
if (already_expired) {
- *already_expired = False;
+ *already_expired = false;
}
/* accounts with ACB_PWNOEXP set never receive a warning */
@@ -663,7 +748,7 @@ static void _pam_warn_password_expiry(pam_handle_t *pamh,
return;
}
- next_change = response->data.auth.info3.pass_last_set_time +
+ next_change = response->data.auth.info3.pass_last_set_time +
response->data.auth.policy.expire;
if (_pam_send_password_expiry_message(pamh, flags, next_change, now,
@@ -677,37 +762,33 @@ static void _pam_warn_password_expiry(pam_handle_t *pamh,
#define IS_SID_STRING(name) (strncmp("S-", name, 2) == 0)
-static BOOL safe_append_string(char *dest,
- const char *src,
- int dest_buffer_size)
/**
- * Append a string, making sure not to overflow and to always return a NULL-terminated
- * string.
+ * Append a string, making sure not to overflow and to always return a
+ * NULL-terminated string.
*
* @param dest Destination string buffer (must already be NULL-terminated).
* @param src Source string buffer.
* @param dest_buffer_size Size of dest buffer in bytes.
*
- * @return False if dest buffer is not big enough (no bytes copied), True on success.
+ * @return false if dest buffer is not big enough (no bytes copied), true on
+ * success.
*/
+
+static bool safe_append_string(char *dest,
+ const char *src,
+ int dest_buffer_size)
{
int dest_length = strlen(dest);
int src_length = strlen(src);
- if ( dest_length + src_length + 1 > dest_buffer_size ) {
- return False;
+ if (dest_length + src_length + 1 > dest_buffer_size) {
+ return false;
}
memcpy(dest + dest_length, src, src_length + 1);
- return True;
+ return true;
}
-static BOOL winbind_name_to_sid_string(pam_handle_t *pamh,
- int ctrl,
- const char *user,
- const char *name,
- char *sid_list_buffer,
- int sid_list_buffer_size)
/**
* Convert a names into a SID string, appending it to a buffer.
*
@@ -718,13 +799,19 @@ static BOOL winbind_name_to_sid_string(pam_handle_t *pamh,
* @param sid_list_buffer Where to append the string sid.
* @param sid_list_buffer Size of sid_list_buffer (in bytes).
*
- * @return False on failure, True on success.
+ * @return false on failure, true on success.
*/
+static bool winbind_name_to_sid_string(pam_handle_t *pamh,
+ int ctrl,
+ const char *user,
+ const char *name,
+ char *sid_list_buffer,
+ int sid_list_buffer_size)
{
const char* sid_string;
struct winbindd_response sid_response;
- /* lookup name? */
+ /* lookup name? */
if (IS_SID_STRING(name)) {
sid_string = name;
} else {
@@ -733,33 +820,32 @@ static BOOL winbind_name_to_sid_string(pam_handle_t *pamh,
ZERO_STRUCT(sid_request);
ZERO_STRUCT(sid_response);
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "no sid given, looking up: %s\n", name);
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "no sid given, looking up: %s\n", name);
/* fortunatly winbindd can handle non-separated names */
strncpy(sid_request.data.name.name, name,
sizeof(sid_request.data.name.name) - 1);
- if (pam_winbind_request_log(pamh, ctrl, WINBINDD_LOOKUPNAME, &sid_request, &sid_response, user)) {
- _pam_log(pamh, ctrl, LOG_INFO, "could not lookup name: %s\n", name);
- return False;
+ if (pam_winbind_request_log(pamh, ctrl, WINBINDD_LOOKUPNAME,
+ &sid_request, &sid_response,
+ user)) {
+ _pam_log(pamh, ctrl, LOG_INFO,
+ "could not lookup name: %s\n", name);
+ return false;
}
sid_string = sid_response.data.sid.sid;
}
- if (!safe_append_string(sid_list_buffer, sid_string, sid_list_buffer_size)) {
- return False;
+ if (!safe_append_string(sid_list_buffer, sid_string,
+ sid_list_buffer_size)) {
+ return false;
}
- return True;
+ return true;
}
-static BOOL winbind_name_list_to_sid_string_list(pam_handle_t *pamh,
- int ctrl,
- const char *user,
- const char *name_list,
- char *sid_list_buffer,
- int sid_list_buffer_size)
/**
* Convert a list of names into a list of sids.
*
@@ -770,43 +856,56 @@ static BOOL winbind_name_list_to_sid_string_list(pam_handle_t *pamh,
* @param sid_list_buffer Where to put the list of string sids.
* @param sid_list_buffer Size of sid_list_buffer (in bytes).
*
- * @return False on failure, True on success.
+ * @return false on failure, true on success.
*/
+static bool winbind_name_list_to_sid_string_list(pam_handle_t *pamh,
+ int ctrl,
+ const char *user,
+ const char *name_list,
+ char *sid_list_buffer,
+ int sid_list_buffer_size)
{
- BOOL result = False;
+ bool result = false;
char *current_name = NULL;
const char *search_location;
const char *comma;
- if ( sid_list_buffer_size > 0 ) {
+ if (sid_list_buffer_size > 0) {
sid_list_buffer[0] = 0;
}
search_location = name_list;
- while ( (comma = strstr(search_location, ",")) != NULL ) {
- current_name = strndup(search_location, comma - search_location);
+ while ((comma = strstr(search_location, ",")) != NULL) {
+ current_name = strndup(search_location,
+ comma - search_location);
if (NULL == current_name) {
goto out;
}
- if (!winbind_name_to_sid_string(pamh, ctrl, user, current_name, sid_list_buffer, sid_list_buffer_size)) {
+ if (!winbind_name_to_sid_string(pamh, ctrl, user,
+ current_name,
+ sid_list_buffer,
+ sid_list_buffer_size)) {
goto out;
}
SAFE_FREE(current_name);
- if (!safe_append_string(sid_list_buffer, ",", sid_list_buffer_size)) {
+ if (!safe_append_string(sid_list_buffer, ",",
+ sid_list_buffer_size)) {
goto out;
}
search_location = comma + 1;
}
- if (!winbind_name_to_sid_string(pamh, ctrl, user, search_location, sid_list_buffer, sid_list_buffer_size)) {
+ if (!winbind_name_to_sid_string(pamh, ctrl, user, search_location,
+ sid_list_buffer,
+ sid_list_buffer_size)) {
goto out;
}
- result = True;
+ result = true;
out:
SAFE_FREE(current_name);
@@ -823,7 +922,9 @@ out:
* @return void.
*/
-static void _pam_setup_krb5_env(pam_handle_t *pamh, int ctrl, const char *krb5ccname)
+static void _pam_setup_krb5_env(pam_handle_t *pamh,
+ int ctrl,
+ const char *krb5ccname)
{
char var[PATH_MAX];
int ret;
@@ -836,18 +937,20 @@ static void _pam_setup_krb5_env(pam_handle_t *pamh, int ctrl, const char *krb5cc
return;
}
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "request returned KRB5CCNAME: %s", krb5ccname);
-
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "request returned KRB5CCNAME: %s", krb5ccname);
+
if (snprintf(var, sizeof(var), "KRB5CCNAME=%s", krb5ccname) == -1) {
return;
}
-
+
ret = pam_putenv(pamh, var);
if (ret) {
- _pam_log(pamh, ctrl, LOG_ERR, "failed to set KRB5CCNAME to %s: %s",
- var, pam_strerror(pamh, ret));
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "failed to set KRB5CCNAME to %s: %s",
+ var, pam_strerror(pamh, ret));
}
-}
+}
/**
* Set string into the PAM stack.
@@ -860,18 +963,24 @@ static void _pam_setup_krb5_env(pam_handle_t *pamh, int ctrl, const char *krb5cc
* @return void.
*/
-static void _pam_set_data_string(pam_handle_t *pamh, int ctrl, const char *data_name, const char *value)
+static void _pam_set_data_string(pam_handle_t *pamh,
+ int ctrl,
+ const char *data_name,
+ const char *value)
{
int ret;
- if ( !data_name || !value || (strlen(data_name) == 0) || (strlen(value) == 0) ) {
+ if (!data_name || !value || (strlen(data_name) == 0) ||
+ (strlen(value) == 0)) {
return;
}
- ret = pam_set_data(pamh, data_name, (void *)strdup(value), _pam_winbind_cleanup_func);
+ ret = pam_set_data(pamh, data_name, (void *)strdup(value),
+ _pam_winbind_cleanup_func);
if (ret) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "Could not set data %s: %s\n",
- data_name, pam_strerror(pamh, ret));
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "Could not set data %s: %s\n",
+ data_name, pam_strerror(pamh, ret));
}
}
@@ -887,12 +996,18 @@ static void _pam_set_data_string(pam_handle_t *pamh, int ctrl, const char *data_
* @return void.
*/
-static void _pam_set_data_info3(pam_handle_t *pamh, int ctrl, struct winbindd_response *response)
+static void _pam_set_data_info3(pam_handle_t *pamh,
+ int ctrl,
+ struct winbindd_response *response)
{
- _pam_set_data_string(pamh, ctrl, PAM_WINBIND_HOMEDIR, response->data.auth.info3.home_dir);
- _pam_set_data_string(pamh, ctrl, PAM_WINBIND_LOGONSCRIPT, response->data.auth.info3.logon_script);
- _pam_set_data_string(pamh, ctrl, PAM_WINBIND_LOGONSERVER, response->data.auth.info3.logon_srv);
- _pam_set_data_string(pamh, ctrl, PAM_WINBIND_PROFILEPATH, response->data.auth.info3.profile_path);
+ _pam_set_data_string(pamh, ctrl, PAM_WINBIND_HOMEDIR,
+ response->data.auth.info3.home_dir);
+ _pam_set_data_string(pamh, ctrl, PAM_WINBIND_LOGONSCRIPT,
+ response->data.auth.info3.logon_script);
+ _pam_set_data_string(pamh, ctrl, PAM_WINBIND_LOGONSERVER,
+ response->data.auth.info3.logon_srv);
+ _pam_set_data_string(pamh, ctrl, PAM_WINBIND_PROFILEPATH,
+ response->data.auth.info3.profile_path);
}
/**
@@ -922,22 +1037,31 @@ static void _pam_free_data_info3(pam_handle_t *pamh)
* @return void.
*/
-static void _pam_warn_logon_type(pam_handle_t *pamh, int ctrl, const char *username, uint32 info3_user_flgs)
+static void _pam_warn_logon_type(pam_handle_t *pamh,
+ int ctrl,
+ const char *username,
+ uint32_t info3_user_flgs)
{
/* inform about logon type */
if (PAM_WB_GRACE_LOGON(info3_user_flgs)) {
- _make_remark(pamh, ctrl, PAM_ERROR_MSG,
- "Grace login. Please change your password as soon you're online again");
+ _make_remark(pamh, ctrl, PAM_ERROR_MSG,
+ "Grace login. "
+ "Please change your password as soon you're "
+ "online again");
_pam_log_debug(pamh, ctrl, LOG_DEBUG,
- "User %s logged on using grace logon\n", username);
+ "User %s logged on using grace logon\n",
+ username);
} else if (PAM_WB_CACHED_LOGON(info3_user_flgs)) {
- _make_remark(pamh, ctrl, PAM_ERROR_MSG,
- "Domain Controller unreachable, using cached credentials instead. Network resources may be unavailable");
+ _make_remark(pamh, ctrl, PAM_ERROR_MSG,
+ "Domain Controller unreachable, "
+ "using cached credentials instead. "
+ "Network resources may be unavailable");
_pam_log_debug(pamh, ctrl, LOG_DEBUG,
- "User %s logged on using cached credentials\n", username);
+ "User %s logged on using cached credentials\n",
+ username);
}
}
@@ -952,16 +1076,20 @@ static void _pam_warn_logon_type(pam_handle_t *pamh, int ctrl, const char *usern
* @return void.
*/
-static void _pam_warn_krb5_failure(pam_handle_t *pamh, int ctrl, const char *username, uint32 info3_user_flgs)
+static void _pam_warn_krb5_failure(pam_handle_t *pamh,
+ int ctrl,
+ const char *username,
+ uint32_t info3_user_flgs)
{
if (PAM_WB_KRB5_CLOCK_SKEW(info3_user_flgs)) {
- _make_remark(pamh, ctrl, PAM_ERROR_MSG,
+ _make_remark(pamh, ctrl, PAM_ERROR_MSG,
"Failed to establish your Kerberos Ticket cache "
- "due time differences\n"
+ "due time differences\n"
"with the domain controller. "
- "Please verify the system time.\n");
+ "Please verify the system time.\n");
_pam_log_debug(pamh, ctrl, LOG_DEBUG,
- "User %s: Clock skew when getting Krb5 TGT\n", username);
+ "User %s: Clock skew when getting Krb5 TGT\n",
+ username);
}
}
@@ -992,37 +1120,42 @@ static char *_pam_compose_pwd_restriction_string(struct winbindd_response *respo
if (response->data.auth.policy.min_length_password > 0) {
ret = snprintf(str+offset, str_size-offset,
- "must be at least %d characters; ",
- response->data.auth.policy.min_length_password);
+ "must be at least %d characters; ",
+ response->data.auth.policy.min_length_password);
if (ret == -1) {
goto failed;
}
offset += ret;
}
-
+
if (response->data.auth.policy.password_history > 0) {
ret = snprintf(str+offset, str_size-offset,
- "cannot repeat any of your previous %d passwords; ",
- response->data.auth.policy.password_history);
+ "cannot repeat any of your previous %d "
+ "passwords; ",
+ response->data.auth.policy.password_history);
if (ret == -1) {
goto failed;
}
offset += ret;
}
-
- if (response->data.auth.policy.password_properties & DOMAIN_PASSWORD_COMPLEX) {
+
+ if (response->data.auth.policy.password_properties &
+ DOMAIN_PASSWORD_COMPLEX) {
ret = snprintf(str+offset, str_size-offset,
- "must contain capitals, numerals or punctuation; "
- "and cannot contain your account or full name; ");
+ "must contain capitals, numerals "
+ "or punctuation; "
+ "and cannot contain your account "
+ "or full name; ");
if (ret == -1) {
goto failed;
}
offset += ret;
}
- ret = snprintf(str+offset, str_size-offset,
- "Please type a different password. "
- "Type a password which meets these requirements in both text boxes.");
+ ret = snprintf(str+offset, str_size-offset,
+ "Please type a different password. "
+ "Type a password which meets these requirements in "
+ "both text boxes.");
if (ret == -1) {
goto failed;
}
@@ -1036,10 +1169,10 @@ static char *_pam_compose_pwd_restriction_string(struct winbindd_response *respo
/* talk to winbindd */
static int winbind_auth_request(pam_handle_t * pamh,
- int ctrl,
- const char *user,
- const char *pass,
- const char *member,
+ int ctrl,
+ const char *user,
+ const char *pass,
+ const char *member,
const char *cctype,
const int warn_pwd_expire,
struct winbindd_response *p_response,
@@ -1049,7 +1182,7 @@ static int winbind_auth_request(pam_handle_t * pamh,
struct winbindd_request request;
struct winbindd_response response;
int ret;
- BOOL already_expired = False;
+ bool already_expired = false;
ZERO_STRUCT(request);
ZERO_STRUCT(response);
@@ -1058,16 +1191,17 @@ static int winbind_auth_request(pam_handle_t * pamh,
*pwd_last_set = 0;
}
- strncpy(request.data.auth.user, user,
+ strncpy(request.data.auth.user, user,
sizeof(request.data.auth.user)-1);
- strncpy(request.data.auth.pass, pass,
+ strncpy(request.data.auth.pass, pass,
sizeof(request.data.auth.pass)-1);
request.data.auth.krb5_cc_type[0] = '\0';
request.data.auth.uid = -1;
-
- request.flags = WBFLAG_PAM_INFO3_TEXT | WBFLAG_PAM_CONTACT_TRUSTDOM;
+
+ request.flags = WBFLAG_PAM_INFO3_TEXT |
+ WBFLAG_PAM_CONTACT_TRUSTDOM;
if (ctrl & (WINBIND_KRB5_AUTH|WINBIND_CACHED_LOGIN)) {
struct passwd *pwd = NULL;
@@ -1081,13 +1215,16 @@ static int winbind_auth_request(pam_handle_t * pamh,
if (ctrl & WINBIND_KRB5_AUTH) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "enabling krb5 login flag\n");
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "enabling krb5 login flag\n");
- request.flags |= WBFLAG_PAM_KRB5 | WBFLAG_PAM_FALLBACK_AFTER_KRB5;
+ request.flags |= WBFLAG_PAM_KRB5 |
+ WBFLAG_PAM_FALLBACK_AFTER_KRB5;
}
if (ctrl & WINBIND_CACHED_LOGIN) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "enabling cached login flag\n");
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "enabling cached login flag\n");
request.flags |= WBFLAG_PAM_CACHED_LOGIN;
}
@@ -1097,25 +1234,31 @@ static int winbind_auth_request(pam_handle_t * pamh,
}
if (cctype != NULL) {
- strncpy(request.data.auth.krb5_cc_type, cctype,
+ strncpy(request.data.auth.krb5_cc_type, cctype,
sizeof(request.data.auth.krb5_cc_type) - 1);
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "enabling request for a %s krb5 ccache\n", cctype);
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "enabling request for a %s krb5 ccache\n",
+ cctype);
}
request.data.auth.require_membership_of_sid[0] = '\0';
if (member != NULL) {
- if (!winbind_name_list_to_sid_string_list(pamh, ctrl, user, member,
+ if (!winbind_name_list_to_sid_string_list(pamh, ctrl, user,
+ member,
request.data.auth.require_membership_of_sid,
sizeof(request.data.auth.require_membership_of_sid))) {
- _pam_log_debug(pamh, ctrl, LOG_ERR, "failed to serialize membership of sid \"%s\"\n", member);
+ _pam_log_debug(pamh, ctrl, LOG_ERR,
+ "failed to serialize membership of sid "
+ "\"%s\"\n", member);
return PAM_AUTH_ERR;
}
}
- ret = pam_winbind_request_log(pamh, ctrl, WINBINDD_PAM_AUTH, &request, &response, user);
+ ret = pam_winbind_request_log(pamh, ctrl, WINBINDD_PAM_AUTH,
+ &request, &response, user);
if (pwd_last_set) {
*pwd_last_set = response.data.auth.info3.pass_last_set_time;
@@ -1128,20 +1271,34 @@ static int winbind_auth_request(pam_handle_t * pamh,
}
if (ret) {
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_PASSWORD_EXPIRED");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_PASSWORD_MUST_CHANGE");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_INVALID_WORKSTATION");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_INVALID_LOGON_HOURS");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_ACCOUNT_EXPIRED");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_ACCOUNT_DISABLED");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_ACCOUNT_LOCKED_OUT");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_NO_LOGON_SERVERS");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_WRONG_PASSWORD");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_ACCESS_DENIED");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_PASSWORD_EXPIRED");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_PASSWORD_MUST_CHANGE");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_INVALID_WORKSTATION");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_INVALID_LOGON_HOURS");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_ACCOUNT_EXPIRED");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_ACCOUNT_DISABLED");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_ACCOUNT_LOCKED_OUT");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_NO_LOGON_SERVERS");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_WRONG_PASSWORD");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_ACCESS_DENIED");
}
if (ret == PAM_SUCCESS) {
@@ -1151,12 +1308,16 @@ static int winbind_auth_request(pam_handle_t * pamh,
warn_pwd_expire,
&already_expired);
- if (already_expired == True) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "Password has expired "
- "(Password was last set: %lld, the policy says "
- "it should expire here %lld (now it's: %lu))\n",
- response.data.auth.info3.pass_last_set_time,
- response.data.auth.info3.pass_last_set_time +
+ if (already_expired == true) {
+ SMB_TIME_T last_set;
+ last_set = response.data.auth.info3.pass_last_set_time;
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "Password has expired "
+ "(Password was last set: %lld, "
+ "the policy says it should expire here "
+ "%lld (now it's: %lu))\n",
+ (long long int)last_set,
+ (long long int)last_set +
response.data.auth.policy.expire,
time(NULL));
@@ -1164,10 +1325,12 @@ static int winbind_auth_request(pam_handle_t * pamh,
}
/* inform about logon type */
- _pam_warn_logon_type(pamh, ctrl, user, response.data.auth.info3.user_flgs);
+ _pam_warn_logon_type(pamh, ctrl, user,
+ response.data.auth.info3.user_flgs);
/* inform about krb5 failures */
- _pam_warn_krb5_failure(pamh, ctrl, user, response.data.auth.info3.user_flgs);
+ _pam_warn_krb5_failure(pamh, ctrl, user,
+ response.data.auth.info3.user_flgs);
/* set some info3 info for other modules in the stack */
_pam_set_data_info3(pamh, ctrl, &response);
@@ -1175,7 +1338,8 @@ static int winbind_auth_request(pam_handle_t * pamh,
/* put krb5ccname into env */
_pam_setup_krb5_env(pamh, ctrl, response.data.auth.krb5ccname);
- /* If winbindd returned a username, return the pointer to it here. */
+ /* If winbindd returned a username, return the pointer to it
+ * here. */
if (user_ret && response.extra_data.data) {
/* We have to trust it's a null terminated string. */
*user_ret = (char *)response.extra_data.data;
@@ -1188,10 +1352,10 @@ static int winbind_auth_request(pam_handle_t * pamh,
/* talk to winbindd */
static int winbind_chauthtok_request(pam_handle_t * pamh,
int ctrl,
- const char *user,
+ const char *user,
const char *oldpass,
const char *newpass,
- time_t pwd_last_set)
+ time_t pwd_last_set)
{
struct winbindd_request request;
struct winbindd_response response;
@@ -1200,82 +1364,105 @@ static int winbind_chauthtok_request(pam_handle_t * pamh,
ZERO_STRUCT(request);
ZERO_STRUCT(response);
- if (request.data.chauthtok.user == NULL) return -2;
+ if (request.data.chauthtok.user == NULL) {
+ return -2;
+ }
- strncpy(request.data.chauthtok.user, user,
+ strncpy(request.data.chauthtok.user, user,
sizeof(request.data.chauthtok.user) - 1);
if (oldpass != NULL) {
- strncpy(request.data.chauthtok.oldpass, oldpass,
+ strncpy(request.data.chauthtok.oldpass, oldpass,
sizeof(request.data.chauthtok.oldpass) - 1);
} else {
request.data.chauthtok.oldpass[0] = '\0';
}
-
+
if (newpass != NULL) {
- strncpy(request.data.chauthtok.newpass, newpass,
+ strncpy(request.data.chauthtok.newpass, newpass,
sizeof(request.data.chauthtok.newpass) - 1);
} else {
request.data.chauthtok.newpass[0] = '\0';
}
if (ctrl & WINBIND_KRB5_AUTH) {
- request.flags = WBFLAG_PAM_KRB5 | WBFLAG_PAM_CONTACT_TRUSTDOM;
+ request.flags = WBFLAG_PAM_KRB5 |
+ WBFLAG_PAM_CONTACT_TRUSTDOM;
}
- ret = pam_winbind_request_log(pamh, ctrl, WINBINDD_PAM_CHAUTHTOK, &request, &response, user);
+ ret = pam_winbind_request_log(pamh, ctrl, WINBINDD_PAM_CHAUTHTOK,
+ &request, &response, user);
if (ret == PAM_SUCCESS) {
return ret;
}
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_BACKUP_CONTROLLER");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_NO_LOGON_SERVERS");
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_ACCESS_DENIED");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_BACKUP_CONTROLLER");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_NO_LOGON_SERVERS");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_ACCESS_DENIED");
/* TODO: tell the min pwd length ? */
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_PWD_TOO_SHORT");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_PWD_TOO_SHORT");
/* TODO: tell the minage ? */
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_PWD_TOO_RECENT");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_PWD_TOO_RECENT");
/* TODO: tell the history length ? */
- PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response, "NT_STATUS_PWD_HISTORY_CONFLICT");
+ PAM_WB_REMARK_CHECK_RESPONSE_RET(pamh, ctrl, response,
+ "NT_STATUS_PWD_HISTORY_CONFLICT");
- if (!strcasecmp(response.data.auth.nt_status_string, "NT_STATUS_PASSWORD_RESTRICTION")) {
+ if (!strcasecmp(response.data.auth.nt_status_string,
+ "NT_STATUS_PASSWORD_RESTRICTION")) {
char *pwd_restriction_string = NULL;
+ SMB_TIME_T min_pwd_age;
+ uint32_t reject_reason = response.data.auth.reject_reason;
+ min_pwd_age = response.data.auth.policy.min_passwordage;
/* FIXME: avoid to send multiple PAM messages after another */
- switch (response.data.auth.reject_reason) {
+ switch (reject_reason) {
case -1:
break;
case REJECT_REASON_OTHER:
- if ((response.data.auth.policy.min_passwordage > 0) &&
- (pwd_last_set + response.data.auth.policy.min_passwordage > time(NULL))) {
- PAM_WB_REMARK_DIRECT(pamh, ctrl, "NT_STATUS_PWD_TOO_RECENT");
+ if ((min_pwd_age > 0) &&
+ (pwd_last_set + min_pwd_age > time(NULL))) {
+ PAM_WB_REMARK_DIRECT(pamh, ctrl,
+ "NT_STATUS_PWD_TOO_RECENT");
}
break;
case REJECT_REASON_TOO_SHORT:
- PAM_WB_REMARK_DIRECT(pamh, ctrl, "NT_STATUS_PWD_TOO_SHORT");
+ PAM_WB_REMARK_DIRECT(pamh, ctrl,
+ "NT_STATUS_PWD_TOO_SHORT");
break;
case REJECT_REASON_IN_HISTORY:
- PAM_WB_REMARK_DIRECT(pamh, ctrl, "NT_STATUS_PWD_HISTORY_CONFLICT");
+ PAM_WB_REMARK_DIRECT(pamh, ctrl,
+ "NT_STATUS_PWD_HISTORY_CONFLICT");
break;
case REJECT_REASON_NOT_COMPLEX:
- _make_remark(pamh, ctrl, PAM_ERROR_MSG, "Password does not meet complexity requirements");
+ _make_remark(pamh, ctrl, PAM_ERROR_MSG,
+ "Password does not meet "
+ "complexity requirements");
break;
default:
_pam_log_debug(pamh, ctrl, LOG_DEBUG,
- "unknown password change reject reason: %d",
- response.data.auth.reject_reason);
+ "unknown password change "
+ "reject reason: %d",
+ reject_reason);
break;
}
- pwd_restriction_string = _pam_compose_pwd_restriction_string(&response);
+ pwd_restriction_string =
+ _pam_compose_pwd_restriction_string(&response);
if (pwd_restriction_string) {
- _make_remark(pamh, ctrl, PAM_ERROR_MSG, pwd_restriction_string);
+ _make_remark(pamh, ctrl, PAM_ERROR_MSG,
+ pwd_restriction_string);
SAFE_FREE(pwd_restriction_string);
}
}
@@ -1291,7 +1478,9 @@ static int winbind_chauthtok_request(pam_handle_t * pamh,
* 0 = OK
* -1 = System error
*/
-static int valid_user(pam_handle_t *pamh, int ctrl, const char *user)
+static int valid_user(pam_handle_t *pamh,
+ int ctrl,
+ const char *user)
{
/* check not only if the user is available over NSS calls, also make
* sure it's really a winbind user, this is important when stacking PAM
@@ -1313,7 +1502,8 @@ static int valid_user(pam_handle_t *pamh, int ctrl, const char *user)
strncpy(request.data.username, user,
sizeof(request.data.username) - 1);
- ret = pam_winbind_request_log(pamh, ctrl, WINBINDD_GETPWNAM, &request, &response, user);
+ ret = pam_winbind_request_log(pamh, ctrl, WINBINDD_GETPWNAM,
+ &request, &response, user);
switch (ret) {
case PAM_USER_UNKNOWN:
@@ -1361,28 +1551,33 @@ static int _winbind_read_password(pam_handle_t * pamh,
* which authentication token are we getting?
*/
- authtok_flag = on(WINBIND__OLD_PASSWORD, ctrl) ? PAM_OLDAUTHTOK : PAM_AUTHTOK;
+ if (on(WINBIND__OLD_PASSWORD, ctrl)) {
+ authtok_flag = PAM_OLDAUTHTOK;
+ } else {
+ authtok_flag = PAM_AUTHTOK;
+ }
/*
* should we obtain the password from a PAM item ?
*/
- if (on(WINBIND_TRY_FIRST_PASS_ARG, ctrl) || on(WINBIND_USE_FIRST_PASS_ARG, ctrl)) {
+ if (on(WINBIND_TRY_FIRST_PASS_ARG, ctrl) ||
+ on(WINBIND_USE_FIRST_PASS_ARG, ctrl)) {
retval = _pam_get_item(pamh, authtok_flag, &item);
if (retval != PAM_SUCCESS) {
/* very strange. */
- _pam_log(pamh, ctrl, LOG_ALERT,
- "pam_get_item returned error to unix-read-password"
- );
+ _pam_log(pamh, ctrl, LOG_ALERT,
+ "pam_get_item returned error "
+ "to unix-read-password");
return retval;
} else if (item != NULL) { /* we have a password! */
*pass = item;
item = NULL;
- _pam_log(pamh, ctrl, LOG_DEBUG,
+ _pam_log(pamh, ctrl, LOG_DEBUG,
"pam_get_item returned a password");
return PAM_SUCCESS;
} else if (on(WINBIND_USE_FIRST_PASS_ARG, ctrl)) {
- return PAM_AUTHTOK_RECOVER_ERR; /* didn't work */
+ return PAM_AUTHTOK_RECOVER_ERR; /* didn't work */
} else if (on(WINBIND_USE_AUTHTOK_ARG, ctrl)
&& off(WINBIND__OLD_PASSWORD, ctrl)) {
return PAM_AUTHTOK_RECOVER_ERR;
@@ -1403,7 +1598,7 @@ static int _winbind_read_password(pam_handle_t * pamh,
if (comment != NULL && off(ctrl, WINBIND_SILENT)) {
pmsg[0] = &msg[0];
msg[0].msg_style = PAM_TEXT_INFO;
- msg[0].msg = CONST_DISCARD(char *, comment);
+ msg[0].msg = discard_const_p(char, comment);
i = 1;
} else {
i = 0;
@@ -1411,72 +1606,76 @@ static int _winbind_read_password(pam_handle_t * pamh,
pmsg[i] = &msg[i];
msg[i].msg_style = PAM_PROMPT_ECHO_OFF;
- msg[i++].msg = CONST_DISCARD(char *, prompt1);
+ msg[i++].msg = discard_const_p(char, prompt1);
replies = 1;
if (prompt2 != NULL) {
pmsg[i] = &msg[i];
msg[i].msg_style = PAM_PROMPT_ECHO_OFF;
- msg[i++].msg = CONST_DISCARD(char *, prompt2);
+ msg[i++].msg = discard_const_p(char, prompt2);
++replies;
}
/* so call the conversation expecting i responses */
resp = NULL;
retval = converse(pamh, i, pmsg, &resp);
-
- if (resp != NULL) {
-
- /* interpret the response */
-
- if (retval == PAM_SUCCESS) { /* a good conversation */
-
- token = x_strdup(resp[i - replies].resp);
- if (token != NULL) {
- if (replies == 2) {
- /* verify that password entered correctly */
- if (!resp[i - 1].resp
- || strcmp(token, resp[i - 1].resp)) {
- _pam_delete(token); /* mistyped */
- retval = PAM_AUTHTOK_RECOVER_ERR;
- _make_remark(pamh, ctrl, PAM_ERROR_MSG, MISTYPED_PASS);
- }
- }
- } else {
- _pam_log(pamh, ctrl, LOG_NOTICE, "could not recover authentication token");
- retval = PAM_AUTHTOK_RECOVER_ERR;
- }
-
+ if (resp == NULL) {
+ if (retval == PAM_SUCCESS) {
+ retval = PAM_AUTHTOK_RECOVER_ERR;
}
- /*
- * tidy up the conversation (resp_retcode) is ignored
- * -- what is it for anyway? AGM
- */
-
+ goto done;
+ }
+ if (retval != PAM_SUCCESS) {
_pam_drop_reply(resp, i);
+ goto done;
+ }
- } else {
- retval = (retval == PAM_SUCCESS)
- ? PAM_AUTHTOK_RECOVER_ERR : retval;
+ /* interpret the response */
+
+ token = x_strdup(resp[i - replies].resp);
+ if (!token) {
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "could not recover "
+ "authentication token");
+ retval = PAM_AUTHTOK_RECOVER_ERR;
+ goto done;
+ }
+
+ if (replies == 2) {
+ /* verify that password entered correctly */
+ if (!resp[i - 1].resp ||
+ strcmp(token, resp[i - 1].resp)) {
+ _pam_delete(token); /* mistyped */
+ retval = PAM_AUTHTOK_RECOVER_ERR;
+ _make_remark(pamh, ctrl, PAM_ERROR_MSG,
+ MISTYPED_PASS);
+ }
}
+
+ /*
+ * tidy up the conversation (resp_retcode) is ignored
+ * -- what is it for anyway? AGM
+ */
+ _pam_drop_reply(resp, i);
}
+ done:
if (retval != PAM_SUCCESS) {
_pam_log_debug(pamh, ctrl, LOG_DEBUG,
- "unable to obtain a password");
+ "unable to obtain a password");
return retval;
}
/* 'token' is the entered password */
/* we store this password as an item */
-
+
retval = pam_set_item(pamh, authtok_flag, token);
_pam_delete(token); /* clean it up */
- if (retval != PAM_SUCCESS ||
+ if (retval != PAM_SUCCESS ||
(retval = _pam_get_item(pamh, authtok_flag, &item)) != PAM_SUCCESS) {
-
+
_pam_log(pamh, ctrl, LOG_CRIT, "error manipulating password");
return retval;
-
+
}
*pass = item;
@@ -1486,11 +1685,11 @@ static int _winbind_read_password(pam_handle_t * pamh,
}
const char *get_conf_item_string(const pam_handle_t *pamh,
- int argc,
- const char **argv,
+ int argc,
+ const char **argv,
int ctrl,
dictionary *d,
- const char *item,
+ const char *item,
int config_flag)
{
int i = 0;
@@ -1501,16 +1700,19 @@ const char *get_conf_item_string(const pam_handle_t *pamh,
}
/* let the pam opt take precedence over the pam_winbind.conf option */
- for ( i=0; i<argc; i++ ) {
+ for (i=0; i<argc; i++) {
if ((strncmp(argv[i], item, strlen(item)) == 0)) {
char *p;
- if ( (p = strchr( argv[i], '=' )) == NULL) {
- _pam_log(pamh, ctrl, LOG_INFO, "no \"=\" delimiter for \"%s\" found\n", item);
+ if ((p = strchr(argv[i], '=')) == NULL) {
+ _pam_log(pamh, ctrl, LOG_INFO,
+ "no \"=\" delimiter for \"%s\" found\n",
+ item);
goto out;
}
- _pam_log_debug(pamh, ctrl, LOG_INFO, "PAM config: %s '%s'\n", item, p+1);
+ _pam_log_debug(pamh, ctrl, LOG_INFO,
+ "PAM config: %s '%s'\n", item, p+1);
return p + 1;
}
}
@@ -1525,7 +1727,8 @@ const char *get_conf_item_string(const pam_handle_t *pamh,
parm_opt = iniparser_getstr(d, key);
SAFE_FREE(key);
- _pam_log_debug(pamh, ctrl, LOG_INFO, "CONFIG file: %s '%s'\n", item, parm_opt);
+ _pam_log_debug(pamh, ctrl, LOG_INFO, "CONFIG file: %s '%s'\n",
+ item, parm_opt);
}
out:
return parm_opt;
@@ -1551,7 +1754,7 @@ int get_config_item_int(const pam_handle_t *pamh,
if ((strncmp(argv[i], item, strlen(item)) == 0)) {
char *p;
- if ( (p = strchr( argv[i], '=' )) == NULL) {
+ if ((p = strchr(argv[i], '=')) == NULL) {
_pam_log(pamh, ctrl, LOG_INFO,
"no \"=\" delimiter for \"%s\" found\n",
item);
@@ -1583,30 +1786,45 @@ out:
return parm_opt;
}
-const char *get_krb5_cc_type_from_config(const pam_handle_t *pamh, int argc, const char **argv, int ctrl, dictionary *d)
+const char *get_krb5_cc_type_from_config(const pam_handle_t *pamh,
+ int argc,
+ const char **argv,
+ int ctrl,
+ dictionary *d)
{
- return get_conf_item_string(pamh, argc, argv, ctrl, d, "krb5_ccache_type", WINBIND_KRB5_CCACHE_TYPE);
+ return get_conf_item_string(pamh, argc, argv, ctrl, d,
+ "krb5_ccache_type",
+ WINBIND_KRB5_CCACHE_TYPE);
}
-const char *get_member_from_config(const pam_handle_t *pamh, int argc, const char **argv, int ctrl, dictionary *d)
+const char *get_member_from_config(const pam_handle_t *pamh,
+ int argc,
+ const char **argv,
+ int ctrl,
+ dictionary *d)
{
const char *ret = NULL;
- ret = get_conf_item_string(pamh, argc, argv, ctrl, d, "require_membership_of", WINBIND_REQUIRED_MEMBERSHIP);
+ ret = get_conf_item_string(pamh, argc, argv, ctrl, d,
+ "require_membership_of",
+ WINBIND_REQUIRED_MEMBERSHIP);
if (ret) {
return ret;
}
- return get_conf_item_string(pamh, argc, argv, ctrl, d, "require-membership-of", WINBIND_REQUIRED_MEMBERSHIP);
+ return get_conf_item_string(pamh, argc, argv, ctrl, d,
+ "require-membership-of",
+ WINBIND_REQUIRED_MEMBERSHIP);
}
int get_warn_pwd_expire_from_config(const pam_handle_t *pamh,
- int argc,
- const char **argv,
- int ctrl,
- dictionary *d)
+ int argc,
+ const char **argv,
+ int ctrl,
+ dictionary *d)
{
int ret;
ret = get_config_item_int(pamh, argc, argv, ctrl, d,
- "warn_pwd_expire", WINBIND_WARN_PWD_EXPIRE);
+ "warn_pwd_expire",
+ WINBIND_WARN_PWD_EXPIRE);
/* no or broken setting */
if (ret <= 0) {
return DEFAULT_DAYS_TO_WARN_BEFORE_PWD_EXPIRES;
@@ -1623,7 +1841,8 @@ int get_warn_pwd_expire_from_config(const pam_handle_t *pamh,
* @return string separator character. NULL on failure.
*/
-static char winbind_get_separator(pam_handle_t *pamh, int ctrl)
+static char winbind_get_separator(pam_handle_t *pamh,
+ int ctrl)
{
struct winbindd_request request;
struct winbindd_response response;
@@ -1631,7 +1850,8 @@ static char winbind_get_separator(pam_handle_t *pamh, int ctrl)
ZERO_STRUCT(request);
ZERO_STRUCT(response);
- if (pam_winbind_request_log(pamh, ctrl, WINBINDD_INFO, &request, &response, NULL)) {
+ if (pam_winbind_request_log(pamh, ctrl, WINBINDD_INFO,
+ &request, &response, NULL)) {
return '\0';
}
@@ -1648,14 +1868,16 @@ static char winbind_get_separator(pam_handle_t *pamh, int ctrl)
* @return converted name. NULL pointer on failure. Caller needs to free.
*/
-static char* winbind_upn_to_username(pam_handle_t *pamh, int ctrl, const char *upn)
+static char* winbind_upn_to_username(pam_handle_t *pamh,
+ int ctrl,
+ const char *upn)
{
struct winbindd_request req;
struct winbindd_response resp;
- int retval;
- char *account_name;
+ int retval;
+ char *account_name;
int account_name_len;
- char sep;
+ char sep;
/* This cannot work when the winbind separator = @ */
@@ -1663,7 +1885,7 @@ static char* winbind_upn_to_username(pam_handle_t *pamh, int ctrl, const char *u
if (!sep || sep == '@') {
return NULL;
}
-
+
/* Convert the UPN to a SID */
ZERO_STRUCT(req);
@@ -1673,24 +1895,24 @@ static char* winbind_upn_to_username(pam_handle_t *pamh, int ctrl, const char *u
sizeof(req.data.name.dom_name) - 1);
strncpy(req.data.name.name, upn,
sizeof(req.data.name.name) - 1);
- retval = pam_winbind_request_log(pamh, ctrl, WINBINDD_LOOKUPNAME,
+ retval = pam_winbind_request_log(pamh, ctrl, WINBINDD_LOOKUPNAME,
&req, &resp, upn);
- if ( retval != PAM_SUCCESS ) {
+ if (retval != PAM_SUCCESS) {
return NULL;
}
-
+
/* Convert the the SID back to the sAMAccountName */
-
+
ZERO_STRUCT(req);
strncpy(req.data.sid, resp.data.sid.sid, sizeof(req.data.sid)-1);
ZERO_STRUCT(resp);
- retval = pam_winbind_request_log(pamh, ctrl, WINBINDD_LOOKUPSID,
+ retval = pam_winbind_request_log(pamh, ctrl, WINBINDD_LOOKUPSID,
&req, &resp, upn);
- if ( retval != PAM_SUCCESS ) {
+ if (retval != PAM_SUCCESS) {
return NULL;
}
-
- account_name_len = asprintf(&account_name, "%s\\%s",
+
+ account_name_len = asprintf(&account_name, "%s\\%s",
resp.data.name.dom_name,
resp.data.name.name);
@@ -1724,7 +1946,8 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
/* Get the username */
retval = pam_get_user(pamh, &username, NULL);
if ((retval != PAM_SUCCESS) || (!username)) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "can not get the username");
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "can not get the username");
retval = PAM_SERVICE_ERR;
goto out;
}
@@ -1734,32 +1957,33 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
/* Decode the user name since AIX does not support logn user
names by default. The name is encoded as _#uid. */
- if ( username[0] == '_' ) {
- uid_t id = atoi( &username[1] );
- struct passwd *pw = NULL;
+ if (username[0] == '_') {
+ uid_t id = atoi(&username[1]);
+ struct passwd *pw = NULL;
- if ( (id!=0) && ((pw = getpwuid( id )) != NULL) ) {
- real_username = strdup( pw->pw_name );
+ if ((id!=0) && ((pw = getpwuid(id)) != NULL)) {
+ real_username = strdup(pw->pw_name);
}
}
#endif
- if ( !real_username ) {
+ if (!real_username) {
/* Just making a copy of the username we got from PAM */
- if ( (real_username = strdup( username )) == NULL ) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG,
- "memory allocation failure when copying username");
+ if ((real_username = strdup(username)) == NULL) {
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "memory allocation failure when copying "
+ "username");
retval = PAM_SERVICE_ERR;
goto out;
}
- }
+ }
/* Maybe this was a UPN */
if (strchr(real_username, '@') != NULL) {
char *samaccountname = NULL;
-
- samaccountname = winbind_upn_to_username(pamh, ctrl,
+
+ samaccountname = winbind_upn_to_username(pamh, ctrl,
real_username);
if (samaccountname) {
free(real_username);
@@ -1767,12 +1991,13 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
}
}
- retval = _winbind_read_password(pamh, ctrl, NULL,
+ retval = _winbind_read_password(pamh, ctrl, NULL,
"Password: ", NULL,
&password);
if (retval != PAM_SUCCESS) {
- _pam_log(pamh, ctrl, LOG_ERR, "Could not retrieve user's password");
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "Could not retrieve user's password");
retval = PAM_AUTHTOK_ERR;
goto out;
}
@@ -1780,10 +2005,12 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
/* Let's not give too much away in the log file */
#ifdef DEBUG_PASSWORD
- _pam_log_debug(pamh, ctrl, LOG_INFO, "Verify user '%s' with password '%s'",
+ _pam_log_debug(pamh, ctrl, LOG_INFO,
+ "Verify user '%s' with password '%s'",
real_username, password);
#else
- _pam_log_debug(pamh, ctrl, LOG_INFO, "Verify user '%s'", real_username);
+ _pam_log_debug(pamh, ctrl, LOG_INFO,
+ "Verify user '%s'", real_username);
#endif
member = get_member_from_config(pamh, argc, argv, ctrl, d);
@@ -1794,9 +2021,9 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
ctrl, d);
/* Now use the username to look up password */
- retval = winbind_auth_request(pamh, ctrl, real_username, password, member,
- cctype, warn_pwd_expire, NULL, NULL,
- &username_ret);
+ retval = winbind_auth_request(pamh, ctrl, real_username, password,
+ member, cctype, warn_pwd_expire, NULL,
+ NULL, &username_ret);
if (retval == PAM_NEW_AUTHTOK_REQD ||
retval == PAM_AUTHTOK_EXPIRED) {
@@ -1808,17 +2035,20 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
goto out;
}
- pam_set_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD, new_authtok_required, _pam_winbind_cleanup_func);
+ pam_set_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD,
+ new_authtok_required,
+ _pam_winbind_cleanup_func);
retval = PAM_SUCCESS;
- if (!asprintf(&new_authtok_required_during_auth, "%d", True)) {
+ if (!asprintf(&new_authtok_required_during_auth, "%d", true)) {
retval = PAM_BUF_ERR;
goto out;
}
- pam_set_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD_DURING_AUTH,
- new_authtok_required_during_auth, _pam_winbind_cleanup_func);
+ pam_set_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD_DURING_AUTH,
+ new_authtok_required_during_auth,
+ _pam_winbind_cleanup_func);
goto out;
}
@@ -1826,14 +2056,15 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
out:
if (username_ret) {
pam_set_item (pamh, PAM_USER, username_ret);
- _pam_log_debug(pamh, ctrl, LOG_INFO, "Returned user was '%s'", username_ret);
+ _pam_log_debug(pamh, ctrl, LOG_INFO,
+ "Returned user was '%s'", username_ret);
free(username_ret);
}
- if ( real_username ) {
- free( real_username );
- }
-
+ if (real_username) {
+ free(real_username);
+ }
+
if (d) {
iniparser_freedict(d);
}
@@ -1873,15 +2104,18 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags,
ret = pam_sm_close_session(pamh, flags, argc, argv);
break;
case PAM_REFRESH_CRED:
- _pam_log_debug(pamh, ctrl, LOG_WARNING, "PAM_REFRESH_CRED not implemented");
+ _pam_log_debug(pamh, ctrl, LOG_WARNING,
+ "PAM_REFRESH_CRED not implemented");
ret = PAM_SUCCESS;
break;
case PAM_REINITIALIZE_CRED:
- _pam_log_debug(pamh, ctrl, LOG_WARNING, "PAM_REINITIALIZE_CRED not implemented");
+ _pam_log_debug(pamh, ctrl, LOG_WARNING,
+ "PAM_REINITIALIZE_CRED not implemented");
ret = PAM_SUCCESS;
break;
case PAM_ESTABLISH_CRED:
- _pam_log_debug(pamh, ctrl, LOG_WARNING, "PAM_ESTABLISH_CRED not implemented");
+ _pam_log_debug(pamh, ctrl, LOG_WARNING,
+ "PAM_ESTABLISH_CRED not implemented");
ret = PAM_SUCCESS;
break;
default:
@@ -1895,12 +2129,12 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags,
}
_PAM_LOG_FUNCTION_LEAVE("pam_sm_setcred", pamh, ctrl, ret);
-
+
return ret;
}
/*
- * Account management. We want to verify that the account exists
+ * Account management. We want to verify that the account exists
* before returning PAM_SUCCESS
*/
PAM_EXTERN
@@ -1924,7 +2158,8 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
/* Get the username */
ret = pam_get_user(pamh, &username, NULL);
if ((ret != PAM_SUCCESS) || (!username)) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG,"can not get the username");
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "can not get the username");
ret = PAM_SERVICE_ERR;
goto out;
}
@@ -1938,7 +2173,8 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
goto out;
case 1:
/* the user does not exist */
- _pam_log_debug(pamh, ctrl, LOG_NOTICE, "user '%s' not found", username);
+ _pam_log_debug(pamh, ctrl, LOG_NOTICE, "user '%s' not found",
+ username);
if (ctrl & WINBIND_UNKNOWN_OK_ARG) {
ret = PAM_IGNORE;
goto out;
@@ -1946,34 +2182,42 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
ret = PAM_USER_UNKNOWN;
goto out;
case 0:
- pam_get_data( pamh, PAM_WINBIND_NEW_AUTHTOK_REQD, (const void **)&tmp);
+ pam_get_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD,
+ (const void **)&tmp);
if (tmp != NULL) {
ret = atoi((const char *)tmp);
switch (ret) {
case PAM_AUTHTOK_EXPIRED:
/* fall through, since new token is required in this case */
case PAM_NEW_AUTHTOK_REQD:
- _pam_log(pamh, ctrl, LOG_WARNING, "pam_sm_acct_mgmt success but %s is set",
+ _pam_log(pamh, ctrl, LOG_WARNING,
+ "pam_sm_acct_mgmt success but %s is set",
PAM_WINBIND_NEW_AUTHTOK_REQD);
- _pam_log(pamh, ctrl, LOG_NOTICE, "user '%s' needs new password", username);
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "user '%s' needs new password",
+ username);
/* PAM_AUTHTOKEN_REQD does not exist, but is documented in the manpage */
ret = PAM_NEW_AUTHTOK_REQD;
goto out;
default:
- _pam_log(pamh, ctrl, LOG_WARNING, "pam_sm_acct_mgmt success");
- _pam_log(pamh, ctrl, LOG_NOTICE, "user '%s' granted access", username);
+ _pam_log(pamh, ctrl, LOG_WARNING,
+ "pam_sm_acct_mgmt success");
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "user '%s' granted access", username);
ret = PAM_SUCCESS;
goto out;
}
}
/* Otherwise, the authentication looked good */
- _pam_log(pamh, ctrl, LOG_NOTICE, "user '%s' granted access", username);
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "user '%s' granted access", username);
ret = PAM_SUCCESS;
goto out;
default:
/* we don't know anything about this return value */
- _pam_log(pamh, ctrl, LOG_ERR, "internal module error (ret = %d, user = '%s')",
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "internal module error (ret = %d, user = '%s')",
ret, username);
ret = PAM_SERVICE_ERR;
goto out;
@@ -1989,7 +2233,7 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
}
_PAM_LOG_FUNCTION_LEAVE("pam_sm_acct_mgmt", pamh, ctrl, ret);
-
+
return ret;
}
@@ -2017,7 +2261,7 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,
}
_PAM_LOG_FUNCTION_LEAVE("pam_sm_open_session", pamh, ctrl, ret);
-
+
return ret;
}
@@ -2056,21 +2300,25 @@ int pam_sm_close_session(pam_handle_t *pamh, int flags,
retval = pam_get_user(pamh, &user, "Username: ");
if (retval) {
- _pam_log(pamh, ctrl, LOG_ERR, "could not identify user");
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "could not identify user");
goto out;
}
if (user == NULL) {
- _pam_log(pamh, ctrl, LOG_ERR, "username was NULL!");
+ _pam_log(pamh, ctrl, LOG_ERR,
+ "username was NULL!");
retval = PAM_USER_UNKNOWN;
goto out;
}
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "username [%s] obtained", user);
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "username [%s] obtained", user);
ccname = pam_getenv(pamh, "KRB5CCNAME");
if (ccname == NULL) {
- _pam_log_debug(pamh, ctrl, LOG_DEBUG, "user has no KRB5CCNAME environment");
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG,
+ "user has no KRB5CCNAME environment");
}
strncpy(request.data.logoff.user, user,
@@ -2088,9 +2336,12 @@ int pam_sm_close_session(pam_handle_t *pamh, int flags,
}
request.data.logoff.uid = pwd->pw_uid;
- request.flags = WBFLAG_PAM_KRB5 | WBFLAG_PAM_CONTACT_TRUSTDOM;
+ request.flags = WBFLAG_PAM_KRB5 |
+ WBFLAG_PAM_CONTACT_TRUSTDOM;
- retval = pam_winbind_request_log(pamh, ctrl, WINBINDD_PAM_LOGOFF, &request, &response, user);
+ retval = pam_winbind_request_log(pamh, ctrl,
+ WINBINDD_PAM_LOGOFF,
+ &request, &response, user);
}
out:
@@ -2099,56 +2350,61 @@ out:
}
_PAM_LOG_FUNCTION_LEAVE("pam_sm_close_session", pamh, ctrl, retval);
-
+
return retval;
}
/**
- * evaluate whether we need to re-authenticate with kerberos after a password change
- *
+ * evaluate whether we need to re-authenticate with kerberos after a
+ * password change
+ *
* @param pamh PAM handle
* @param ctrl PAM winbind options.
* @param user The username
*
- * @return boolean Returns True if required, False if not.
+ * @return boolean Returns true if required, false if not.
*/
-static BOOL _pam_require_krb5_auth_after_chauthtok(pam_handle_t *pamh, int ctrl, const char *user)
+static bool _pam_require_krb5_auth_after_chauthtok(pam_handle_t *pamh,
+ int ctrl,
+ const char *user)
{
- /* Make sure that we only do this if
- * a) the chauthtok got initiated during a logon attempt (authenticate->acct_mgmt->chauthtok)
- * b) any later password change via the "passwd" command if done by the user itself
- */
-
+ /* Make sure that we only do this if a) the chauthtok got initiated
+ * during a logon attempt (authenticate->acct_mgmt->chauthtok) b) any
+ * later password change via the "passwd" command if done by the user
+ * itself */
+
char *new_authtok_reqd_during_auth = NULL;
struct passwd *pwd = NULL;
if (!(ctrl & WINBIND_KRB5_AUTH)) {
- return False;
+ return false;
}
- _pam_get_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD_DURING_AUTH, &new_authtok_reqd_during_auth);
- pam_set_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD_DURING_AUTH, NULL, NULL);
+ _pam_get_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD_DURING_AUTH,
+ &new_authtok_reqd_during_auth);
+ pam_set_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD_DURING_AUTH,
+ NULL, NULL);
if (new_authtok_reqd_during_auth) {
- return True;
+ return true;
}
pwd = getpwnam(user);
if (!pwd) {
- return False;
+ return false;
}
if (getuid() == pwd->pw_uid) {
- return True;
+ return true;
}
- return False;
+ return false;
}
-PAM_EXTERN
+PAM_EXTERN
int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
int argc, const char **argv)
{
@@ -2162,7 +2418,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
/* </DO NOT free() THESE> */
char *Announce;
-
+
int retry = 0;
dictionary *d = NULL;
char *username_ret = NULL;
@@ -2211,7 +2467,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
default:
break;
}
-
+
/*
* obtain and verify the current password (OLDAUTHTOK) for
* the user.
@@ -2219,19 +2475,20 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
if (flags & PAM_PRELIM_CHECK) {
time_t pwdlastset_prelim = 0;
-
+
/* instruct user what is happening */
#define greeting "Changing password for "
Announce = (char *) malloc(sizeof(greeting) + strlen(user));
if (Announce == NULL) {
- _pam_log(pamh, ctrl, LOG_CRIT, "password - out of memory");
+ _pam_log(pamh, ctrl, LOG_CRIT,
+ "password - out of memory");
ret = PAM_BUF_ERR;
goto out;
}
(void) strcpy(Announce, greeting);
(void) strcpy(Announce + sizeof(greeting) - 1, user);
#undef greeting
-
+
lctrl = ctrl | WINBIND__OLD_PASSWORD;
ret = _winbind_read_password(pamh, lctrl,
Announce,
@@ -2239,52 +2496,57 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
NULL,
(const char **) &pass_old);
if (ret != PAM_SUCCESS) {
- _pam_log(pamh, ctrl, LOG_NOTICE, "password - (old) token not obtained");
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "password - (old) token not obtained");
goto out;
}
/* verify that this is the password for this user */
-
+
ret = winbind_auth_request(pamh, ctrl, user, pass_old,
NULL, NULL, 0, &response,
&pwdlastset_prelim, NULL);
- if (ret != PAM_ACCT_EXPIRED &&
+ if (ret != PAM_ACCT_EXPIRED &&
ret != PAM_AUTHTOK_EXPIRED &&
ret != PAM_NEW_AUTHTOK_REQD &&
ret != PAM_SUCCESS) {
pass_old = NULL;
goto out;
}
-
- pam_set_data(pamh, PAM_WINBIND_PWD_LAST_SET, (void *)pwdlastset_prelim, NULL);
- ret = pam_set_item(pamh, PAM_OLDAUTHTOK, (const void *) pass_old);
+ pam_set_data(pamh, PAM_WINBIND_PWD_LAST_SET,
+ (void *)pwdlastset_prelim, NULL);
+
+ ret = pam_set_item(pamh, PAM_OLDAUTHTOK,
+ (const void *) pass_old);
pass_old = NULL;
if (ret != PAM_SUCCESS) {
- _pam_log(pamh, ctrl, LOG_CRIT, "failed to set PAM_OLDAUTHTOK");
+ _pam_log(pamh, ctrl, LOG_CRIT,
+ "failed to set PAM_OLDAUTHTOK");
}
} else if (flags & PAM_UPDATE_AUTHTOK) {
-
+
time_t pwdlastset_update = 0;
-
+
/*
* obtain the proposed password
*/
-
+
/*
- * get the old token back.
+ * get the old token back.
*/
-
+
ret = _pam_get_item(pamh, PAM_OLDAUTHTOK, &pass_old);
-
+
if (ret != PAM_SUCCESS) {
- _pam_log(pamh, ctrl, LOG_NOTICE, "user not authenticated");
+ _pam_log(pamh, ctrl, LOG_NOTICE,
+ "user not authenticated");
goto out;
}
-
+
lctrl = ctrl & ~WINBIND_TRY_FIRST_PASS_ARG;
-
+
if (on(WINBIND_USE_AUTHTOK_ARG, lctrl)) {
lctrl |= WINBIND_USE_FIRST_PASS_ARG;
}
@@ -2295,16 +2557,17 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
* use_authtok is to force the use of a previously entered
* password -- needed for pluggable password strength checking
*/
-
+
ret = _winbind_read_password(pamh, lctrl,
- NULL,
- "Enter new NT password: ",
- "Retype new NT password: ",
- (const char **) &pass_new);
-
+ NULL,
+ "Enter new NT password: ",
+ "Retype new NT password: ",
+ (const char **)&pass_new);
+
if (ret != PAM_SUCCESS) {
- _pam_log_debug(pamh, ctrl, LOG_ALERT
- ,"password - new password not obtained");
+ _pam_log_debug(pamh, ctrl, LOG_ALERT,
+ "password - "
+ "new password not obtained");
pass_old = NULL;/* tidy up */
goto out;
}
@@ -2314,20 +2577,21 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
* propose as their new password. Verify that the new
* password is acceptable.
*/
-
+
if (pass_new[0] == '\0') {/* "\0" password = NULL */
pass_new = NULL;
}
}
-
+
/*
* By reaching here we have approved the passwords and must now
* rebuild the password database file.
*/
- _pam_get_data( pamh, PAM_WINBIND_PWD_LAST_SET,
- &pwdlastset_update);
+ _pam_get_data(pamh, PAM_WINBIND_PWD_LAST_SET,
+ &pwdlastset_update);
- ret = winbind_chauthtok_request(pamh, ctrl, user, pass_old, pass_new, pwdlastset_update);
+ ret = winbind_chauthtok_request(pamh, ctrl, user, pass_old,
+ pass_new, pwdlastset_update);
if (ret) {
_pam_overwrite(pass_new);
_pam_overwrite(pass_old);
@@ -2337,11 +2601,20 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
if (_pam_require_krb5_auth_after_chauthtok(pamh, ctrl, user)) {
- const char *member = get_member_from_config(pamh, argc, argv, ctrl, d);
- const char *cctype = get_krb5_cc_type_from_config(pamh, argc, argv, ctrl, d);
- const int warn_pwd_expire =
- get_warn_pwd_expire_from_config(pamh, argc, argv, ctrl,
- d);
+ const char *member = NULL;
+ const char *cctype = NULL;
+ int warn_pwd_expire;
+
+ member = get_member_from_config(pamh, argc, argv,
+ ctrl, d);
+ cctype = get_krb5_cc_type_from_config(pamh, argc, argv,
+ ctrl, d);
+ warn_pwd_expire = get_warn_pwd_expire_from_config(pamh,
+ argc,
+ argv,
+ ctrl,
+ d);
+
ret = winbind_auth_request(pamh, ctrl, user, pass_new,
member, cctype, 0, &response,
@@ -2351,20 +2624,27 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
pass_old = pass_new = NULL;
if (ret == PAM_SUCCESS) {
-
- /* warn a user if the password is about to expire soon */
+
+ /* warn a user if the password is about to
+ * expire soon */
_pam_warn_password_expiry(pamh, ctrl, &response,
- warn_pwd_expire , NULL);
+ warn_pwd_expire,
+ NULL);
- /* set some info3 info for other modules in the stack */
+ /* set some info3 info for other modules in the
+ * stack */
_pam_set_data_info3(pamh, ctrl, &response);
/* put krb5ccname into env */
- _pam_setup_krb5_env(pamh, ctrl, response.data.auth.krb5ccname);
+ _pam_setup_krb5_env(pamh, ctrl,
+ response.data.auth.krb5ccname);
if (username_ret) {
- pam_set_item (pamh, PAM_USER, username_ret);
- _pam_log_debug(pamh, ctrl, LOG_INFO, "Returned user was '%s'", username_ret);
+ pam_set_item(pamh, PAM_USER,
+ username_ret);
+ _pam_log_debug(pamh, ctrl, LOG_INFO,
+ "Returned user was '%s'",
+ username_ret);
free(username_ret);
}
}
@@ -2381,12 +2661,15 @@ out:
}
/* Deal with offline errors. */
- PAM_WB_REMARK_CHECK_RESPONSE(pamh, ctrl, response, "NT_STATUS_NO_LOGON_SERVERS");
- PAM_WB_REMARK_CHECK_RESPONSE(pamh, ctrl, response, "NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND");
- PAM_WB_REMARK_CHECK_RESPONSE(pamh, ctrl, response, "NT_STATUS_ACCESS_DENIED");
+ PAM_WB_REMARK_CHECK_RESPONSE(pamh, ctrl, response,
+ "NT_STATUS_NO_LOGON_SERVERS");
+ PAM_WB_REMARK_CHECK_RESPONSE(pamh, ctrl, response,
+ "NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND");
+ PAM_WB_REMARK_CHECK_RESPONSE(pamh, ctrl, response,
+ "NT_STATUS_ACCESS_DENIED");
_PAM_LOG_FUNCTION_LEAVE("pam_sm_chauthtok", pamh, ctrl, ret);
-
+
return ret;
}
@@ -2415,7 +2698,7 @@ struct pam_module _pam_winbind_modstruct = {
* Copyright (c) Andrew G. Morgan 1996-8.
* Copyright (c) Alex O. Yuriev, 1996.
* Copyright (c) Cristian Gafton 1996.
- * Copyright (C) Elliot Lee <sopwith@redhat.com> 1996, Red Hat Software.
+ * Copyright (C) Elliot Lee <sopwith@redhat.com> 1996, Red Hat Software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/source/nsswitch/smb_krb5_locator.c b/source/nsswitch/smb_krb5_locator.c
index 5de080c7baa..18a9fe3429f 100644
--- a/source/nsswitch/smb_krb5_locator.c
+++ b/source/nsswitch/smb_krb5_locator.c
@@ -24,7 +24,6 @@
#endif
#if defined(HAVE_KRB5) && defined(HAVE_KRB5_LOCATE_PLUGIN_H)
-BOOL winbind_env_set(void);
#include <krb5/locate_plugin.h>
@@ -240,7 +239,7 @@ void smb_krb5_locator_close(void *private_data)
}
-static int ask_winbind(const char *realm, char **dcname)
+static bool ask_winbind(const char *realm, char **dcname)
{
NSS_STATUS status;
struct winbindd_request request;
@@ -265,15 +264,15 @@ static int ask_winbind(const char *realm, char **dcname)
fprintf(stderr,"[%5u]: smb_krb5_locator_lookup: failed with: %s\n",
(unsigned int)getpid(), nss_err_str(status));
#endif
- return False;
+ return false;
}
*dcname = strdup(response.data.dc_name);
if (!*dcname) {
- return False;
+ return false;
}
- return True;
+ return true;
}
/**
diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c
index 809549ffd7e..2ae85dcb1eb 100644
--- a/source/nsswitch/wb_common.c
+++ b/source/nsswitch/wb_common.c
@@ -24,10 +24,6 @@
#include "winbind_client.h"
-BOOL winbind_env_set( void );
-BOOL winbind_off( void );
-BOOL winbind_on( void );
-
/* Global variables. These are effectively the client state information */
int winbindd_fd = -1; /* fd for winbindd socket */
@@ -35,7 +31,7 @@ static int is_privileged = 0;
/* Free a response structure */
-void free_response(struct winbindd_response *response)
+void winbindd_free_response(struct winbindd_response *response)
{
/* Free any allocated extra_data */
@@ -45,7 +41,7 @@ void free_response(struct winbindd_response *response)
/* Initialise a request structure */
-void init_request(struct winbindd_request *request, int request_type)
+void winbindd_init_request(struct winbindd_request *request, int request_type)
{
request->length = sizeof(struct winbindd_request);
@@ -65,7 +61,7 @@ static void init_response(struct winbindd_response *response)
/* Close established socket */
-void close_sock(void)
+void winbind_close_sock(void)
{
if (winbindd_fd != -1) {
close(winbindd_fd);
@@ -284,6 +280,20 @@ static int winbind_named_pipe_sock(const char *dir)
return -1;
}
+static const char *winbindd_socket_dir(void)
+{
+#ifdef SOCKET_WRAPPER
+ const char *env_dir;
+
+ env_dir = getenv(WINBINDD_SOCKET_DIR_ENVVAR);
+ if (env_dir) {
+ return env_dir;
+ }
+#endif
+
+ return WINBINDD_SOCKET_DIR;
+}
+
/* Connect to winbindd socket */
static int winbind_open_pipe_sock(int recursing, int need_priv)
@@ -296,12 +306,12 @@ static int winbind_open_pipe_sock(int recursing, int need_priv)
ZERO_STRUCT(response);
if (our_pid != getpid()) {
- close_sock();
+ winbind_close_sock();
our_pid = getpid();
}
if ((need_priv != 0) && (is_privileged == 0)) {
- close_sock();
+ winbind_close_sock();
}
if (winbindd_fd != -1) {
@@ -312,7 +322,7 @@ static int winbind_open_pipe_sock(int recursing, int need_priv)
return -1;
}
- if ((winbindd_fd = winbind_named_pipe_sock(WINBINDD_SOCKET_DIR)) == -1) {
+ if ((winbindd_fd = winbind_named_pipe_sock(winbindd_socket_dir())) == -1) {
return -1;
}
@@ -322,7 +332,7 @@ static int winbind_open_pipe_sock(int recursing, int need_priv)
request.wb_flags = WBFLAG_RECURSE;
if ((winbindd_request_response(WINBINDD_INTERFACE_VERSION, &request, &response) != NSS_STATUS_SUCCESS) || (response.data.interface_version != WINBIND_INTERFACE_VERSION)) {
- close_sock();
+ winbind_close_sock();
return -1;
}
@@ -352,7 +362,7 @@ static int winbind_open_pipe_sock(int recursing, int need_priv)
/* Write data to winbindd socket */
-int write_sock(void *buffer, int count, int recursing, int need_priv)
+int winbind_write_sock(void *buffer, int count, int recursing, int need_priv)
{
int result, nwritten;
@@ -380,7 +390,7 @@ int write_sock(void *buffer, int count, int recursing, int need_priv)
ZERO_STRUCT(tv);
if (select(winbindd_fd + 1, &r_fds, NULL, NULL, &tv) == -1) {
- close_sock();
+ winbind_close_sock();
return -1; /* Select error */
}
@@ -398,7 +408,7 @@ int write_sock(void *buffer, int count, int recursing, int need_priv)
/* Write failed */
- close_sock();
+ winbind_close_sock();
return -1;
}
@@ -408,7 +418,7 @@ int write_sock(void *buffer, int count, int recursing, int need_priv)
/* Pipe has closed on remote end */
- close_sock();
+ winbind_close_sock();
goto restart;
}
}
@@ -418,7 +428,7 @@ int write_sock(void *buffer, int count, int recursing, int need_priv)
/* Read data from winbindd socket */
-static int read_sock(void *buffer, int count)
+int winbind_read_sock(void *buffer, int count)
{
int nread = 0;
int total_time = 0, selret;
@@ -442,7 +452,7 @@ static int read_sock(void *buffer, int count)
tv.tv_sec = 5;
if ((selret = select(winbindd_fd + 1, &r_fds, NULL, NULL, &tv)) == -1) {
- close_sock();
+ winbind_close_sock();
return -1; /* Select error */
}
@@ -450,7 +460,7 @@ static int read_sock(void *buffer, int count)
/* Not ready for read yet... */
if (total_time >= 30) {
/* Timeout */
- close_sock();
+ winbind_close_sock();
return -1;
}
total_time += 5;
@@ -470,7 +480,7 @@ static int read_sock(void *buffer, int count)
can do here is just return -1 and fail since the
transaction has failed half way through. */
- close_sock();
+ winbind_close_sock();
return -1;
}
@@ -484,7 +494,7 @@ static int read_sock(void *buffer, int count)
/* Read reply */
-int read_reply(struct winbindd_response *response)
+int winbindd_read_reply(struct winbindd_response *response)
{
int result1, result2 = 0;
@@ -494,9 +504,9 @@ int read_reply(struct winbindd_response *response)
/* Read fixed length response */
- if ((result1 = read_sock(response, sizeof(struct winbindd_response)))
- == -1) {
-
+ result1 = winbind_read_sock(response,
+ sizeof(struct winbindd_response));
+ if (result1 == -1) {
return -1;
}
@@ -518,9 +528,10 @@ int read_reply(struct winbindd_response *response)
return -1;
}
- if ((result2 = read_sock(response->extra_data.data, extra_data_len))
- == -1) {
- free_response(response);
+ result2 = winbind_read_sock(response->extra_data.data,
+ extra_data_len);
+ if (result2 == -1) {
+ winbindd_free_response(response);
return -1;
}
}
@@ -530,16 +541,16 @@ int read_reply(struct winbindd_response *response)
return result1 + result2;
}
-BOOL winbind_env_set( void )
+bool winbind_env_set(void)
{
char *env;
if ((env=getenv(WINBINDD_DONT_ENV)) != NULL) {
if(strcmp(env, "1") == 0) {
- return True;
+ return true;
}
}
- return False;
+ return false;
}
/*
@@ -564,16 +575,19 @@ NSS_STATUS winbindd_send_request(int req_type, int need_priv,
/* Fill in request and send down pipe */
- init_request(request, req_type);
+ winbindd_init_request(request, req_type);
- if (write_sock(request, sizeof(*request),
- request->wb_flags & WBFLAG_RECURSE, need_priv) == -1) {
+ if (winbind_write_sock(request, sizeof(*request),
+ request->wb_flags & WBFLAG_RECURSE,
+ need_priv) == -1) {
return NSS_STATUS_UNAVAIL;
}
if ((request->extra_len != 0) &&
- (write_sock(request->extra_data.data, request->extra_len,
- request->wb_flags & WBFLAG_RECURSE, need_priv) == -1)) {
+ (winbind_write_sock(request->extra_data.data,
+ request->extra_len,
+ request->wb_flags & WBFLAG_RECURSE,
+ need_priv) == -1)) {
return NSS_STATUS_UNAVAIL;
}
@@ -596,13 +610,13 @@ NSS_STATUS winbindd_get_response(struct winbindd_response *response)
init_response(response);
/* Wait for reply */
- if (read_reply(response) == -1) {
+ if (winbindd_read_reply(response) == -1) {
return NSS_STATUS_UNAVAIL;
}
/* Throw away extra data if client didn't request it */
if (response == &lresponse) {
- free_response(response);
+ winbindd_free_response(response);
}
/* Copy reply data from socket */
@@ -656,21 +670,14 @@ NSS_STATUS winbindd_priv_request_response(int req_type,
enable them
************************************************************************/
-/* Use putenv() instead of setenv() in these functions as not all
- environments have the latter. */
-
-BOOL winbind_off( void )
+bool winbind_off(void)
{
- static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV "=1");
-
- return putenv(s) != -1;
+ return setenv(WINBINDD_DONT_ENV, "1", 1) != -1;
}
-BOOL winbind_on( void )
+bool winbind_on(void)
{
- static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV "=0");
-
- return putenv(s) != -1;
+ return setenv(WINBINDD_DONT_ENV, "0", 1) != -1;
}
/*************************************************************************
diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c
index 5fa07222e27..bd5c6392f10 100644
--- a/source/nsswitch/wbinfo.c
+++ b/source/nsswitch/wbinfo.c
@@ -21,8 +21,7 @@
*/
#include "includes.h"
-#include "winbindd.h"
-#include "debug.h"
+#include "winbind_client.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
@@ -469,8 +468,6 @@ static BOOL wbinfo_domain_info(const char *domain_name)
d_printf("Primary : %s\n",
response.data.domain_info.primary ? "Yes" : "No");
- d_printf("Sequence : %d\n", response.data.domain_info.sequence_number);
-
return True;
}
diff --git a/source/nsswitch/winbind_client.h b/source/nsswitch/winbind_client.h
index 423fa300565..2a3956e1fd4 100644
--- a/source/nsswitch/winbind_client.h
+++ b/source/nsswitch/winbind_client.h
@@ -1,7 +1,8 @@
#include "winbind_nss_config.h"
-#include "winbindd_nss.h"
+#include "winbind_struct_protocol.h"
-void init_request(struct winbindd_request *req,int rq_type);
+void winbindd_init_request(struct winbindd_request *req,int rq_type);
+void winbindd_free_response(struct winbindd_response *response);
NSS_STATUS winbindd_send_request(int req_type, int need_priv,
struct winbindd_request *request);
NSS_STATUS winbindd_get_response(struct winbindd_response *response);
@@ -11,9 +12,14 @@ NSS_STATUS winbindd_request_response(int req_type,
NSS_STATUS winbindd_priv_request_response(int req_type,
struct winbindd_request *request,
struct winbindd_response *response);
-int write_sock(void *buffer, int count, int recursing, int need_priv);
-int read_reply(struct winbindd_response *response);
-void close_sock(void);
-void free_response(struct winbindd_response *response);
-const char *nss_err_str(NSS_STATUS ret);
+int winbindd_read_reply(struct winbindd_response *response);
+
+bool winbind_env_set(void);
+bool winbind_off(void);
+bool winbind_on(void);
+int winbind_write_sock(void *buffer, int count, int recursing, int need_priv);
+int winbind_read_sock(void *buffer, int count);
+void winbind_close_sock(void);
+
+const char *nss_err_str(NSS_STATUS ret);
diff --git a/source/nsswitch/winbind_nss.h b/source/nsswitch/winbind_nss.h
index 374cd4af103..0a3bc7cefac 100644
--- a/source/nsswitch/winbind_nss.h
+++ b/source/nsswitch/winbind_nss.h
@@ -37,8 +37,7 @@
* Linux (glibc)
*/
-#include <nss.h>
-typedef enum nss_status NSS_STATUS;
+#include "nsswitch/winbind_nss_linux.h"
#elif HAVE_NS_API_H
diff --git a/source/nsswitch/winbind_nss_aix.c b/source/nsswitch/winbind_nss_aix.c
index 0ddd6de53f3..9c84e5f8aa5 100644
--- a/source/nsswitch/winbind_nss_aix.c
+++ b/source/nsswitch/winbind_nss_aix.c
@@ -284,7 +284,7 @@ static struct group *wb_aix_getgrgid(gid_t gid)
grp = fill_grent(&response.data.gr, response.extra_data.data);
- free_response(&response);
+ winbindd_free_response(&response);
return grp;
}
@@ -314,7 +314,7 @@ static struct group *wb_aix_getgrnam(const char *name)
grp = fill_grent(&response.data.gr, response.extra_data.data);
- free_response(&response);
+ winbindd_free_response(&response);
return grp;
}
@@ -385,7 +385,7 @@ static char *wb_aix_getgrset(char *user)
}
idx += sprintf(tmpbuf+idx, "%u", gid_list[i]);
- free_response(&response);
+ winbindd_free_response(&response);
return tmpbuf;
}
@@ -412,7 +412,7 @@ static struct passwd *wb_aix_getpwuid(uid_t uid)
pwd = fill_pwent(&response.data.pw);
- free_response(&response);
+ winbindd_free_response(&response);
logit("getpwuid gave ptr %p\n", pwd);
@@ -445,7 +445,7 @@ static struct passwd *wb_aix_getpwnam(const char *name)
pwd = fill_pwent(&response.data.pw);
- free_response(&response);
+ winbindd_free_response(&response);
logit("getpwnam gave ptr %p\n", pwd);
@@ -482,7 +482,7 @@ static int wb_aix_lsuser(char *attributes[], attrval_t results[], int size)
s = malloc(len+2);
if (!s) {
- free_response(&response);
+ winbindd_free_response(&response);
errno = ENOMEM;
return -1;
}
@@ -494,7 +494,7 @@ static int wb_aix_lsuser(char *attributes[], attrval_t results[], int size)
results[0].attr_un.au_char = s;
results[0].attr_flag = 0;
- free_response(&response);
+ winbindd_free_response(&response);
return 0;
}
@@ -530,7 +530,7 @@ static int wb_aix_lsgroup(char *attributes[], attrval_t results[], int size)
s = malloc(len+2);
if (!s) {
- free_response(&response);
+ winbindd_free_response(&response);
errno = ENOMEM;
return -1;
}
@@ -542,7 +542,7 @@ static int wb_aix_lsgroup(char *attributes[], attrval_t results[], int size)
results[0].attr_un.au_char = s;
results[0].attr_flag = 0;
- free_response(&response);
+ winbindd_free_response(&response);
return 0;
}
@@ -887,7 +887,7 @@ static int wb_aix_authenticate(char *user, char *pass,
result = winbindd_request_response(WINBINDD_PAM_AUTH, &request, &response);
- free_response(&response);
+ winbindd_free_response(&response);
logit("auth result %d for '%s'\n", result, user);
@@ -936,7 +936,7 @@ static int wb_aix_chpass(char *user, char *oldpass, char *newpass, char **messag
result = winbindd_request_response(WINBINDD_PAM_CHAUTHTOK, &request, &response);
- free_response(&response);
+ winbindd_free_response(&response);
if (result == NSS_STATUS_SUCCESS) {
errno = 0;
diff --git a/source/nsswitch/winbind_nss_config.h b/source/nsswitch/winbind_nss_config.h
index ea764ee8985..e0828dc9052 100644
--- a/source/nsswitch/winbind_nss_config.h
+++ b/source/nsswitch/winbind_nss_config.h
@@ -51,56 +51,6 @@ typedef char pstring[PSTRING_LEN];
typedef char fstring[FSTRING_LEN];
#endif
-#ifndef _UPPER_BOOL
-#define _UPPER_BOOL
-#define False (0)
-#define True (1)
-#define Auto (2)
-typedef int BOOL;
-#endif
-
-#if !defined(uint32)
-#if (SIZEOF_INT == 4)
-#define uint32 unsigned int
-#elif (SIZEOF_LONG == 4)
-#define uint32 unsigned long
-#elif (SIZEOF_SHORT == 4)
-#define uint32 unsigned short
-#endif
-#endif
-
-#if !defined(uint16)
-#if (SIZEOF_SHORT == 4)
-#define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
-#else /* SIZEOF_SHORT != 4 */
-#define uint16 unsigned short
-#endif /* SIZEOF_SHORT != 4 */
-#endif
-
-#ifndef uint8
-#define uint8 unsigned char
-#endif
-
-/*
- * check for 8 byte long long
- */
-
-#if !defined(uint64)
-#if (SIZEOF_LONG == 8)
-#define uint64 unsigned long
-#elif (SIZEOF_LONG_LONG == 8)
-#define uint64 unsigned long long
-#endif /* don't lie. If we don't have it, then don't use it */
-#endif
-
-#if !defined(int64)
-#if (SIZEOF_LONG == 8)
-#define int64 long
-#elif (SIZEOF_LONG_LONG == 8)
-#define int64 long long
-#endif /* don't lie. If we don't have it, then don't use it */
-#endif
-
/* Some systems (SCO) treat UNIX domain sockets as FIFOs */
#ifndef S_IFSOCK
@@ -111,9 +61,4 @@ typedef int BOOL;
#define S_ISSOCK(mode) ((mode & S_IFSOCK) == S_IFSOCK)
#endif
-#ifndef HAVE_SOCKLEN_T_TYPE
-#define HAVE_SOCKLEN_T_TYPE
-typedef int socklen_t;
-#endif
-
#endif
diff --git a/source/nsswitch/winbind_nss_irix.c b/source/nsswitch/winbind_nss_irix.c
index b0277db5592..4726c1e13f3 100644
--- a/source/nsswitch/winbind_nss_irix.c
+++ b/source/nsswitch/winbind_nss_irix.c
@@ -195,7 +195,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
if (status != NSS_STATUS_SUCCESS) {
/* free any extra data area in response structure */
- free_response(&response);
+ winbindd_free_response(&response);
nsd_logprintf(NSD_LOG_MIN,
"callback (winbind) returning not found, status = %d\n",
status);
@@ -227,7 +227,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
return NSD_ERROR;
}
- free_response(&response);
+ winbindd_free_response(&response);
nsd_logprintf(NSD_LOG_MIN, " %s\n", result);
nsd_set_result(rq, NS_SUCCESS, result, rlen, DYNAMIC);
@@ -252,7 +252,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
if (rlen == 0 || result == NULL)
return NSD_ERROR;
- free_response(&response);
+ winbindd_free_response(&response);
nsd_logprintf(NSD_LOG_MIN, " %s\n", result);
nsd_set_result(rq, NS_SUCCESS, result, rlen, DYNAMIC);
@@ -279,7 +279,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
if (rlen == 0 || result == NULL)
return NSD_ERROR;
- free_response(&response);
+ winbindd_free_response(&response);
nsd_logprintf(NSD_LOG_MIN, " %s\n", result);
nsd_set_result(rq, NS_SUCCESS, result, rlen, DYNAMIC);
@@ -290,7 +290,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
case WINBINDD_SETPWENT:
nsd_logprintf(NSD_LOG_MIN,
"callback (winbind) SETGRENT | SETPWENT\n");
- free_response(&response);
+ winbindd_free_response(&response);
return(do_list(1,rq));
case WINBINDD_GETGRENT:
@@ -311,7 +311,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
gr = (struct winbindd_gr *)response.extra_data.data;
if (! gr ) {
nsd_logprintf(NSD_LOG_MIN, " no extra_data\n");
- free_response(&response);
+ winbindd_free_response(&response);
return NSD_ERROR;
}
@@ -338,7 +338,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
}
entries = response.data.num_entries;
- free_response(&response);
+ winbindd_free_response(&response);
if (entries < MAX_GETPWENT_USERS)
return(do_list(2,rq));
else
@@ -360,7 +360,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
pw = (struct winbindd_pw *)response.extra_data.data;
if (! pw ) {
nsd_logprintf(NSD_LOG_MIN, " no extra_data\n");
- free_response(&response);
+ winbindd_free_response(&response);
return NSD_ERROR;
}
for (i = 0; i < response.data.num_entries; i++) {
@@ -385,7 +385,7 @@ winbind_callback(nsd_file_t **rqp, int fd)
}
entries = response.data.num_entries;
- free_response(&response);
+ winbindd_free_response(&response);
if (entries < MAX_GETPWENT_USERS)
return(do_list(2,rq));
else
@@ -396,11 +396,11 @@ winbind_callback(nsd_file_t **rqp, int fd)
case WINBINDD_ENDPWENT:
nsd_logprintf(NSD_LOG_MIN, "callback (winbind) ENDGRENT | ENDPWENT\n");
nsd_append_element(rq, NS_SUCCESS, "\n", 1);
- free_response(&response);
+ winbindd_free_response(&response);
return NSD_NEXT;
default:
- free_response(&response);
+ winbindd_free_response(&response);
nsd_logprintf(NSD_LOG_MIN, "callback (winbind) invalid command %d\n", (int)rq->f_cmd_data);
return NSD_NEXT;
}
diff --git a/source/nsswitch/winbind_nss_linux.c b/source/nsswitch/winbind_nss_linux.c
index b732d96fd1a..ac53979cedd 100644
--- a/source/nsswitch/winbind_nss_linux.c
+++ b/source/nsswitch/winbind_nss_linux.c
@@ -95,13 +95,13 @@ static char *get_static(char **buffer, size_t *buflen, size_t len)
lib/util_str.c as I really don't want to have to link in any other
objects if I can possibly avoid it. */
-static BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
+static bool next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
{
char *s;
- BOOL quoted;
+ bool quoted;
size_t len=1;
- if (!ptr) return(False);
+ if (!ptr) return false;
s = *ptr;
@@ -112,10 +112,10 @@ static BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
while (*s && strchr(sep,*s)) s++;
/* nothing left? */
- if (! *s) return(False);
+ if (! *s) return false;
/* copy over the token */
- for (quoted = False; len < bufsize && *s && (quoted || !strchr(sep,*s)); s++) {
+ for (quoted = false; len < bufsize && *s && (quoted || !strchr(sep,*s)); s++) {
if (*s == '\"') {
quoted = !quoted;
} else {
@@ -127,7 +127,7 @@ static BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
*ptr = (*s) ? s+1 : s;
*buff = 0;
- return(True);
+ return true;
}
@@ -334,7 +334,7 @@ _nss_winbind_setpwent(void)
if (num_pw_cache > 0) {
ndx_pw_cache = num_pw_cache = 0;
- free_response(&getpwent_response);
+ winbindd_free_response(&getpwent_response);
}
ret = winbindd_request_response(WINBINDD_SETPWENT, NULL, NULL);
@@ -357,7 +357,7 @@ _nss_winbind_endpwent(void)
if (num_pw_cache > 0) {
ndx_pw_cache = num_pw_cache = 0;
- free_response(&getpwent_response);
+ winbindd_free_response(&getpwent_response);
}
ret = winbindd_request_response(WINBINDD_ENDPWENT, NULL, NULL);
@@ -392,7 +392,7 @@ _nss_winbind_getpwent_r(struct passwd *result, char *buffer,
/* Else call winbindd to get a bunch of entries */
if (num_pw_cache > 0) {
- free_response(&getpwent_response);
+ winbindd_free_response(&getpwent_response);
}
ZERO_STRUCT(request);
@@ -431,20 +431,20 @@ _nss_winbind_getpwent_r(struct passwd *result, char *buffer,
/* Out of memory - try again */
if (ret == NSS_STATUS_TRYAGAIN) {
- called_again = True;
+ called_again = true;
*errnop = errno = ERANGE;
goto done;
}
*errnop = errno = 0;
- called_again = False;
+ called_again = false;
ndx_pw_cache++;
/* If we've finished with this lot of results free cache */
if (ndx_pw_cache == num_pw_cache) {
ndx_pw_cache = num_pw_cache = 0;
- free_response(&getpwent_response);
+ winbindd_free_response(&getpwent_response);
}
}
done:
@@ -487,7 +487,7 @@ _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
&buffer, &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
- keep_response = True;
+ keep_response = true;
*errnop = errno = ERANGE;
goto done;
}
@@ -500,16 +500,16 @@ _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
ret = fill_pwent(result, &response.data.pw, &buffer, &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
- keep_response = True;
+ keep_response = true;
*errnop = errno = ERANGE;
goto done;
}
- keep_response = False;
+ keep_response = false;
*errnop = errno = 0;
}
- free_response(&response);
+ winbindd_free_response(&response);
done:
#ifdef DEBUG_NSS
@@ -554,7 +554,7 @@ _nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer,
&buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
- keep_response = True;
+ keep_response = true;
*errnop = errno = ERANGE;
goto done;
}
@@ -567,16 +567,16 @@ _nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer,
ret = fill_pwent(result, &response.data.pw, &buffer, &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
- keep_response = True;
+ keep_response = true;
*errnop = errno = ERANGE;
goto done;
}
- keep_response = False;
+ keep_response = false;
*errnop = errno = 0;
}
- free_response(&response);
+ winbindd_free_response(&response);
done:
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: getpwnam %s returns %s (%d)\n", getpid(),
@@ -606,7 +606,7 @@ _nss_winbind_setgrent(void)
if (num_gr_cache > 0) {
ndx_gr_cache = num_gr_cache = 0;
- free_response(&getgrent_response);
+ winbindd_free_response(&getgrent_response);
}
ret = winbindd_request_response(WINBINDD_SETGRENT, NULL, NULL);
@@ -629,7 +629,7 @@ _nss_winbind_endgrent(void)
if (num_gr_cache > 0) {
ndx_gr_cache = num_gr_cache = 0;
- free_response(&getgrent_response);
+ winbindd_free_response(&getgrent_response);
}
ret = winbindd_request_response(WINBINDD_ENDGRENT, NULL, NULL);
@@ -666,7 +666,7 @@ winbind_getgrent(enum winbindd_cmd cmd,
/* Else call winbindd to get a bunch of entries */
if (num_gr_cache > 0) {
- free_response(&getgrent_response);
+ winbindd_free_response(&getgrent_response);
}
ZERO_STRUCT(request);
@@ -714,20 +714,20 @@ winbind_getgrent(enum winbindd_cmd cmd,
/* Out of memory - try again */
if (ret == NSS_STATUS_TRYAGAIN) {
- called_again = True;
+ called_again = true;
*errnop = errno = ERANGE;
goto done;
}
*errnop = 0;
- called_again = False;
+ called_again = false;
ndx_gr_cache++;
/* If we've finished with this lot of results free cache */
if (ndx_gr_cache == num_gr_cache) {
ndx_gr_cache = num_gr_cache = 0;
- free_response(&getgrent_response);
+ winbindd_free_response(&getgrent_response);
}
}
done:
@@ -791,7 +791,7 @@ _nss_winbind_getgrnam_r(const char *name,
&buffer, &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
- keep_response = True;
+ keep_response = true;
*errnop = errno = ERANGE;
goto done;
}
@@ -806,16 +806,16 @@ _nss_winbind_getgrnam_r(const char *name,
&buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
- keep_response = True;
+ keep_response = true;
*errnop = errno = ERANGE;
goto done;
}
- keep_response = False;
+ keep_response = false;
*errnop = 0;
}
- free_response(&response);
+ winbindd_free_response(&response);
done:
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: getgrnam %s returns %s (%d)\n", getpid(),
@@ -860,7 +860,7 @@ _nss_winbind_getgrgid_r(gid_t gid,
&buffer, &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
- keep_response = True;
+ keep_response = true;
*errnop = errno = ERANGE;
goto done;
}
@@ -875,16 +875,16 @@ _nss_winbind_getgrgid_r(gid_t gid,
&buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
- keep_response = True;
+ keep_response = true;
*errnop = errno = ERANGE;
goto done;
}
- keep_response = False;
+ keep_response = false;
*errnop = 0;
}
- free_response(&response);
+ winbindd_free_response(&response);
done:
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: getgrgid %d returns %s (%d)\n", getpid(),
@@ -1032,7 +1032,7 @@ _nss_winbind_getusersids(const char *user_sid, char **group_sids,
errno = *errnop = 0;
done:
- free_response(&response);
+ winbindd_free_response(&response);
return ret;
}
@@ -1074,7 +1074,7 @@ _nss_winbind_nametosid(const char *name, char **sid, char *buffer,
strcpy(*sid, response.data.sid.sid);
failed:
- free_response(&response);
+ winbindd_free_response(&response);
return ret;
}
@@ -1105,7 +1105,7 @@ _nss_winbind_sidtoname(const char *sid, char **name, char *buffer,
}
sep_char = response.data.info.winbind_separator;
- free_response(&response);
+ winbindd_free_response(&response);
}
@@ -1138,7 +1138,7 @@ _nss_winbind_sidtoname(const char *sid, char **name, char *buffer,
*errnop = errno = 0;
failed:
- free_response(&response);
+ winbindd_free_response(&response);
return ret;
}
@@ -1237,7 +1237,7 @@ _nss_winbind_uidtosid(uid_t uid, char **sid, char *buffer,
strcpy(*sid, response.data.sid.sid);
failed:
- free_response(&response);
+ winbindd_free_response(&response);
return ret;
}
@@ -1276,6 +1276,6 @@ _nss_winbind_gidtosid(gid_t gid, char **sid, char *buffer,
strcpy(*sid, response.data.sid.sid);
failed:
- free_response(&response);
+ winbindd_free_response(&response);
return ret;
}
diff --git a/source/nsswitch/winbind_nss_linux.h b/source/nsswitch/winbind_nss_linux.h
index 52aa1edcec6..74aaec5ce60 100644
--- a/source/nsswitch/winbind_nss_linux.h
+++ b/source/nsswitch/winbind_nss_linux.h
@@ -22,12 +22,8 @@
#ifndef _WINBIND_NSS_LINUX_H
#define _WINBIND_NSS_LINUX_H
-#if HAVE_NSS_H
-
#include <nss.h>
typedef enum nss_status NSS_STATUS;
-#endif /* HAVE_NSS_H */
-
#endif /* _WINBIND_NSS_LINUX_H */
diff --git a/source/nsswitch/winbind_nss_solaris.c b/source/nsswitch/winbind_nss_solaris.c
index 55678ef7b01..5a72393788a 100644
--- a/source/nsswitch/winbind_nss_solaris.c
+++ b/source/nsswitch/winbind_nss_solaris.c
@@ -500,7 +500,7 @@ _nss_winbind_ipnodes_getbyname(nss_backend_t* be, void *args)
ret = parse_response(af, argp, &response);
}
- free_response(&response);
+ winbindd_free_response(&response);
return ret;
}
@@ -523,7 +523,7 @@ _nss_winbind_hosts_getbyname(nss_backend_t* be, void *args)
ret = parse_response(AF_INET, argp, &response);
}
- free_response(&response);
+ winbindd_free_response(&response);
return ret;
}
@@ -553,7 +553,7 @@ _nss_winbind_hosts_getbyaddr(nss_backend_t* be, void *args)
if( ret == NSS_STATUS_SUCCESS) {
parse_response(argp->key.hostaddr.type, argp, &response);
}
- free_response(&response);
+ winbindd_free_response(&response);
return ret;
}
diff --git a/source/nsswitch/winbindd_nss.h b/source/nsswitch/winbind_struct_protocol.h
index 941b63c5577..d8e5c2f3b8c 100644
--- a/source/nsswitch/winbindd_nss.h
+++ b/source/nsswitch/winbind_struct_protocol.h
@@ -11,15 +11,6 @@
products. You do not need to give any attribution.
*/
-
-#ifndef CONST_DISCARD
-#define CONST_DISCARD(type, ptr) ((type) ((void *) (ptr)))
-#endif
-
-#ifndef CONST_ADD
-#define CONST_ADD(type, ptr) ((type) ((const void *) (ptr)))
-#endif
-
#ifndef SAFE_FREE
#define SAFE_FREE(x) do { if(x) {free(x); x=NULL;} } while(0)
#endif
@@ -28,7 +19,21 @@
#define _WINBINDD_NTDOM_H
#define WINBINDD_SOCKET_NAME "pipe" /* Name of PF_UNIX socket */
+
+/* Let the build environment override the public winbindd socket location. This
+ * is needed for launchd support -- jpeach.
+ */
+#ifndef WINBINDD_SOCKET_DIR
#define WINBINDD_SOCKET_DIR "/tmp/.winbindd" /* Name of PF_UNIX dir */
+#endif
+
+/*
+ * when compiled with socket_wrapper support
+ * the location of the WINBINDD_SOCKET_DIR
+ * can be overwritten via an environment variable
+ */
+#define WINBINDD_SOCKET_DIR_ENVVAR "WINBINDD_SOCKET_DIR"
+
#define WINBINDD_PRIV_SOCKET_SUBDIR "winbindd_privileged" /* name of subdirectory of lp_lockdir() to hold the 'privileged' pipe */
#define WINBINDD_DOMAIN_ENV "WINBINDD_DOMAIN" /* Environment variables */
#define WINBINDD_DONT_ENV "_NO_WINBINDD"
@@ -43,11 +48,7 @@
between /lib/libnss_winbind.so.2 and /li64/libnss_winbind.so.2.
The easiest way to do this is to always use 8byte values for time_t. */
-#if defined(int64)
-# define SMB_TIME_T int64
-#else
-# define SMB_TIME_T time_t
-#endif
+#define SMB_TIME_T int64_t
/* Socket commands */
@@ -185,8 +186,8 @@ typedef struct winbindd_gr {
fstring gr_name;
fstring gr_passwd;
gid_t gr_gid;
- uint32 num_gr_mem;
- uint32 gr_mem_ofs; /* offset to group membership */
+ uint32_t num_gr_mem;
+ uint32_t gr_mem_ofs; /* offset to group membership */
} WINBINDD_GR;
/* PAM specific request flags */
@@ -224,13 +225,13 @@ typedef struct winbindd_gr {
******************************************************************************/
struct winbindd_request {
- uint32 length;
+ uint32_t length;
enum winbindd_cmd cmd; /* Winbindd command to execute */
enum winbindd_cmd original_cmd; /* Original Winbindd command
issued to parent process */
pid_t pid; /* pid of calling process */
- uint32 wb_flags; /* generic flags */
- uint32 flags; /* flags relevant *only* to a given request */
+ uint32_t wb_flags; /* generic flags */
+ uint32_t flags; /* flags relevant *only* to a given request */
fstring domain_name; /* name of domain for which the request applies */
union {
@@ -250,14 +251,14 @@ struct winbindd_request {
uid_t uid;
} auth; /* pam_winbind auth module */
struct {
- unsigned char chal[8];
- uint32 logon_parameters;
+ uint8_t chal[8];
+ uint32_t logon_parameters;
fstring user;
fstring domain;
fstring lm_resp;
- uint32 lm_resp_len;
+ uint32_t lm_resp_len;
fstring nt_resp;
- uint32 nt_resp_len;
+ uint32_t nt_resp_len;
fstring workstation;
fstring require_membership_of_sid;
} auth_crap;
@@ -269,14 +270,14 @@ struct winbindd_request {
struct {
fstring user;
fstring domain;
- unsigned char new_nt_pswd[516];
- uint16 new_nt_pswd_len;
- unsigned char old_nt_hash_enc[16];
- uint16 old_nt_hash_enc_len;
- unsigned char new_lm_pswd[516];
- uint16 new_lm_pswd_len;
- unsigned char old_lm_hash_enc[16];
- uint16 old_lm_hash_enc_len;
+ uint8_t new_nt_pswd[516];
+ uint16_t new_nt_pswd_len;
+ uint8_t old_nt_hash_enc[16];
+ uint16_t old_nt_hash_enc_len;
+ uint8_t new_lm_pswd[516];
+ uint16_t new_lm_pswd_len;
+ uint8_t old_lm_hash_enc[16];
+ uint16_t old_lm_hash_enc_len;
} chng_pswd_auth_crap;/* pam_winbind passwd module */
struct {
fstring user;
@@ -288,13 +289,13 @@ struct winbindd_request {
fstring dom_name; /* lookupname */
fstring name;
} name;
- uint32 num_entries; /* getpwent, getgrent */
+ uint32_t num_entries; /* getpwent, getgrent */
struct {
fstring username;
fstring groupname;
} acct_mgt;
struct {
- BOOL is_primary;
+ bool is_primary;
fstring dcname;
} init_conn;
struct {
@@ -303,10 +304,10 @@ struct winbindd_request {
} dual_sid2id;
struct {
fstring sid;
- uint32 type;
- uint32 id;
+ uint32_t type;
+ uint32_t id;
} dual_idmapset;
- BOOL list_all_domains;
+ bool list_all_domains;
struct {
uid_t uid;
@@ -317,8 +318,8 @@ struct winbindd_request {
produce an actual challenge response. It merely
succeeds if there are cached credentials available
that could be used. */
- uint32 initial_blob_len; /* blobs in extra_data */
- uint32 challenge_blob_len;
+ uint32_t initial_blob_len; /* blobs in extra_data */
+ uint32_t challenge_blob_len;
} ccache_ntlm_auth;
/* padding -- needed to fix alignment between 32bit and 64bit libs.
@@ -331,7 +332,7 @@ struct winbindd_request {
SMB_TIME_T padding;
char *data;
} extra_data;
- uint32 extra_len;
+ uint32_t extra_len;
char null_term;
};
@@ -357,7 +358,7 @@ struct winbindd_response {
/* Header information */
- uint32 length; /* Length of response */
+ uint32_t length; /* Length of response */
enum winbindd_result result; /* Result code */
/* Fixed length return data */
@@ -375,7 +376,7 @@ struct winbindd_response {
struct winbindd_gr gr;
- uint32 num_entries; /* getpwent, getgrent */
+ uint32_t num_entries; /* getpwent, getgrent */
struct winbindd_sid {
fstring sid; /* lookupname, [ug]id_to_sid */
int type;
@@ -396,20 +397,20 @@ struct winbindd_response {
fstring dc_name;
struct auth_reply {
- uint32 nt_status;
+ uint32_t nt_status;
fstring nt_status_string;
fstring error_string;
int pam_error;
char user_session_key[16];
char first_8_lm_hash[8];
fstring krb5ccname;
- uint32 reject_reason;
- uint32 padding;
+ uint32_t reject_reason;
+ uint32_t padding;
struct policy_settings {
- uint32 min_length_password;
- uint32 password_history;
- uint32 password_properties;
- uint32 padding;
+ uint32_t min_length_password;
+ uint32_t password_history;
+ uint32_t password_properties;
+ uint32_t padding;
SMB_TIME_T expire;
SMB_TIME_T min_passwordage;
} policy;
@@ -420,14 +421,14 @@ struct winbindd_response {
SMB_TIME_T pass_last_set_time;
SMB_TIME_T pass_can_change_time;
SMB_TIME_T pass_must_change_time;
- uint32 logon_count;
- uint32 bad_pw_count;
- uint32 user_rid;
- uint32 group_rid;
- uint32 num_groups;
- uint32 user_flgs;
- uint32 acct_flags;
- uint32 num_other_sids;
+ uint32_t logon_count;
+ uint32_t bad_pw_count;
+ uint32_t user_rid;
+ uint32_t group_rid;
+ uint32_t num_groups;
+ uint32_t user_flgs;
+ uint32_t acct_flags;
+ uint32_t num_other_sids;
fstring dom_sid;
fstring user_name;
fstring full_name;
@@ -443,21 +444,21 @@ struct winbindd_response {
fstring name;
fstring alt_name;
fstring sid;
- BOOL native_mode;
- BOOL active_directory;
- BOOL primary;
- uint32 sequence_number;
+ bool native_mode;
+ bool active_directory;
+ bool primary;
} domain_info;
+ uint32_t sequence_number;
struct {
fstring acct_name;
fstring full_name;
fstring homedir;
fstring shell;
- uint32 primary_gid;
- uint32 group_rid;
+ uint32_t primary_gid;
+ uint32_t group_rid;
} user_info;
struct {
- uint32 auth_blob_len; /* blob in extra_data */
+ uint32_t auth_blob_len; /* blob in extra_data */
} ccache_ntlm_auth;
} data;
@@ -475,8 +476,8 @@ struct WINBINDD_MEMORY_CREDS {
uid_t uid;
int ref_count;
size_t len;
- unsigned char *nt_hash; /* Base pointer for the following 2 */
- unsigned char *lm_hash;
+ uint8_t *nt_hash; /* Base pointer for the following 2 */
+ uint8_t *lm_hash;
char *pass;
};
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index fd4266fd26a..39e8d6ef474 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -370,7 +370,6 @@ typedef struct {
char **szHostsdeny;
char *szMagicScript;
char *szMagicOutput;
- char *szMangledMap;
char *szVetoFiles;
char *szHideFiles;
char *szVetoOplockFiles;
@@ -512,7 +511,6 @@ static service sDefault = {
NULL, /* szHostsdeny */
NULL, /* szMagicScript */
NULL, /* szMagicOutput */
- NULL, /* szMangledMap */
NULL, /* szVetoFiles */
NULL, /* szHideFiles */
NULL, /* szVetoOplockFiles */
@@ -1125,7 +1123,6 @@ static struct parm_struct parm_table[] = {
{"map system", P_BOOL, P_LOCAL, &sDefault.bMap_system, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"map readonly", P_ENUM, P_LOCAL, &sDefault.iMap_readonly, NULL, enum_map_readonly, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"mangled names", P_BOOL, P_LOCAL, &sDefault.bMangledNames, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
- {"mangled map", P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_DEPRECATED },
{"max stat cache size", P_INTEGER, P_GLOBAL, &Globals.iMaxStatCacheSize, NULL, NULL, FLAG_ADVANCED},
{"stat cache", P_BOOL, P_GLOBAL, &Globals.bStatCache, NULL, NULL, FLAG_ADVANCED},
{"store dos attributes", P_BOOL, P_LOCAL, &sDefault.bStoreDosAttributes, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
@@ -2071,7 +2068,6 @@ FN_LOCAL_STRING(lp_fstype, fstype)
FN_LOCAL_LIST(lp_vfs_objects, szVfsObjects)
FN_LOCAL_STRING(lp_msdfs_proxy, szMSDfsProxy)
static FN_LOCAL_STRING(lp_volume, volume)
-FN_LOCAL_PARM_STRING(lp_mangled_map, szMangledMap)
FN_LOCAL_STRING(lp_veto_files, szVetoFiles)
FN_LOCAL_STRING(lp_hide_files, szHideFiles)
FN_LOCAL_STRING(lp_veto_oplocks, szVetoOplockFiles)
diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
index b2c3c39cbb8..a945867967b 100644
--- a/source/passdb/pdb_ldap.c
+++ b/source/passdb/pdb_ldap.c
@@ -2437,7 +2437,7 @@ static NTSTATUS ldapsam_enum_group_members(struct pdb_methods *methods,
goto done;
}
- filter = talloc_asprintf_append(filter, "(uid=%s)", escape_memberuid);
+ filter = talloc_asprintf_append_buffer(filter, "(uid=%s)", escape_memberuid);
if (filter == NULL) {
SAFE_FREE(escape_memberuid);
ret = NT_STATUS_NO_MEMORY;
@@ -2447,7 +2447,7 @@ static NTSTATUS ldapsam_enum_group_members(struct pdb_methods *methods,
SAFE_FREE(escape_memberuid);
}
- filter = talloc_asprintf_append(filter, "))");
+ filter = talloc_asprintf_append_buffer(filter, "))");
if (filter == NULL) {
ret = NT_STATUS_NO_MEMORY;
goto done;
@@ -3726,7 +3726,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
for (i=0; i<num_rids; i++) {
DOM_SID sid;
sid_compose(&sid, domain_sid, rids[i]);
- allsids = talloc_asprintf_append(allsids, "(sambaSid=%s)",
+ allsids = talloc_asprintf_append_buffer(allsids, "(sambaSid=%s)",
sid_string_static(&sid));
if (allsids == NULL) {
goto done;
@@ -5470,6 +5470,317 @@ static NTSTATUS ldapsam_set_primary_group(struct pdb_methods *my_methods,
return NT_STATUS_OK;
}
+
+/**********************************************************************
+ trusted domains functions
+ *********************************************************************/
+
+static char *trusteddom_dn(struct ldapsam_privates *ldap_state,
+ const char *domain)
+{
+ return talloc_asprintf(talloc_tos(), "sambaDomainName=%s,%s", domain,
+ ldap_state->domain_dn);
+}
+
+static BOOL get_trusteddom_pw_int(struct ldapsam_privates *ldap_state,
+ const char *domain, LDAPMessage **entry)
+{
+ int rc;
+ char *filter;
+ int scope = LDAP_SCOPE_SUBTREE;
+ const char **attrs = NULL; /* NULL: get all attrs */
+ int attrsonly = 0; /* 0: return values too */
+ LDAPMessage *result = NULL;
+ char *trusted_dn;
+ uint32 num_result;
+
+ filter = talloc_asprintf(talloc_tos(),
+ "(&(objectClass=%s)(sambaDomainName=%s))",
+ LDAP_OBJ_TRUSTDOM_PASSWORD, domain);
+
+ trusted_dn = trusteddom_dn(ldap_state, domain);
+ if (trusted_dn == NULL) {
+ return False;
+ }
+ rc = smbldap_search(ldap_state->smbldap_state, trusted_dn, scope,
+ filter, attrs, attrsonly, &result);
+
+ if (rc == LDAP_NO_SUCH_OBJECT) {
+ *entry = NULL;
+ return True;
+ }
+
+ if (rc != LDAP_SUCCESS) {
+ return False;
+ }
+
+ num_result = ldap_count_entries(priv2ld(ldap_state), result);
+
+ if (num_result > 1) {
+ DEBUG(1, ("ldapsam_get_trusteddom_pw: more than one "
+ "sambaTrustedDomainPassword object for domain '%s'"
+ "?!\n", domain));
+ return False;
+ }
+
+ if (num_result == 0) {
+ DEBUG(1, ("ldapsam_get_trusteddom_pw: no "
+ "sambaTrustedDomainPassword object for domain %s.\n",
+ domain));
+ *entry = NULL;
+ } else {
+ *entry = ldap_first_entry(priv2ld(ldap_state), result);
+ }
+
+ return True;
+}
+
+static BOOL ldapsam_get_trusteddom_pw(struct pdb_methods *methods,
+ const char *domain,
+ char** pwd,
+ DOM_SID *sid,
+ time_t *pass_last_set_time)
+{
+ struct ldapsam_privates *ldap_state =
+ (struct ldapsam_privates *)methods->private_data;
+ LDAPMessage *entry = NULL;
+
+ DEBUG(10, ("ldapsam_get_trusteddom_pw called for domain %s\n", domain));
+
+ if (!get_trusteddom_pw_int(ldap_state, domain, &entry) ||
+ (entry == NULL))
+ {
+ return False;
+ }
+
+ /* password */
+ if (pwd != NULL) {
+ char *pwd_str;
+ pwd_str = smbldap_talloc_single_attribute(priv2ld(ldap_state),
+ entry, "sambaClearTextPassword", talloc_tos());
+ if (pwd_str == NULL) {
+ return False;
+ }
+ /* trusteddom_pw routines do not use talloc yet... */
+ *pwd = SMB_STRDUP(pwd_str);
+ if (*pwd == NULL) {
+ return False;
+ }
+ }
+
+ /* last change time */
+ if (pass_last_set_time != NULL) {
+ char *time_str;
+ time_str = smbldap_talloc_single_attribute(priv2ld(ldap_state),
+ entry, "sambaPwdLastSet", talloc_tos());
+ if (time_str == NULL) {
+ return False;
+ }
+ *pass_last_set_time = (time_t)atol(time_str);
+ }
+
+ /* domain sid */
+ if (sid != NULL) {
+ char *sid_str;
+ DOM_SID *dom_sid;
+ sid_str = smbldap_talloc_single_attribute(priv2ld(ldap_state),
+ entry, "sambaSID",
+ talloc_tos());
+ if (sid_str == NULL) {
+ return False;
+ }
+ dom_sid = string_sid_talloc(talloc_tos(), sid_str);
+ if (dom_sid == NULL) {
+ return False;
+ }
+ sid_copy(sid, dom_sid);
+ }
+
+ return True;
+}
+
+static BOOL ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
+ const char* domain,
+ const char* pwd,
+ const DOM_SID *sid)
+{
+ struct ldapsam_privates *ldap_state =
+ (struct ldapsam_privates *)methods->private_data;
+ LDAPMessage *entry = NULL;
+ LDAPMod **mods = NULL;
+ char *prev_pwd = NULL;
+ char *trusted_dn = NULL;
+ int rc;
+
+ DEBUG(10, ("ldapsam_set_trusteddom_pw called for domain %s\n", domain));
+
+ /*
+ * get the current entry (if there is one) in order to put the
+ * current password into the previous password attribute
+ */
+ if (!get_trusteddom_pw_int(ldap_state, domain, &entry)) {
+ return False;
+ }
+
+ mods = NULL;
+ smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "objectClass",
+ "sambaTrustedDomainPassword");
+ smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "sambaDomainName",
+ domain);
+ smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "sambaSID",
+ sid_string_tos(sid));
+ smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "sambaPwdLastSet",
+ talloc_asprintf(talloc_tos(), "%li", time(NULL)));
+ smbldap_make_mod(priv2ld(ldap_state), entry, &mods,
+ "sambaClearTextPassword", pwd);
+ if (entry != NULL) {
+ prev_pwd = smbldap_talloc_single_attribute(priv2ld(ldap_state),
+ entry, "sambaClearTextPassword", talloc_tos());
+ if (prev_pwd != NULL) {
+ smbldap_make_mod(priv2ld(ldap_state), entry, &mods,
+ "sambaPreviousClearTextPassword",
+ prev_pwd);
+ }
+ }
+
+ trusted_dn = trusteddom_dn(ldap_state, domain);
+ if (trusted_dn == NULL) {
+ return False;
+ }
+ if (entry == NULL) {
+ rc = smbldap_add(ldap_state->smbldap_state, trusted_dn, mods);
+ } else {
+ rc = smbldap_modify(ldap_state->smbldap_state, trusted_dn, mods);
+ }
+
+ if (rc != LDAP_SUCCESS) {
+ DEBUG(1, ("error writing trusted domain password!\n"));
+ return False;
+ }
+
+ return True;
+}
+
+static BOOL ldapsam_del_trusteddom_pw(struct pdb_methods *methods,
+ const char *domain)
+{
+ int rc;
+ struct ldapsam_privates *ldap_state =
+ (struct ldapsam_privates *)methods->private_data;
+ LDAPMessage *entry = NULL;
+ const char *trusted_dn;
+
+ if (!get_trusteddom_pw_int(ldap_state, domain, &entry)) {
+ return False;
+ }
+
+ if (entry == NULL) {
+ DEBUG(5, ("ldapsam_del_trusteddom_pw: no such trusted domain: "
+ "%s\n", domain));
+ return True;
+ }
+
+ trusted_dn = smbldap_talloc_dn(talloc_tos(), priv2ld(ldap_state),
+ entry);
+ if (trusted_dn == NULL) {
+ DEBUG(0,("ldapsam_del_trusteddom_pw: Out of memory!\n"));
+ return False;
+ }
+
+ rc = smbldap_delete(ldap_state->smbldap_state, trusted_dn);
+ if (rc != LDAP_SUCCESS) {
+ return False;
+ }
+
+ return True;
+}
+
+static NTSTATUS ldapsam_enum_trusteddoms(struct pdb_methods *methods,
+ TALLOC_CTX *mem_ctx,
+ uint32 *num_domains,
+ struct trustdom_info ***domains)
+{
+ int rc;
+ struct ldapsam_privates *ldap_state =
+ (struct ldapsam_privates *)methods->private_data;
+ char *filter;
+ int scope = LDAP_SCOPE_SUBTREE;
+ const char *attrs[] = { "sambaDomainName", "sambaSID", NULL };
+ int attrsonly = 0; /* 0: return values too */
+ LDAPMessage *result = NULL;
+ LDAPMessage *entry = NULL;
+
+ filter = talloc_asprintf(talloc_tos(), "(objectClass=%s)",
+ LDAP_OBJ_TRUSTDOM_PASSWORD);
+
+ rc = smbldap_search(ldap_state->smbldap_state,
+ ldap_state->domain_dn,
+ scope,
+ filter,
+ attrs,
+ attrsonly,
+ &result);
+
+ if (rc != LDAP_SUCCESS) {
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ *num_domains = 0;
+ if (!(*domains = TALLOC_ARRAY(mem_ctx, struct trustdom_info *, 1))) {
+ DEBUG(1, ("talloc failed\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ for (entry = ldap_first_entry(priv2ld(ldap_state), result);
+ entry != NULL;
+ entry = ldap_next_entry(priv2ld(ldap_state), entry))
+ {
+ char *dom_name, *dom_sid_str;
+ struct trustdom_info *dom_info;
+
+ dom_info = TALLOC_P(*domains, struct trustdom_info);
+ if (dom_info == NULL) {
+ DEBUG(1, ("talloc failed\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ dom_name = smbldap_talloc_single_attribute(priv2ld(ldap_state),
+ entry,
+ "sambaDomainName",
+ talloc_tos());
+ if (dom_name == NULL) {
+ DEBUG(1, ("talloc failed\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
+ dom_info->name = dom_name;
+
+ dom_sid_str = smbldap_talloc_single_attribute(
+ priv2ld(ldap_state), entry, "sambaSID",
+ talloc_tos());
+ if (dom_sid_str == NULL) {
+ DEBUG(1, ("talloc failed\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
+ if (!string_to_sid(&dom_info->sid, dom_sid_str)) {
+ DEBUG(1, ("Error calling string_to_sid on SID %s\n",
+ dom_sid_str));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ ADD_TO_ARRAY(*domains, struct trustdom_info *, dom_info,
+ domains, num_domains);
+
+ if (*domains == NULL) {
+ DEBUG(1, ("talloc failed\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
+ }
+
+ DEBUG(5, ("ldapsam_enum_trusteddoms: got %d domains\n", *num_domains));
+ return NT_STATUS_OK;
+}
+
+
/**********************************************************************
Housekeeping
*********************************************************************/
@@ -5535,6 +5846,11 @@ static NTSTATUS pdb_init_ldapsam_common(struct pdb_methods **pdb_method, const c
(*pdb_method)->rid_algorithm = ldapsam_rid_algorithm;
(*pdb_method)->new_rid = ldapsam_new_rid;
+ (*pdb_method)->get_trusteddom_pw = ldapsam_get_trusteddom_pw;
+ (*pdb_method)->set_trusteddom_pw = ldapsam_set_trusteddom_pw;
+ (*pdb_method)->del_trusteddom_pw = ldapsam_del_trusteddom_pw;
+ (*pdb_method)->enum_trusteddoms = ldapsam_enum_trusteddoms;
+
/* TODO: Setup private data and free */
if ( !(ldap_state = TALLOC_ZERO_P(*pdb_method, struct ldapsam_privates)) ) {
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c
index 944b695a9dd..cbd220d2602 100644
--- a/source/printing/nt_printing.c
+++ b/source/printing/nt_printing.c
@@ -659,13 +659,18 @@ BOOL nt_printing_init(struct messaging_context *msg_ctx)
Function to allow filename parsing "the old way".
********************************************************************/
-static void driver_unix_convert(char *name,connection_struct *conn,
- char *saved_last_component, SMB_STRUCT_STAT *pst)
+static void driver_unix_convert(connection_struct *conn,
+ pstring name,
+ SMB_STRUCT_STAT *pst)
{
+ char *new_name = NULL;
unix_format(name);
unix_clean_name(name);
trim_string(name,"/","/");
- unix_convert(conn, name, False, saved_last_component, pst);
+ unix_convert(talloc_tos(),conn, name, False, &new_name, NULL, pst);
+ if (new_name) {
+ pstrcpy(name, new_name);
+ }
}
/*******************************************************************
@@ -755,7 +760,7 @@ BOOL get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form)
{
int i,count;
fstring form_name;
- unistr2_to_ascii(form_name, uni_formname, sizeof(form_name)-1);
+ 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++) {
@@ -858,7 +863,7 @@ 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)-1);
+ unistr2_to_ascii(form_name, &form->name, sizeof(form_name));
for (n=0; n<*count; n++) {
if ( strequal((*list)[n].name, form_name) ) {
update=True;
@@ -871,7 +876,7 @@ 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)-1);
+ unistr2_to_ascii((*list)[n].name, &form->name, sizeof((*list)[n].name));
(*count)++;
}
@@ -901,7 +906,7 @@ BOOL delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR
*ret = WERR_OK;
- unistr2_to_ascii(form_name, del_name, sizeof(form_name)-1);
+ 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))) {
@@ -933,7 +938,7 @@ void update_a_form(nt_forms_struct **list, const FORM *form, int count)
{
int n=0;
fstring form_name;
- unistr2_to_ascii(form_name, &(form->name), sizeof(form_name)-1);
+ unistr2_to_ascii(form_name, &(form->name), sizeof(form_name));
DEBUG(106, ("[%s]\n", form_name));
for (n=0; n<count; n++) {
@@ -1288,7 +1293,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
/* Get file version info (if available) for previous file (if it exists) */
pstrcpy(filepath, old_file);
- driver_unix_convert(filepath,conn,NULL,&stat_buf);
+ driver_unix_convert(conn,filepath,&stat_buf);
status = open_file_ntcreate(conn, NULL, filepath, &stat_buf,
FILE_GENERIC_READ,
@@ -1324,7 +1329,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
/* Get file version info (if available) for new file */
pstrcpy(filepath, new_file);
- driver_unix_convert(filepath,conn,NULL,&stat_buf);
+ driver_unix_convert(conn,filepath,&stat_buf);
status = open_file_ntcreate(conn, NULL, filepath, &stat_buf,
FILE_GENERIC_READ,
@@ -1452,7 +1457,7 @@ static uint32 get_correct_cversion(const char *architecture, fstring driverpath_
* deriver the cversion. */
slprintf(driverpath, sizeof(driverpath)-1, "%s/%s", architecture, driverpath_in);
- driver_unix_convert(driverpath,conn,NULL,&st);
+ driver_unix_convert(conn,driverpath,&st);
if ( !vfs_file_exist( conn, driverpath, &st ) ) {
*perr = WERR_BADFILE;
@@ -1741,6 +1746,7 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
SMB_STRUCT_STAT st;
int ver = 0;
int i;
+ TALLOC_CTX *ctx = talloc_tos();
memset(inbuf, '\0', sizeof(inbuf));
memset(outbuf, '\0', sizeof(outbuf));
@@ -1793,7 +1799,7 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
*/
DEBUG(5,("Creating first directory\n"));
slprintf(new_dir, sizeof(new_dir)-1, "%s/%d", architecture, driver->cversion);
- driver_unix_convert(new_dir, conn, NULL, &st);
+ driver_unix_convert(conn,new_dir,&st);
create_directory(conn, new_dir);
/* For each driver file, archi\filexxx.yyy, if there is a duplicate file
@@ -1819,8 +1825,8 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->driverpath);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->driverpath);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- driver_unix_convert(new_name, conn, NULL, &st);
- if ( !NT_STATUS_IS_OK(copy_file(conn, new_name, old_name, OPENX_FILE_EXISTS_TRUNCATE|
+ driver_unix_convert(conn,new_name,&st);
+ if ( !NT_STATUS_IS_OK(copy_file(ctx,conn, new_name, old_name, OPENX_FILE_EXISTS_TRUNCATE|
OPENX_FILE_CREATE_IF_NOT_EXIST, 0, False))) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
@@ -1835,8 +1841,8 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->datafile);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->datafile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- driver_unix_convert(new_name, conn, NULL, &st);
- if ( !NT_STATUS_IS_OK(copy_file(conn, new_name, old_name, OPENX_FILE_EXISTS_TRUNCATE|
+ driver_unix_convert(conn,new_name,&st);
+ if ( !NT_STATUS_IS_OK(copy_file(ctx,conn, new_name, old_name, OPENX_FILE_EXISTS_TRUNCATE|
OPENX_FILE_CREATE_IF_NOT_EXIST, 0, False))) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
@@ -1853,8 +1859,8 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->configfile);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->configfile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- driver_unix_convert(new_name, conn, NULL, &st);
- if ( !NT_STATUS_IS_OK(copy_file(conn, new_name, old_name, OPENX_FILE_EXISTS_TRUNCATE|
+ driver_unix_convert(conn,new_name,&st);
+ if ( !NT_STATUS_IS_OK(copy_file(ctx,conn, new_name, old_name, OPENX_FILE_EXISTS_TRUNCATE|
OPENX_FILE_CREATE_IF_NOT_EXIST, 0, False))) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
@@ -1872,8 +1878,8 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->helpfile);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->helpfile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- driver_unix_convert(new_name, conn, NULL, &st);
- if ( !NT_STATUS_IS_OK(copy_file(conn, new_name, old_name, OPENX_FILE_EXISTS_TRUNCATE|
+ driver_unix_convert(conn,new_name,&st);
+ if ( !NT_STATUS_IS_OK(copy_file(ctx,conn, new_name, old_name, OPENX_FILE_EXISTS_TRUNCATE|
OPENX_FILE_CREATE_IF_NOT_EXIST, 0, False))) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
@@ -1900,8 +1906,8 @@ WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
slprintf(new_name, sizeof(new_name)-1, "%s/%s", architecture, driver->dependentfiles[i]);
slprintf(old_name, sizeof(old_name)-1, "%s/%s", new_dir, driver->dependentfiles[i]);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- driver_unix_convert(new_name, conn, NULL, &st);
- if ( !NT_STATUS_IS_OK(copy_file(conn, new_name, old_name,
+ driver_unix_convert(conn,new_name,&st);
+ if ( !NT_STATUS_IS_OK(copy_file(ctx,conn, new_name, old_name,
OPENX_FILE_EXISTS_TRUNCATE|
OPENX_FILE_CREATE_IF_NOT_EXIST, 0, False))) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
@@ -4938,7 +4944,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
if ( *info_3->driverpath ) {
if ( (s = strchr( &info_3->driverpath[1], '\\' )) != NULL ) {
pstrcpy( file, s );
- driver_unix_convert(file, conn, NULL, &st);
+ driver_unix_convert(conn,file,&st);
DEBUG(10,("deleting driverfile [%s]\n", s));
unlink_internals(conn, NULL, 0, file, False);
}
@@ -4947,7 +4953,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
if ( *info_3->configfile ) {
if ( (s = strchr( &info_3->configfile[1], '\\' )) != NULL ) {
pstrcpy( file, s );
- driver_unix_convert(file, conn, NULL, &st);
+ driver_unix_convert(conn,file,&st);
DEBUG(10,("deleting configfile [%s]\n", s));
unlink_internals(conn, NULL, 0, file, False);
}
@@ -4956,7 +4962,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
if ( *info_3->datafile ) {
if ( (s = strchr( &info_3->datafile[1], '\\' )) != NULL ) {
pstrcpy( file, s );
- driver_unix_convert(file, conn, NULL, &st);
+ driver_unix_convert(conn,file,&st);
DEBUG(10,("deleting datafile [%s]\n", s));
unlink_internals(conn, NULL, 0, file, False);
}
@@ -4965,7 +4971,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
if ( *info_3->helpfile ) {
if ( (s = strchr( &info_3->helpfile[1], '\\' )) != NULL ) {
pstrcpy( file, s );
- driver_unix_convert(file, conn, NULL, &st);
+ driver_unix_convert(conn,file,&st);
DEBUG(10,("deleting helpfile [%s]\n", s));
unlink_internals(conn, NULL, 0, file, False);
}
@@ -4981,7 +4987,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
if ( (p = strchr( info_3->dependentfiles[i]+1, '\\' )) != NULL ) {
pstrcpy( file, p );
- driver_unix_convert(file, conn, NULL, &st);
+ driver_unix_convert(conn,file,&st);
DEBUG(10,("deleting dependent file [%s]\n", file));
unlink_internals(conn, NULL, 0, file, False);
}
diff --git a/source/registry/reg_api.c b/source/registry/reg_api.c
index 1d863ec93ef..93ac8a9c2aa 100644
--- a/source/registry/reg_api.c
+++ b/source/registry/reg_api.c
@@ -701,15 +701,15 @@ WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path,
return WERR_OK;
}
-
/*
* Utility function to delete a registry key with all its subkeys.
* Note that reg_deletekey returns ACCESS_DENIED when called on a
* key that has subkeys.
*/
-WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
- struct registry_key *parent,
- const char *path)
+WERROR reg_deletekey_recursive_internal(TALLOC_CTX *ctx,
+ struct registry_key *parent,
+ const char *path,
+ BOOL del_key)
{
TALLOC_CTX *mem_ctx = NULL;
WERROR werr = WERR_OK;
@@ -731,21 +731,42 @@ WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
while (W_ERROR_IS_OK(werr = reg_enumkey(mem_ctx, key, 0,
&subkey_name, NULL)))
{
- werr = reg_deletekey_recursive(mem_ctx, key, subkey_name);
+ werr = reg_deletekey_recursive_internal(mem_ctx, key,
+ subkey_name,
+ True);
if (!W_ERROR_IS_OK(werr)) {
goto done;
}
}
if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) {
- DEBUG(1, ("reg_deletekey_recursive: Error enumerating "
- "subkeys: %s\n", dos_errstr(werr)));
+ DEBUG(1, ("reg_deletekey_recursive_internal: "
+ "Error enumerating subkeys: %s\n",
+ dos_errstr(werr)));
goto done;
}
- /* now delete the actual key */
- werr = reg_deletekey(parent, path);
-
+ werr = WERR_OK;
+
+ if (del_key) {
+ /* now delete the actual key */
+ werr = reg_deletekey(parent, path);
+ }
+
done:
TALLOC_FREE(mem_ctx);
return werr;
}
+
+WERROR reg_deletekey_recursive(TALLOC_CTX *ctx,
+ struct registry_key *parent,
+ const char *path)
+{
+ return reg_deletekey_recursive_internal(ctx, parent, path, True);
+}
+
+WERROR reg_deletesubkeys_recursive(TALLOC_CTX *ctx,
+ struct registry_key *parent,
+ const char *path)
+{
+ return reg_deletekey_recursive_internal(ctx, parent, path, False);
+}
diff --git a/source/registry/reg_frontend_hilvl.c b/source/registry/reg_frontend_hilvl.c
index 4ae1801a615..bc2f66f25a7 100644
--- a/source/registry/reg_frontend_hilvl.c
+++ b/source/registry/reg_frontend_hilvl.c
@@ -34,7 +34,7 @@ static struct generic_mapping reg_generic_map =
static SEC_DESC* construct_registry_sd( TALLOC_CTX *ctx )
{
- SEC_ACE ace[2];
+ SEC_ACE ace[3];
SEC_ACCESS mask;
size_t i = 0;
SEC_DESC *sd;
@@ -50,7 +50,12 @@ static SEC_DESC* construct_registry_sd( TALLOC_CTX *ctx )
init_sec_access(&mask, REG_KEY_ALL );
init_sec_ace(&ace[i++], &global_sid_Builtin_Administrators, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0);
-
+
+ /* Full Access 'NT Authority\System' */
+
+ init_sec_access(&mask, REG_KEY_ALL );
+ init_sec_ace(&ace[i++], &global_sid_System, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0);
+
/* create the security descriptor */
diff --git a/source/registry/reg_objects.c b/source/registry/reg_objects.c
index 499b7c350fe..5b294abb904 100644
--- a/source/registry/reg_objects.c
+++ b/source/registry/reg_objects.c
@@ -1,4 +1,4 @@
-/*
+/*
* Unix SMB/CIFS implementation.
* Virtual Windows Registry Layer
* Copyright (C) Gerald Carter 2002-2005
@@ -7,12 +7,12 @@
* 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/>.
*/
@@ -27,11 +27,11 @@
/**********************************************************************
Note that the REGSUB_CTR and REGVAL_CTR objects *must* be talloc()'d
- since the methods use the object pointer as the talloc context for
+ since the methods use the object pointer as the talloc context for
internal private data.
There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy()
- pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the
+ pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the
object.
**********************************************************************/
@@ -72,7 +72,7 @@ WERROR regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, const char *keyname )
return WERR_OK;
}
-
+
/***********************************************************************
Delete a key from the array
**********************************************************************/
@@ -90,15 +90,16 @@ int regsubkey_ctr_delkey( REGSUBKEY_CTR *ctr, const char *keyname )
if ( strequal( ctr->subkeys[i], keyname ) )
break;
}
-
+
if ( i == ctr->num_subkeys )
return ctr->num_subkeys;
/* update if we have any keys left */
ctr->num_subkeys--;
if ( i < ctr->num_subkeys )
- memmove( &ctr->subkeys[i], &ctr->subkeys[i+1], sizeof(char*) * (ctr->num_subkeys-i) );
-
+ memmove(&ctr->subkeys[i], &ctr->subkeys[i+1],
+ sizeof(char*) * (ctr->num_subkeys-i));
+
return ctr->num_subkeys;
}
@@ -109,7 +110,7 @@ int regsubkey_ctr_delkey( REGSUBKEY_CTR *ctr, const char *keyname )
BOOL regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname )
{
int i;
-
+
if (!ctr->subkeys) {
return False;
}
@@ -118,7 +119,7 @@ BOOL regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname )
if ( strequal( ctr->subkeys[i],keyname ) )
return True;
}
-
+
return False;
}
@@ -139,7 +140,7 @@ char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index )
{
if ( ! (key_index < ctr->num_subkeys) )
return NULL;
-
+
return ctr->subkeys[key_index];
}
@@ -164,49 +165,49 @@ int regval_ctr_numvals( REGVAL_CTR *ctr )
REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val )
{
REGISTRY_VALUE *copy = NULL;
-
+
if ( !val )
return NULL;
-
+
if ( !(copy = SMB_MALLOC_P( REGISTRY_VALUE)) ) {
DEBUG(0,("dup_registry_value: malloc() failed!\n"));
return NULL;
}
-
+
/* copy all the non-pointer initial data */
-
+
memcpy( copy, val, sizeof(REGISTRY_VALUE) );
-
+
copy->size = 0;
copy->data_p = NULL;
-
- if ( val->data_p && val->size )
+
+ if ( val->data_p && val->size )
{
if ( !(copy->data_p = (uint8 *)memdup( val->data_p,
val->size )) ) {
- DEBUG(0,("dup_registry_value: memdup() failed for [%d] bytes!\n",
- val->size));
+ DEBUG(0,("dup_registry_value: memdup() failed for [%d] "
+ "bytes!\n", val->size));
SAFE_FREE( copy );
return NULL;
}
copy->size = val->size;
}
-
- return copy;
+
+ return copy;
}
/**********************************************************************
- free the memory allocated to a REGISTRY_VALUE
+ free the memory allocated to a REGISTRY_VALUE
*********************************************************************/
-
+
void free_registry_value( REGISTRY_VALUE *val )
{
if ( !val )
return;
-
+
SAFE_FREE( val->data_p );
SAFE_FREE( val );
-
+
return;
}
@@ -251,7 +252,7 @@ REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx )
{
if ( !(idx < ctr->num_values) )
return NULL;
-
+
return ctr->values[idx];
}
@@ -262,12 +263,12 @@ REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx )
BOOL regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value )
{
int i;
-
+
for ( i=0; i<ctr->num_values; i++ ) {
if ( strequal( ctr->values[i]->valuename, value) )
return True;
}
-
+
return False;
}
@@ -304,7 +305,7 @@ REGISTRY_VALUE *regval_compose(TALLOC_CTX *ctx, const char *name, uint16 type,
Add a new registry value to the array
**********************************************************************/
-int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
+int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
const char *data_p, size_t size )
{
if ( !name )
@@ -315,11 +316,13 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
regval_ctr_delvalue( ctr, name );
/* allocate a slot in the array of pointers */
-
+
if ( ctr->num_values == 0 ) {
ctr->values = TALLOC_P( ctr, REGISTRY_VALUE *);
} else {
- ctr->values = TALLOC_REALLOC_ARRAY( ctr, ctr->values, REGISTRY_VALUE *, ctr->num_values+1 );
+ ctr->values = TALLOC_REALLOC_ARRAY(ctr, ctr->values,
+ REGISTRY_VALUE *,
+ ctr->num_values+1);
}
if (!ctr->values) {
@@ -328,7 +331,7 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
}
/* allocate a new value and store the pointer in the arrya */
-
+
ctr->values[ctr->num_values] = regval_compose(ctr, name, type, data_p,
size);
if (ctr->values[ctr->num_values] == NULL) {
@@ -347,43 +350,8 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type,
int regval_ctr_copyvalue( REGVAL_CTR *ctr, REGISTRY_VALUE *val )
{
if ( val ) {
- /* allocate a slot in the array of pointers */
-
- if ( ctr->num_values == 0 ) {
- ctr->values = TALLOC_P( ctr, REGISTRY_VALUE *);
- } else {
- ctr->values = TALLOC_REALLOC_ARRAY( ctr, ctr->values, REGISTRY_VALUE *, ctr->num_values+1 );
- }
-
- if (!ctr->values) {
- ctr->num_values = 0;
- return 0;
- }
-
- /* allocate a new value and store the pointer in the arrya */
-
- ctr->values[ctr->num_values] = TALLOC_P( ctr, REGISTRY_VALUE);
- if (!ctr->values[ctr->num_values]) {
- ctr->num_values = 0;
- return 0;
- }
-
- /* init the value */
-
- fstrcpy( ctr->values[ctr->num_values]->valuename, val->valuename );
- ctr->values[ctr->num_values]->type = val->type;
- if (val->size) {
- ctr->values[ctr->num_values]->data_p = (uint8 *)TALLOC_MEMDUP(
- ctr, val->data_p, val->size );
- if (!ctr->values[ctr->num_values]->data_p) {
- ctr->num_values = 0;
- return 0;
- }
- } else {
- ctr->values[ctr->num_values]->data_p = NULL;
- }
- ctr->values[ctr->num_values]->size = val->size;
- ctr->num_values++;
+ regval_ctr_addvalue(ctr, val->valuename, val->type,
+ (char *)val->data_p, val->size);
}
return ctr->num_values;
@@ -397,22 +365,23 @@ int regval_ctr_copyvalue( REGVAL_CTR *ctr, REGISTRY_VALUE *val )
int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name )
{
int i;
-
+
for ( i=0; i<ctr->num_values; i++ ) {
if ( strequal( ctr->values[i]->valuename, name ) )
break;
}
-
+
/* just return if we don't find it */
-
+
if ( i == ctr->num_values )
return ctr->num_values;
-
+
/* If 'i' was not the last element, just shift everything down one */
ctr->num_values--;
if ( i < ctr->num_values )
- memmove( &ctr->values[i], &ctr->values[i+1], sizeof(REGISTRY_VALUE*)*(ctr->num_values-i) );
-
+ memmove(&ctr->values[i], &ctr->values[i+1],
+ sizeof(REGISTRY_VALUE*)*(ctr->num_values-i));
+
return ctr->num_values;
}
@@ -424,14 +393,14 @@ int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name )
REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name )
{
int i;
-
+
/* search for the value */
-
+
for ( i=0; i<ctr->num_values; i++ ) {
if ( strequal( ctr->values[i]->valuename, name ) )
return ctr->values[i];
}
-
+
return NULL;
}
@@ -442,9 +411,9 @@ REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name )
uint32 regval_dword( REGISTRY_VALUE *val )
{
uint32 data;
-
+
data = IVAL( regval_data_p(val), 0 );
-
+
return data;
}
@@ -456,7 +425,7 @@ char* regval_sz( REGISTRY_VALUE *val )
{
pstring data;
- rpcstr_pull( data, regval_data_p(val), sizeof(data), regval_size(val), 0 );
-
+ rpcstr_pull(data, regval_data_p(val), sizeof(data), regval_size(val),0);
+
return talloc_strdup(talloc_tos(), data);
}
diff --git a/source/registry/reg_smbconf.c b/source/registry/reg_smbconf.c
index 91afa09ed1f..09d11dd969b 100644
--- a/source/registry/reg_smbconf.c
+++ b/source/registry/reg_smbconf.c
@@ -40,6 +40,126 @@ static int smbconf_fetch_values( const char *key, REGVAL_CTR *val )
return regdb_ops.fetch_values(key, val);
}
+static WERROR regval_hilvl_to_lolvl(TALLOC_CTX *mem_ctx, const char *valname,
+ struct registry_value *src,
+ REGISTRY_VALUE **dst)
+{
+ WERROR err;
+ DATA_BLOB value_data;
+ REGISTRY_VALUE *newval = NULL;
+
+ if (dst == NULL) {
+ return WERR_INVALID_PARAM;
+ }
+
+ err = registry_push_value(mem_ctx, src, &value_data);
+ if (!W_ERROR_IS_OK(err)) {
+ DEBUG(10, ("error calling registry_push_value.\n"));
+ return err;
+ }
+
+ newval = regval_compose(mem_ctx, valname, src->type,
+ (char *)value_data.data, value_data.length);
+ if (newval == NULL) {
+ DEBUG(10, ("error composing registry value. (no memory?)\n"));
+ return WERR_NOMEM;
+ }
+
+ *dst = newval;
+ return WERR_OK;
+}
+
+static WERROR regval_lolvl_to_hilvl(TALLOC_CTX *mem_ctx, REGISTRY_VALUE *src,
+ struct registry_value **dst)
+{
+ if (dst == NULL) {
+ return WERR_INVALID_PARAM;
+ }
+
+ return registry_pull_value(mem_ctx, dst, regval_type(src),
+ regval_data_p(src), regval_size(src),
+ regval_size(src));
+}
+
+/*
+ * Utility function used by smbconf_store_values to canonicalize
+ * a registry value.
+ * registry_pull_value / registry_push_value are used for (un)marshalling.
+ */
+static REGISTRY_VALUE *smbconf_canonicalize_regval(TALLOC_CTX *mem_ctx,
+ REGISTRY_VALUE *theval)
+{
+ char *valstr;
+ size_t len;
+ const char *canon_valname;
+ const char *canon_valstr;
+ BOOL inverse;
+ struct registry_value *value;
+ WERROR err;
+ TALLOC_CTX *tmp_ctx;
+ REGISTRY_VALUE *newval = NULL;
+
+ if (!lp_parameter_is_valid(regval_name(theval)) ||
+ lp_parameter_is_canonical(regval_name(theval)))
+ {
+ return theval;
+ }
+
+ tmp_ctx = talloc_stackframe();
+ if (tmp_ctx == NULL) {
+ DEBUG(1, ("out of memory...\n"));
+ goto done;
+ }
+
+ err = regval_lolvl_to_hilvl(tmp_ctx, theval, &value);
+ if (!W_ERROR_IS_OK(err)) {
+ goto done;
+ }
+
+ /* we need the value-string zero-terminated */
+ valstr = value->v.sz.str;
+ len = value->v.sz.len;
+ if (valstr[len - 1] != '\0') {
+ DEBUG(10, ("string is not '\\0'-terminated. adding '\\0'.\n"));
+ valstr = TALLOC_REALLOC_ARRAY(tmp_ctx, valstr, char, len + 1);
+ if (valstr == NULL) {
+ DEBUG(1, ("out of memory\n"));
+ goto done;
+ }
+ valstr[len] = '\0';
+ }
+
+ if (!lp_canonicalize_parameter(regval_name(theval), &canon_valname,
+ &inverse))
+ {
+ DEBUG(5, ("Error: lp_canonicalize_parameter failed after "
+ "lp_parameter_is_valid. This should not happen!\n"));
+ goto done;
+ }
+ DEBUG(10, ("old value name: '%s', canonical value name: '%s'\n",
+ regval_name(theval), canon_valname));
+ if (inverse && lp_string_is_valid_boolean(valstr)) {
+ lp_invert_boolean(valstr, &canon_valstr);
+ } else {
+ canon_valstr = valstr;
+ }
+
+ ZERO_STRUCTP(value);
+ value->type = REG_SZ;
+ value->v.sz.str = CONST_DISCARD(char *, canon_valstr);
+ value->v.sz.len = strlen(canon_valstr) + 1;
+
+ err = regval_hilvl_to_lolvl(mem_ctx, canon_valname, value, &newval);
+ if (!W_ERROR_IS_OK(err)) {
+ DEBUG(10, ("error calling regval_hilvl_to_lolvl.\n"));
+ goto done;
+ }
+
+done:
+ TALLOC_FREE(tmp_ctx);
+ return newval;
+}
+
static BOOL smbconf_store_values( const char *key, REGVAL_CTR *val )
{
int i;
@@ -79,7 +199,7 @@ static BOOL smbconf_store_values( const char *key, REGVAL_CTR *val )
return False;
}
- if (registry_smbconf_valname_forbidden(regval_name(theval))) {
+ if (registry_smbconf_valname_forbidden(valname)) {
DEBUG(1, ("smbconf_store_values: value '%s' forbidden "
"in registry.\n", valname));
return False;
@@ -88,98 +208,15 @@ static BOOL smbconf_store_values( const char *key, REGVAL_CTR *val )
if (lp_parameter_is_valid(valname) &&
!lp_parameter_is_canonical(valname))
{
- char *valstr;
- size_t len;
- const char *canon_valname;
- const char *canon_valstr;
- BOOL inverse;
- struct registry_value *value;
- WERROR err;
- DATA_BLOB value_data;
- TALLOC_CTX *mem_ctx;
-
DEBUG(5, ("valid parameter '%s' given but it is a "
"synonym. going to canonicalize it.\n",
valname));
-
- mem_ctx = talloc_new(val);
- if (mem_ctx == NULL) {
- DEBUG(1, ("out of memory...\n"));
- return False;
- }
-
- err = registry_pull_value(mem_ctx, &value,
- theval->type,
- theval->data_p,
- theval->size,
- theval->size);
- if (!W_ERROR_IS_OK(err)) {
- TALLOC_FREE(mem_ctx);
- return False;
- }
-
- valstr = (value->v.sz.str);
- len = value->v.sz.len;
- if (valstr[len - 1] != '\0') {
- DEBUG(10, ("string is not '\\0'-terminated. "
- "adding '\\0'.\n"));
- valstr = TALLOC_REALLOC_ARRAY(mem_ctx, valstr,
- char, len + 1);
- if (valstr == NULL) {
- DEBUG(1, ("out of memory\n"));
- TALLOC_FREE(mem_ctx);
- return False;
- }
- valstr[len] = '\0';
- len++;
- }
-
- if (!lp_canonicalize_parameter(valname, &canon_valname,
- &inverse))
- {
- DEBUG(5, ("Error: lp_canonicalize_parameter "
- "failed after lp_parameter_is_valid. "
- "This should not happen!\n"));
- TALLOC_FREE(mem_ctx);
- return False;
- }
- DEBUG(10, ("old value name: '%s', canonical value "
- "name: '%s'\n", valname, canon_valname));
- if (inverse && lp_string_is_valid_boolean(valstr)) {
- lp_invert_boolean(valstr, &canon_valstr);
- } else {
- canon_valstr = valstr;
- }
-
- ZERO_STRUCTP(value);
-
- value->type = REG_SZ;
- value->v.sz.str = CONST_DISCARD(char *, canon_valstr);
- value->v.sz.len = strlen(canon_valstr) + 1;
-
- err = registry_push_value(mem_ctx, value, &value_data);
- if (!W_ERROR_IS_OK(err)) {
- DEBUG(10, ("error calling registry_push_value."
- "\n"));
- TALLOC_FREE(mem_ctx);
- return False;
- }
-
- DEBUG(10, ("adding canonicalized parameter to "
- "container.\n"));
-
- theval = regval_compose(val, canon_valname,
- value->type,
- (char *)value_data.data,
- value_data.length);
+ theval = smbconf_canonicalize_regval(val, theval);
if (theval == NULL) {
- DEBUG(10, ("error composing registry value. "
- "(no memory?)\n"));
- TALLOC_FREE(mem_ctx);
+ DEBUG(10, ("error canonicalizing registry "
+ "value\n"));
return False;
}
-
- TALLOC_FREE(mem_ctx);
} else {
DEBUG(10, ("%s parameter found, "
"copying it to new container...\n",
@@ -188,12 +225,12 @@ static BOOL smbconf_store_values( const char *key, REGVAL_CTR *val )
}
res = regval_ctr_copyvalue(new_val_ctr, theval);
if (res == 0) {
- DEBUG(10, ("error calling regval_ctr_copyvalue."
- " (no memory?)\n"));
+ DEBUG(10, ("error calling regval_ctr_copyvalue. "
+ "(no memory?)\n"));
return False;
}
- DEBUG(10, ("parameter copied. container now has %d "
- "values.\n", res));
+ DEBUG(10, ("parameter copied. container now has %d values.\n",
+ res));
}
return regdb_ops.store_values(key, new_val_ctr);
}
diff --git a/source/rpc_client/cli_lsarpc.c b/source/rpc_client/cli_lsarpc.c
index f1bab86fbd5..be85e49476a 100644
--- a/source/rpc_client/cli_lsarpc.c
+++ b/source/rpc_client/cli_lsarpc.c
@@ -1,21 +1,22 @@
-/*
+/*
Unix SMB/CIFS implementation.
RPC pipe client
Copyright (C) Tim Potter 2000-2001,
Copyright (C) Andrew Tridgell 1992-1997,2000,
Copyright (C) Rafal Szczesniak 2002
Copyright (C) Jeremy Allison 2005.
-
+ Copyright (C) Michael Adam 2007.
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -84,7 +85,7 @@ NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
/** Open a LSA policy handle
*
- * @param cli Handle on an initialised SMB connection
+ * @param cli Handle on an initialised SMB connection
*/
NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
@@ -171,8 +172,12 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli,
lsa_io_r_lookup_sids,
NT_STATUS_UNSUCCESSFUL );
+ DEBUG(10, ("LSA_LOOKUPSIDS returned '%s', mapped count = %d'\n",
+ nt_errstr(r.status), r.mapped_count));
+
if (!NT_STATUS_IS_OK(r.status) &&
- !NT_STATUS_EQUAL(r.status, STATUS_SOME_UNMAPPED))
+ !NT_STATUS_EQUAL(r.status, NT_STATUS_NONE_MAPPED) &&
+ !NT_STATUS_EQUAL(r.status, STATUS_SOME_UNMAPPED))
{
/* An actual error occured */
result = r.status;
@@ -181,7 +186,9 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli,
/* Return output parameters */
- if (r.mapped_count == 0) {
+ if (NT_STATUS_EQUAL(r.status, NT_STATUS_NONE_MAPPED) ||
+ (r.mapped_count == 0))
+ {
for (i = 0; i < num_sids; i++) {
(names)[i] = NULL;
(domains)[i] = NULL;
@@ -207,9 +214,9 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli,
(names)[i] = talloc_strdup(mem_ctx, name);
(domains)[i] = talloc_strdup(mem_ctx, dom_name);
(types)[i] = r.names.name[i].sid_name_use;
-
+
if (((names)[i] == NULL) || ((domains)[i] == NULL)) {
- DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
+ DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n"));
result = NT_STATUS_UNSUCCESSFUL;
goto done;
}
@@ -226,7 +233,7 @@ done:
return result;
}
-/* Lookup a list of sids
+/* Lookup a list of sids
*
* do it the right way: there is a limit (of 20480 for w2k3) entries
* returned by this call. when the sids list contains more entries,
@@ -238,14 +245,14 @@ done:
* at 20480 for win2k3, but we keep it at a save 1000 for now. */
#define LOOKUP_SIDS_HUNK_SIZE 1000
-NTSTATUS rpccli_lsa_lookup_sids_all(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
- int num_sids,
- const DOM_SID *sids,
- char ***domains,
- char ***names,
- uint32 **types)
+NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ POLICY_HND *pol,
+ int num_sids,
+ const DOM_SID *sids,
+ char ***domains,
+ char ***names,
+ uint32 **types)
{
NTSTATUS result = NT_STATUS_OK;
int sids_left = 0;
@@ -257,28 +264,28 @@ NTSTATUS rpccli_lsa_lookup_sids_all(struct rpc_pipe_client *cli,
if (num_sids) {
if (!((*domains) = TALLOC_ARRAY(mem_ctx, char *, num_sids))) {
- DEBUG(0, ("rpccli_lsa_lookup_sids_all(): out of memory\n"));
+ DEBUG(0, ("rpccli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_NO_MEMORY;
- goto done;
+ goto fail;
}
if (!((*names) = TALLOC_ARRAY(mem_ctx, char *, num_sids))) {
- DEBUG(0, ("rpccli_lsa_lookup_sids_all(): out of memory\n"));
+ DEBUG(0, ("rpccli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_NO_MEMORY;
- goto done;
+ goto fail;
}
if (!((*types) = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_sids))) {
- DEBUG(0, ("rpccli_lsa_lookup_sids_all(): out of memory\n"));
+ DEBUG(0, ("rpccli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_NO_MEMORY;
- goto done;
+ goto fail;
}
} else {
(*domains) = NULL;
(*names) = NULL;
(*types) = NULL;
}
-
+
sids_left = num_sids;
hunk_domains = *domains;
hunk_names = *names;
@@ -288,20 +295,20 @@ NTSTATUS rpccli_lsa_lookup_sids_all(struct rpc_pipe_client *cli,
int hunk_num_sids;
NTSTATUS hunk_result = NT_STATUS_OK;
- hunk_num_sids = ((sids_left > LOOKUP_SIDS_HUNK_SIZE)
- ? LOOKUP_SIDS_HUNK_SIZE
+ hunk_num_sids = ((sids_left > LOOKUP_SIDS_HUNK_SIZE)
+ ? LOOKUP_SIDS_HUNK_SIZE
: sids_left);
- DEBUG(10, ("rpccli_lsa_lookup_sids_all: processing items "
- "%d -- %d of %d.\n",
- sids_processed,
+ DEBUG(10, ("rpccli_lsa_lookup_sids: processing items "
+ "%d -- %d of %d.\n",
+ sids_processed,
sids_processed + hunk_num_sids - 1,
num_sids));
hunk_result = rpccli_lsa_lookup_sids_noalloc(cli,
mem_ctx,
pol,
- hunk_num_sids,
+ hunk_num_sids,
hunk_sids,
hunk_domains,
hunk_names,
@@ -309,15 +316,16 @@ NTSTATUS rpccli_lsa_lookup_sids_all(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(hunk_result) &&
!NT_STATUS_EQUAL(hunk_result, STATUS_SOME_UNMAPPED) &&
- !NT_STATUS_EQUAL(hunk_result, NT_STATUS_NONE_MAPPED))
+ !NT_STATUS_EQUAL(hunk_result, NT_STATUS_NONE_MAPPED))
{
/* An actual error occured */
- goto done;
+ result = hunk_result;
+ goto fail;
}
/* adapt overall result */
- if (( NT_STATUS_IS_OK(result) &&
- !NT_STATUS_IS_OK(hunk_result))
+ if (( NT_STATUS_IS_OK(result) &&
+ !NT_STATUS_IS_OK(hunk_result))
||
( NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) &&
!NT_STATUS_EQUAL(hunk_result, NT_STATUS_NONE_MAPPED)))
@@ -333,113 +341,12 @@ NTSTATUS rpccli_lsa_lookup_sids_all(struct rpc_pipe_client *cli,
hunk_types += hunk_num_sids;
}
-done:
return result;
-}
-
-/** Lookup a list of sids */
-
-NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, int num_sids,
- const DOM_SID *sids,
- char ***domains, char ***names, uint32 **types)
-{
- prs_struct qbuf, rbuf;
- LSA_Q_LOOKUP_SIDS q;
- LSA_R_LOOKUP_SIDS r;
- DOM_R_REF ref;
- NTSTATUS result = NT_STATUS_OK;
- int i;
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- init_q_lookup_sids(mem_ctx, &q, pol, num_sids, sids, 1);
-
- ZERO_STRUCT(ref);
-
- r.dom_ref = &ref;
-
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_LOOKUPSIDS,
- q, r,
- qbuf, rbuf,
- lsa_io_q_lookup_sids,
- lsa_io_r_lookup_sids,
- NT_STATUS_UNSUCCESSFUL );
-
- if (!NT_STATUS_IS_OK(r.status) &&
- NT_STATUS_V(r.status) != NT_STATUS_V(STATUS_SOME_UNMAPPED)) {
-
- /* An actual error occured */
- result = r.status;
-
- goto done;
- }
-
- /* Return output parameters */
-
- if (r.mapped_count == 0) {
- result = NT_STATUS_NONE_MAPPED;
- goto done;
- }
-
- if (num_sids) {
- if (!((*domains) = TALLOC_ARRAY(mem_ctx, char *, num_sids))) {
- DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
- result = NT_STATUS_NO_MEMORY;
- goto done;
- }
-
- if (!((*names) = TALLOC_ARRAY(mem_ctx, char *, num_sids))) {
- DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
- result = NT_STATUS_NO_MEMORY;
- goto done;
- }
-
- if (!((*types) = TALLOC_ARRAY(mem_ctx, uint32, num_sids))) {
- DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
- result = NT_STATUS_NO_MEMORY;
- goto done;
- }
- } else {
- (*domains) = NULL;
- (*names) = NULL;
- (*types) = NULL;
- }
-
- for (i = 0; i < num_sids; i++) {
- fstring name, dom_name;
- uint32 dom_idx = r.names.name[i].domain_idx;
-
- /* Translate optimised name through domain index array */
-
- if (dom_idx != 0xffffffff) {
-
- rpcstr_pull_unistr2_fstring(
- dom_name, &ref.ref_dom[dom_idx].uni_dom_name);
- rpcstr_pull_unistr2_fstring(
- name, &r.names.uni_name[i]);
-
- (*names)[i] = talloc_strdup(mem_ctx, name);
- (*domains)[i] = talloc_strdup(mem_ctx, dom_name);
- (*types)[i] = r.names.name[i].sid_name_use;
-
- if (((*names)[i] == NULL) || ((*domains)[i] == NULL)) {
- DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- } else {
- (*names)[i] = NULL;
- (*domains)[i] = NULL;
- (*types)[i] = SID_NAME_UNKNOWN;
- }
- }
-
- done:
+fail:
+ TALLOC_FREE(*domains);
+ TALLOC_FREE(*names);
+ TALLOC_FREE(*types);
return result;
}
@@ -447,7 +354,7 @@ NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, int num_names,
+ POLICY_HND *pol, int num_names,
const char **names,
const char ***dom_names,
int level,
@@ -460,7 +367,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
DOM_R_REF ref;
NTSTATUS result;
int i;
-
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -560,7 +467,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_query_info_policy_new(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
- LSA_INFO_CTR *ctr)
+ LSA_INFO_CTR *ctr)
{
prs_struct qbuf, rbuf;
LSA_Q_QUERY_INFO q;
@@ -588,13 +495,13 @@ NTSTATUS rpccli_lsa_query_info_policy_new(struct rpc_pipe_client *cli, TALLOC_CT
done:
*ctr = r.ctr;
-
+
return result;
}
NTSTATUS rpccli_lsa_query_info_policy2_new(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
- LSA_INFO_CTR2 *ctr)
+ LSA_INFO_CTR2 *ctr)
{
prs_struct qbuf, rbuf;
LSA_Q_QUERY_INFO2 q;
@@ -622,7 +529,7 @@ NTSTATUS rpccli_lsa_query_info_policy2_new(struct rpc_pipe_client *cli, TALLOC_C
done:
*ctr = r.ctr;
-
+
return result;
}
@@ -634,7 +541,7 @@ NTSTATUS rpccli_lsa_query_info_policy2_new(struct rpc_pipe_client *cli, TALLOC_C
NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint16 info_class,
+ POLICY_HND *pol, uint16 info_class,
char **domain_name, DOM_SID **domain_sid)
{
prs_struct qbuf, rbuf;
@@ -666,7 +573,7 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
case 3:
if (domain_name && (r.ctr.info.id3.buffer_dom_name != 0)) {
- *domain_name = unistr2_tdup(mem_ctx,
+ *domain_name = unistr2_tdup(mem_ctx,
&r.ctr.info.id3.
uni_domain_name);
if (!*domain_name) {
@@ -685,16 +592,16 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
break;
case 5:
-
+
if (domain_name && (r.ctr.info.id5.buffer_dom_name != 0)) {
- *domain_name = unistr2_tdup(mem_ctx,
+ *domain_name = unistr2_tdup(mem_ctx,
&r.ctr.info.id5.
uni_domain_name);
if (!*domain_name) {
return NT_STATUS_NO_MEMORY;
}
}
-
+
if (domain_sid && (r.ctr.info.id5.buffer_dom_sid != 0)) {
*domain_sid = TALLOC_P(mem_ctx, DOM_SID);
if (!*domain_sid) {
@@ -703,12 +610,12 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
sid_copy(*domain_sid, &r.ctr.info.id5.dom_sid.sid);
}
break;
-
+
default:
DEBUG(3, ("unknown info class %d\n", info_class));
- break;
+ break;
}
-
+
done:
return result;
@@ -724,7 +631,7 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint16 info_class,
+ POLICY_HND *pol, uint16 info_class,
char **domain_name, char **dns_name,
char **forest_name,
struct GUID **domain_guid,
@@ -761,7 +668,7 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
ZERO_STRUCTP(domain_guid);
if (domain_name && r.ctr.info.id12.hdr_nb_dom_name.buffer) {
- *domain_name = unistr2_tdup(mem_ctx,
+ *domain_name = unistr2_tdup(mem_ctx,
&r.ctr.info.id12
.uni_nb_dom_name);
if (!*domain_name) {
@@ -769,7 +676,7 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
}
}
if (dns_name && r.ctr.info.id12.hdr_dns_dom_name.buffer) {
- *dns_name = unistr2_tdup(mem_ctx,
+ *dns_name = unistr2_tdup(mem_ctx,
&r.ctr.info.id12
.uni_dns_dom_name);
if (!*dns_name) {
@@ -777,21 +684,21 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
}
}
if (forest_name && r.ctr.info.id12.hdr_forest_name.buffer) {
- *forest_name = unistr2_tdup(mem_ctx,
+ *forest_name = unistr2_tdup(mem_ctx,
&r.ctr.info.id12
.uni_forest_name);
if (!*forest_name) {
return NT_STATUS_NO_MEMORY;
}
}
-
+
if (domain_guid) {
*domain_guid = TALLOC_P(mem_ctx, struct GUID);
if (!*domain_guid) {
return NT_STATUS_NO_MEMORY;
}
- memcpy(*domain_guid,
- &r.ctr.info.id12.dom_guid,
+ memcpy(*domain_guid,
+ &r.ctr.info.id12.dom_guid,
sizeof(struct GUID));
}
@@ -800,10 +707,10 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
if (!*domain_sid) {
return NT_STATUS_NO_MEMORY;
}
- sid_copy(*domain_sid,
+ sid_copy(*domain_sid,
&r.ctr.info.id12.dom_sid.sid);
}
-
+
done:
return result;
@@ -811,7 +718,7 @@ NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_set_info_policy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, uint16 info_class,
- LSA_INFO_CTR ctr)
+ LSA_INFO_CTR ctr)
{
prs_struct qbuf, rbuf;
LSA_Q_SET_INFO q;
@@ -861,7 +768,7 @@ NTSTATUS rpccli_lsa_set_info_policy(struct rpc_pipe_client *cli, TALLOC_CTX *mem
NTSTATUS rpccli_lsa_enum_trust_dom(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 *enum_ctx,
+ POLICY_HND *pol, uint32 *enum_ctx,
uint32 *num_domains,
char ***domain_names, DOM_SID **domain_sids)
{
@@ -875,31 +782,31 @@ NTSTATUS rpccli_lsa_enum_trust_dom(struct rpc_pipe_client *cli,
ZERO_STRUCT(out);
/* 64k is enough for about 2000 trusted domains */
-
+
init_q_enum_trust_dom(&in, pol, *enum_ctx, 0x10000);
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_ENUMTRUSTDOM,
- in, out,
+ CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_ENUMTRUSTDOM,
+ in, out,
qbuf, rbuf,
lsa_io_q_enum_trust_dom,
- lsa_io_r_enum_trust_dom,
+ lsa_io_r_enum_trust_dom,
NT_STATUS_UNSUCCESSFUL );
/* check for an actual error */
- if ( !NT_STATUS_IS_OK(out.status)
- && !NT_STATUS_EQUAL(out.status, NT_STATUS_NO_MORE_ENTRIES)
+ if ( !NT_STATUS_IS_OK(out.status)
+ && !NT_STATUS_EQUAL(out.status, NT_STATUS_NO_MORE_ENTRIES)
&& !NT_STATUS_EQUAL(out.status, STATUS_MORE_ENTRIES) )
{
return out.status;
}
-
+
/* Return output parameters */
*num_domains = out.count;
*enum_ctx = out.enum_context;
-
+
if ( out.count ) {
/* Allocate memory for trusted domain names and sids */
@@ -918,7 +825,7 @@ NTSTATUS rpccli_lsa_enum_trust_dom(struct rpc_pipe_client *cli,
for (i = 0; i < out.count; i++) {
- rpcstr_pull( tmp, out.domlist->domains[i].name.string->buffer,
+ rpcstr_pull( tmp, out.domlist->domains[i].name.string->buffer,
sizeof(tmp), out.domlist->domains[i].name.length, 0);
(*domain_names)[i] = talloc_strdup(mem_ctx, tmp);
@@ -1007,7 +914,7 @@ NTSTATUS rpccli_lsa_enum_privilege(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
/** Get privilege name */
NTSTATUS rpccli_lsa_get_dispname(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, const char *name,
+ POLICY_HND *pol, const char *name,
uint16 lang_id, uint16 lang_id_sys,
fstring description, uint16 *lang_id_desc)
{
@@ -1035,7 +942,7 @@ NTSTATUS rpccli_lsa_get_dispname(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
}
/* Return output parameters */
-
+
rpcstr_pull_unistr2_fstring(description , &r.desc);
*lang_id_desc = r.lang_id;
@@ -1047,7 +954,7 @@ NTSTATUS rpccli_lsa_get_dispname(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
/** Enumerate list of SIDs */
NTSTATUS rpccli_lsa_enum_sids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length,
+ POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length,
uint32 *num_sids, DOM_SID **sids)
{
prs_struct qbuf, rbuf;
@@ -1110,7 +1017,7 @@ NTSTATUS rpccli_lsa_enum_sids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
* */
NTSTATUS rpccli_lsa_create_account(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *dom_pol, DOM_SID *sid, uint32 desired_access,
+ POLICY_HND *dom_pol, DOM_SID *sid, uint32 desired_access,
POLICY_HND *user_pol)
{
prs_struct qbuf, rbuf;
@@ -1148,7 +1055,7 @@ NTSTATUS rpccli_lsa_create_account(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
* @param cli Handle on an initialised SMB connection */
NTSTATUS rpccli_lsa_open_account(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access,
+ POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access,
POLICY_HND *user_pol)
{
prs_struct qbuf, rbuf;
@@ -1280,7 +1187,7 @@ NTSTATUS rpccli_lsa_lookup_priv_value(struct rpc_pipe_client *cli, TALLOC_CTX *m
/** Query LSA security object */
NTSTATUS rpccli_lsa_query_secobj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, uint32 sec_info,
+ POLICY_HND *pol, uint32 sec_info,
SEC_DESC_BUF **psdb)
{
prs_struct qbuf, rbuf;
@@ -1359,7 +1266,7 @@ NTSTATUS rpccli_lsa_enum_account_rights(struct rpc_pipe_client *cli, TALLOC_CTX
goto done;
}
-
+
privileges = TALLOC_ARRAY( mem_ctx, fstring, *count );
names = TALLOC_ARRAY( mem_ctx, char *, *count );
@@ -1376,11 +1283,11 @@ NTSTATUS rpccli_lsa_enum_account_rights(struct rpc_pipe_client *cli, TALLOC_CTX
continue;
rpcstr_pull( privileges[i], uni_string->string->buffer, sizeof(privileges[i]), -1, STR_TERMINATE );
-
+
/* now copy to the return array */
names[i] = talloc_strdup( mem_ctx, privileges[i] );
}
-
+
*priv_names = names;
done:
@@ -1472,18 +1379,18 @@ BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid)
NTSTATUS result;
POLICY_HND lsa_pol;
BOOL ret = False;
-
+
ZERO_STRUCT(cli);
if(cli_initialise(&cli) == False) {
DEBUG(0,("fetch_domain_sid: unable to initialize client connection.\n"));
return False;
}
-
+
if(!resolve_name( remote_machine, &cli.dest_ip, 0x20)) {
DEBUG(0,("fetch_domain_sid: Can't resolve address for %s\n", remote_machine));
goto done;
}
-
+
if (!cli_connect(&cli, remote_machine, &cli.dest_ip)) {
DEBUG(0,("fetch_domain_sid: unable to connect to SMB server on \
machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
@@ -1491,35 +1398,35 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
}
if (!attempt_netbios_session_request(&cli, global_myname, remote_machine, &cli.dest_ip)) {
- DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS session request.\n",
+ DEBUG(0,("fetch_domain_sid: machine %s rejected the NetBIOS session request.\n",
remote_machine));
goto done;
}
-
+
cli.protocol = PROTOCOL_NT1;
-
+
if (!cli_negprot(&cli)) {
DEBUG(0,("fetch_domain_sid: machine %s rejected the negotiate protocol. \
Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
goto done;
}
-
+
if (cli.protocol != PROTOCOL_NT1) {
DEBUG(0,("fetch_domain_sid: machine %s didn't negotiate NT protocol.\n",
remote_machine));
goto done;
}
-
+
/*
* Do an anonymous session setup.
*/
-
+
if (!cli_session_setup(&cli, "", "", 0, "", 0, "")) {
DEBUG(0,("fetch_domain_sid: machine %s rejected the session setup. \
Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
goto done;
}
-
+
if (!(cli.sec_mode & NEGOTIATE_SECURITY_USER_LEVEL)) {
DEBUG(0,("fetch_domain_sid: machine %s isn't in user level security mode\n",
remote_machine));
@@ -1533,26 +1440,26 @@ Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
}
/* Fetch domain sid */
-
+
if (!cli_nt_session_open(&cli, PI_LSARPC)) {
DEBUG(0, ("fetch_domain_sid: Error connecting to SAM pipe\n"));
goto done;
}
-
+
result = cli_lsa_open_policy(&cli, cli.mem_ctx, True, SEC_RIGHTS_QUERY_VALUE, &lsa_pol);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0, ("fetch_domain_sid: Error opening lsa policy handle. %s\n",
nt_errstr(result) ));
goto done;
}
-
+
result = cli_lsa_query_info_policy(&cli, cli.mem_ctx, &lsa_pol, 5, domain, psid);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(0, ("fetch_domain_sid: Error querying lsa policy handle. %s\n",
nt_errstr(result) ));
goto done;
}
-
+
ret = True;
done:
@@ -1589,7 +1496,7 @@ NTSTATUS rpccli_lsa_open_trusted_domain(struct rpc_pipe_client *cli, TALLOC_CTX
NT_STATUS_UNSUCCESSFUL);
/* Return output parameters */
-
+
result = r.status;
if (NT_STATUS_IS_OK(result)) {
@@ -1600,8 +1507,8 @@ NTSTATUS rpccli_lsa_open_trusted_domain(struct rpc_pipe_client *cli, TALLOC_CTX
}
NTSTATUS rpccli_lsa_query_trusted_domain_info(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
- uint16 info_class,
+ POLICY_HND *pol,
+ uint16 info_class,
LSA_TRUSTED_DOMAIN_INFO **info)
{
prs_struct qbuf, rbuf;
@@ -1614,7 +1521,7 @@ NTSTATUS rpccli_lsa_query_trusted_domain_info(struct rpc_pipe_client *cli, TALLO
/* Marshall data and send request */
- init_q_query_trusted_domain_info(&q, pol, info_class);
+ init_q_query_trusted_domain_info(&q, pol, info_class);
CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFO,
q, r,
@@ -1630,7 +1537,7 @@ NTSTATUS rpccli_lsa_query_trusted_domain_info(struct rpc_pipe_client *cli, TALLO
}
*info = r.info;
-
+
done:
return result;
}
@@ -1661,7 +1568,7 @@ NTSTATUS rpccli_lsa_open_trusted_domain_by_name(struct rpc_pipe_client *cli, TAL
NT_STATUS_UNSUCCESSFUL);
/* Return output parameters */
-
+
result = r.status;
if (NT_STATUS_IS_OK(result)) {
@@ -1673,8 +1580,8 @@ NTSTATUS rpccli_lsa_open_trusted_domain_by_name(struct rpc_pipe_client *cli, TAL
NTSTATUS rpccli_lsa_query_trusted_domain_info_by_sid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
- uint16 info_class, DOM_SID *dom_sid,
+ POLICY_HND *pol,
+ uint16 info_class, DOM_SID *dom_sid,
LSA_TRUSTED_DOMAIN_INFO **info)
{
prs_struct qbuf, rbuf;
@@ -1687,7 +1594,7 @@ NTSTATUS rpccli_lsa_query_trusted_domain_info_by_sid(struct rpc_pipe_client *cli
/* Marshall data and send request */
- init_q_query_trusted_domain_info_by_sid(&q, pol, info_class, dom_sid);
+ init_q_query_trusted_domain_info_by_sid(&q, pol, info_class, dom_sid);
CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFOBYSID,
q, r,
@@ -1710,8 +1617,8 @@ done:
}
NTSTATUS rpccli_lsa_query_trusted_domain_info_by_name(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
- uint16 info_class, const char *domain_name,
+ POLICY_HND *pol,
+ uint16 info_class, const char *domain_name,
LSA_TRUSTED_DOMAIN_INFO **info)
{
prs_struct qbuf, rbuf;
@@ -1724,7 +1631,7 @@ NTSTATUS rpccli_lsa_query_trusted_domain_info_by_name(struct rpc_pipe_client *cl
/* Marshall data and send request */
- init_q_query_trusted_domain_info_by_name(&q, pol, info_class, domain_name);
+ init_q_query_trusted_domain_info_by_name(&q, pol, info_class, domain_name);
CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFOBYNAME,
q, r,
@@ -1742,12 +1649,12 @@ NTSTATUS rpccli_lsa_query_trusted_domain_info_by_name(struct rpc_pipe_client *cl
*info = r.info;
done:
-
+
return result;
}
NTSTATUS cli_lsa_query_domain_info_policy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
+ POLICY_HND *pol,
uint16 info_class, LSA_DOM_INFO_UNION **info)
{
prs_struct qbuf, rbuf;
@@ -1760,9 +1667,9 @@ NTSTATUS cli_lsa_query_domain_info_policy(struct rpc_pipe_client *cli, TALLOC_CT
/* Marshall data and send request */
- init_q_query_dom_info(&q, pol, info_class);
+ init_q_query_dom_info(&q, pol, info_class);
- CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYDOMINFOPOL,
+ CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYDOMINFOPOL,
q, r,
qbuf, rbuf,
lsa_io_q_query_dom_info,
diff --git a/source/rpc_client/cli_reg.c b/source/rpc_client/cli_reg.c
index c811529e633..693d4dd5b53 100644
--- a/source/rpc_client/cli_reg.c
+++ b/source/rpc_client/cli_reg.c
@@ -45,6 +45,10 @@ NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return rpccli_winreg_OpenHKU( cli, mem_ctx, NULL,
access_mask, reg_hnd );
+ case HKEY_CURRENT_USER:
+ return rpccli_winreg_OpenHKCU( cli, mem_ctx, NULL,
+ access_mask, reg_hnd );
+
case HKEY_PERFORMANCE_DATA:
return rpccli_winreg_OpenHKPD( cli, mem_ctx, NULL,
access_mask, reg_hnd );
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c
index 234ee2cdd9f..8eaf20aa1ec 100644
--- a/source/rpc_client/cli_samr.c
+++ b/source/rpc_client/cli_samr.c
@@ -701,7 +701,7 @@ NTSTATUS rpccli_samr_enum_dom_users(struct rpc_pipe_client *cli, TALLOC_CTX *mem
fstring conv_buf;
(*rids)[i] = r.sam[i].rid;
- unistr2_to_ascii(conv_buf, &(r.uni_acct_name[i]), sizeof(conv_buf) - 1);
+ unistr2_to_ascii(conv_buf, &(r.uni_acct_name[i]), sizeof(conv_buf));
(*dom_users)[i] = talloc_strdup(mem_ctx, conv_buf);
}
}
@@ -769,7 +769,7 @@ NTSTATUS rpccli_samr_enum_dom_groups(struct rpc_pipe_client *cli,
if (r.sam[i].hdr_name.buffer) {
unistr2_to_ascii((*dom_groups)[i].acct_name,
&r.uni_grp_name[name_idx],
- sizeof(fstring) - 1);
+ sizeof((*dom_groups)[i].acct_name));
name_idx++;
}
@@ -840,7 +840,7 @@ NTSTATUS rpccli_samr_enum_als_groups(struct rpc_pipe_client *cli,
if (r.sam[i].hdr_name.buffer) {
unistr2_to_ascii((*dom_aliases)[i].acct_name,
&r.uni_grp_name[name_idx],
- sizeof(fstring) - 1);
+ sizeof((*dom_aliases)[i].acct_name));
name_idx++;
}
@@ -1566,7 +1566,7 @@ NTSTATUS rpccli_samr_lookup_rids(struct rpc_pipe_client *cli,
for (i = 0; i < r.num_names1; i++) {
fstring tmp;
- unistr2_to_ascii(tmp, &r.uni_name[i], sizeof(tmp) - 1);
+ unistr2_to_ascii(tmp, &r.uni_name[i], sizeof(tmp));
(*names)[i] = talloc_strdup(mem_ctx, tmp);
(*name_types)[i] = r.type[i];
}
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c
index a0d818bd67a..84304603124 100644
--- a/source/rpc_parse/parse_spoolss.c
+++ b/source/rpc_parse/parse_spoolss.c
@@ -5384,14 +5384,14 @@ BOOL uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
d->cversion=uni->cversion;
- unistr2_to_ascii(d->name, &uni->name, sizeof(d->name)-1);
- unistr2_to_ascii(d->environment, &uni->environment, sizeof(d->environment)-1);
- unistr2_to_ascii(d->driverpath, &uni->driverpath, sizeof(d->driverpath)-1);
- unistr2_to_ascii(d->datafile, &uni->datafile, sizeof(d->datafile)-1);
- unistr2_to_ascii(d->configfile, &uni->configfile, sizeof(d->configfile)-1);
- unistr2_to_ascii(d->helpfile, &uni->helpfile, sizeof(d->helpfile)-1);
- unistr2_to_ascii(d->monitorname, &uni->monitorname, sizeof(d->monitorname)-1);
- unistr2_to_ascii(d->defaultdatatype, &uni->defaultdatatype, sizeof(d->defaultdatatype)-1);
+ unistr2_to_ascii(d->name, &uni->name, sizeof(d->name));
+ unistr2_to_ascii(d->environment, &uni->environment, sizeof(d->environment));
+ unistr2_to_ascii(d->driverpath, &uni->driverpath, sizeof(d->driverpath));
+ unistr2_to_ascii(d->datafile, &uni->datafile, sizeof(d->datafile));
+ unistr2_to_ascii(d->configfile, &uni->configfile, sizeof(d->configfile));
+ unistr2_to_ascii(d->helpfile, &uni->helpfile, sizeof(d->helpfile));
+ unistr2_to_ascii(d->monitorname, &uni->monitorname, sizeof(d->monitorname));
+ unistr2_to_ascii(d->defaultdatatype, &uni->defaultdatatype, sizeof(d->defaultdatatype));
DEBUGADD(8,( "version: %d\n", d->cversion));
DEBUGADD(8,( "name: %s\n", d->name));
@@ -5431,14 +5431,14 @@ BOOL uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
d->version=uni->version;
- unistr2_to_ascii(d->name, &uni->name, sizeof(d->name)-1);
- unistr2_to_ascii(d->environment, &uni->environment, sizeof(d->environment)-1);
- unistr2_to_ascii(d->driverpath, &uni->driverpath, sizeof(d->driverpath)-1);
- unistr2_to_ascii(d->datafile, &uni->datafile, sizeof(d->datafile)-1);
- unistr2_to_ascii(d->configfile, &uni->configfile, sizeof(d->configfile)-1);
- unistr2_to_ascii(d->helpfile, &uni->helpfile, sizeof(d->helpfile)-1);
- unistr2_to_ascii(d->monitorname, &uni->monitorname, sizeof(d->monitorname)-1);
- unistr2_to_ascii(d->defaultdatatype, &uni->defaultdatatype, sizeof(d->defaultdatatype)-1);
+ unistr2_to_ascii(d->name, &uni->name, sizeof(d->name));
+ unistr2_to_ascii(d->environment, &uni->environment, sizeof(d->environment));
+ unistr2_to_ascii(d->driverpath, &uni->driverpath, sizeof(d->driverpath));
+ unistr2_to_ascii(d->datafile, &uni->datafile, sizeof(d->datafile));
+ unistr2_to_ascii(d->configfile, &uni->configfile, sizeof(d->configfile));
+ unistr2_to_ascii(d->helpfile, &uni->helpfile, sizeof(d->helpfile));
+ unistr2_to_ascii(d->monitorname, &uni->monitorname, sizeof(d->monitorname));
+ unistr2_to_ascii(d->defaultdatatype, &uni->defaultdatatype, sizeof(d->defaultdatatype));
DEBUGADD(8,( "version: %d\n", d->version));
DEBUGADD(8,( "name: %s\n", d->name));
@@ -5475,17 +5475,17 @@ BOOL uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
d->status=uni->status;
d->cjobs=uni->cjobs;
- unistr2_to_ascii(d->servername, &uni->servername, sizeof(d->servername)-1);
- unistr2_to_ascii(d->printername, &uni->printername, sizeof(d->printername)-1);
- unistr2_to_ascii(d->sharename, &uni->sharename, sizeof(d->sharename)-1);
- unistr2_to_ascii(d->portname, &uni->portname, sizeof(d->portname)-1);
- unistr2_to_ascii(d->drivername, &uni->drivername, sizeof(d->drivername)-1);
- unistr2_to_ascii(d->comment, &uni->comment, sizeof(d->comment)-1);
- unistr2_to_ascii(d->location, &uni->location, sizeof(d->location)-1);
- unistr2_to_ascii(d->sepfile, &uni->sepfile, sizeof(d->sepfile)-1);
- unistr2_to_ascii(d->printprocessor, &uni->printprocessor, sizeof(d->printprocessor)-1);
- unistr2_to_ascii(d->datatype, &uni->datatype, sizeof(d->datatype)-1);
- unistr2_to_ascii(d->parameters, &uni->parameters, sizeof(d->parameters)-1);
+ unistr2_to_ascii(d->servername, &uni->servername, sizeof(d->servername));
+ unistr2_to_ascii(d->printername, &uni->printername, sizeof(d->printername));
+ unistr2_to_ascii(d->sharename, &uni->sharename, sizeof(d->sharename));
+ unistr2_to_ascii(d->portname, &uni->portname, sizeof(d->portname));
+ unistr2_to_ascii(d->drivername, &uni->drivername, sizeof(d->drivername));
+ unistr2_to_ascii(d->comment, &uni->comment, sizeof(d->comment));
+ unistr2_to_ascii(d->location, &uni->location, sizeof(d->location));
+ unistr2_to_ascii(d->sepfile, &uni->sepfile, sizeof(d->sepfile));
+ unistr2_to_ascii(d->printprocessor, &uni->printprocessor, sizeof(d->printprocessor));
+ unistr2_to_ascii(d->datatype, &uni->datatype, sizeof(d->datatype));
+ unistr2_to_ascii(d->parameters, &uni->parameters, sizeof(d->parameters));
return True;
}
diff --git a/source/rpc_server/srv_dfs_nt.c b/source/rpc_server/srv_dfs_nt.c
index 468a3c4996f..37a97258286 100644
--- a/source/rpc_server/srv_dfs_nt.c
+++ b/source/rpc_server/srv_dfs_nt.c
@@ -1,20 +1,20 @@
-/*
+/*
* Unix SMB/CIFS implementation.
* RPC Pipe client / server routines for Dfs
* Copyright (C) Shirish Kalele 2000.
- * Copyright (C) Jeremy Allison 2001.
+ * Copyright (C) Jeremy Allison 2001-2007.
* Copyright (C) Jelmer Vernooij 2005-2006.
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
@@ -40,53 +40,68 @@ void _dfs_GetManagerVersion(pipes_struct *p, struct dfs_GetManagerVersion *r)
WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r)
{
- struct junction_map jn;
- struct referral* old_referral_list = NULL;
+ struct junction_map *jn = NULL;
+ struct referral *old_referral_list = NULL;
BOOL self_ref = False;
int consumedcnt = 0;
BOOL exists = False;
-
- pstring altpath;
+ char *altpath = NULL;
+ NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
if (p->pipe_user.ut.uid != 0) {
DEBUG(10,("_dfs_add: uid != 0. Access denied.\n"));
return WERR_ACCESS_DENIED;
}
+ jn = TALLOC_ZERO_P(ctx, struct junction_map);
+ if (!jn) {
+ return WERR_NOMEM;
+ }
+
DEBUG(5,("init_reply_dfs_add: Request to add %s -> %s\\%s.\n",
r->in.path, r->in.server, r->in.share));
- pstrcpy(altpath, r->in.server);
- pstrcat(altpath, "\\");
- pstrcat(altpath, r->in.share);
+ altpath = talloc_asprintf(ctx, "%s\\%s",
+ r->in.server,
+ r->in.share);
+ if (!altpath) {
+ return WERR_NOMEM;
+ }
/* The following call can change the cwd. */
- if(NT_STATUS_IS_OK(get_referred_path(p->mem_ctx, r->in.path, &jn, &consumedcnt, &self_ref))) {
- exists = True;
- jn.referral_count += 1;
- old_referral_list = jn.referral_list;
- } else {
- jn.referral_count = 1;
+ status = get_referred_path(ctx, r->in.path, jn,
+ &consumedcnt, &self_ref);
+ if(!NT_STATUS_IS_OK(status)) {
+ return ntstatus_to_werror(status);
}
+ exists = True;
+ jn->referral_count += 1;
+ old_referral_list = jn->referral_list;
+
vfs_ChDir(p->conn,p->conn->connectpath);
- jn.referral_list = TALLOC_ARRAY(p->mem_ctx, struct referral, jn.referral_count);
- if(jn.referral_list == NULL) {
+ if (jn->referral_count < 1) {
+ return WERR_NOMEM;
+ }
+
+ jn->referral_list = TALLOC_ARRAY(ctx, struct referral, jn->referral_count);
+ if(jn->referral_list == NULL) {
DEBUG(0,("init_reply_dfs_add: talloc failed for referral list!\n"));
return WERR_DFS_INTERNAL_ERROR;
}
- if(old_referral_list) {
- memcpy(jn.referral_list, old_referral_list, sizeof(struct referral)*jn.referral_count-1);
+ if(old_referral_list && jn->referral_list) {
+ memcpy(jn->referral_list, old_referral_list,
+ sizeof(struct referral)*jn->referral_count-1);
}
-
- jn.referral_list[jn.referral_count-1].proximity = 0;
- jn.referral_list[jn.referral_count-1].ttl = REFERRAL_TTL;
- pstrcpy(jn.referral_list[jn.referral_count-1].alternate_path, altpath);
-
- if(!create_msdfs_link(&jn, exists)) {
+ jn->referral_list[jn->referral_count-1].proximity = 0;
+ jn->referral_list[jn->referral_count-1].ttl = REFERRAL_TTL;
+ jn->referral_list[jn->referral_count-1].alternate_path = altpath;
+
+ if(!create_msdfs_link(jn, exists)) {
vfs_ChDir(p->conn,p->conn->connectpath);
return WERR_DFS_CANT_CREATE_JUNCT;
}
@@ -97,35 +112,43 @@ WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r)
WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r)
{
- struct junction_map jn;
+ struct junction_map *jn = NULL;
BOOL self_ref = False;
int consumedcnt = 0;
BOOL found = False;
-
- pstring altpath;
+ TALLOC_CTX *ctx = talloc_tos();
+ char *altpath = NULL;
if (p->pipe_user.ut.uid != 0) {
DEBUG(10,("_dfs_remove: uid != 0. Access denied.\n"));
return WERR_ACCESS_DENIED;
}
+ jn = TALLOC_ZERO_P(ctx, struct junction_map);
+ if (!jn) {
+ return WERR_NOMEM;
+ }
+
if (r->in.servername && r->in.sharename) {
- pstrcpy(altpath, r->in.servername);
- pstrcat(altpath, "\\");
- pstrcat(altpath, r->in.sharename);
+ altpath = talloc_asprintf(ctx, "%s\\%s",
+ r->in.servername,
+ r->in.sharename);
strlower_m(altpath);
+ if (!altpath) {
+ return WERR_NOMEM;
+ }
+ DEBUG(5,("init_reply_dfs_remove: Request to remove %s -> %s\\%s.\n",
+ r->in.dfs_entry_path, r->in.servername, r->in.sharename));
}
- DEBUG(5,("init_reply_dfs_remove: Request to remove %s -> %s\\%s.\n",
- r->in.dfs_entry_path, r->in.servername, r->in.sharename));
-
- if(!NT_STATUS_IS_OK(get_referred_path(p->mem_ctx, r->in.dfs_entry_path, &jn, &consumedcnt, &self_ref))) {
+ if(!NT_STATUS_IS_OK(get_referred_path(ctx, r->in.dfs_entry_path, jn,
+ &consumedcnt, &self_ref))) {
return WERR_DFS_NO_SUCH_VOL;
}
/* if no server-share pair given, remove the msdfs link completely */
if(!r->in.servername && !r->in.sharename) {
- if(!remove_msdfs_link(&jn)) {
+ if(!remove_msdfs_link(jn)) {
vfs_ChDir(p->conn,p->conn->connectpath);
return WERR_DFS_NO_SUCH_VOL;
}
@@ -133,14 +156,17 @@ WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r)
} else {
int i=0;
/* compare each referral in the list with the one to remove */
- DEBUG(10,("altpath: .%s. refcnt: %d\n", altpath, jn.referral_count));
- for(i=0;i<jn.referral_count;i++) {
- pstring refpath;
- pstrcpy(refpath,jn.referral_list[i].alternate_path);
+ DEBUG(10,("altpath: .%s. refcnt: %d\n", altpath, jn->referral_count));
+ for(i=0;i<jn->referral_count;i++) {
+ char *refpath = talloc_strdup(ctx,
+ jn->referral_list[i].alternate_path);
+ if (!refpath) {
+ return WERR_NOMEM;
+ }
trim_char(refpath, '\\', '\\');
DEBUG(10,("_dfs_remove: refpath: .%s.\n", refpath));
if(strequal(refpath, altpath)) {
- *(jn.referral_list[i].alternate_path)='\0';
+ *(jn->referral_list[i].alternate_path)='\0';
DEBUG(10,("_dfs_remove: Removal request matches referral %s\n",
refpath));
found = True;
@@ -152,13 +178,13 @@ WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r)
}
/* Only one referral, remove it */
- if(jn.referral_count == 1) {
- if(!remove_msdfs_link(&jn)) {
+ if(jn->referral_count == 1) {
+ if(!remove_msdfs_link(jn)) {
vfs_ChDir(p->conn,p->conn->connectpath);
return WERR_DFS_NO_SUCH_VOL;
}
} else {
- if(!create_msdfs_link(&jn, True)) {
+ if(!create_msdfs_link(jn, True)) {
vfs_ChDir(p->conn,p->conn->connectpath);
return WERR_DFS_CANT_CREATE_JUNCT;
}
@@ -169,10 +195,10 @@ WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r)
return WERR_OK;
}
-static BOOL init_reply_dfs_info_1(TALLOC_CTX *mem_ctx, struct junction_map* j, struct dfs_Info1* dfs1)
+static BOOL init_reply_dfs_info_1(TALLOC_CTX *mem_ctx, struct junction_map* j,struct dfs_Info1* dfs1)
{
- dfs1->path = talloc_asprintf(mem_ctx,
- "\\\\%s\\%s\\%s", global_myname(),
+ dfs1->path = talloc_asprintf(mem_ctx,
+ "\\\\%s\\%s\\%s", global_myname(),
j->service_name, j->volume_name);
if (dfs1->path == NULL)
return False;
@@ -183,7 +209,7 @@ static BOOL init_reply_dfs_info_1(TALLOC_CTX *mem_ctx, struct junction_map* j, s
static BOOL init_reply_dfs_info_2(TALLOC_CTX *mem_ctx, struct junction_map* j, struct dfs_Info2* dfs2)
{
- dfs2->path = talloc_asprintf(mem_ctx,
+ dfs2->path = talloc_asprintf(mem_ctx,
"\\\\%s\\%s\\%s", global_myname(), j->service_name, j->volume_name);
if (dfs2->path == NULL)
return False;
@@ -209,7 +235,7 @@ static BOOL init_reply_dfs_info_3(TALLOC_CTX *mem_ctx, struct junction_map* j, s
dfs3->comment = talloc_strdup(mem_ctx, j->comment);
dfs3->state = 1;
dfs3->num_stores = j->referral_count;
-
+
/* also enumerate the stores */
if (j->referral_count) {
dfs3->stores = TALLOC_ARRAY(mem_ctx, struct dfs_StorageInfo, j->referral_count);
@@ -221,12 +247,15 @@ static BOOL init_reply_dfs_info_3(TALLOC_CTX *mem_ctx, struct junction_map* j, s
}
for(ii=0;ii<j->referral_count;ii++) {
- char* p;
- pstring path;
- struct dfs_StorageInfo* stor = &(dfs3->stores[ii]);
+ char* p;
+ char *path = NULL;
+ struct dfs_StorageInfo* stor = &(dfs3->stores[ii]);
struct referral* ref = &(j->referral_list[ii]);
-
- pstrcpy(path, ref->alternate_path);
+
+ path = talloc_strdup(mem_ctx, ref->alternate_path);
+ if (!path) {
+ return False;
+ }
trim_char(path,'\\','\0');
p = strrchr_m(path,'\\');
if(p==NULL) {
@@ -248,17 +277,22 @@ static BOOL init_reply_dfs_info_100(TALLOC_CTX *mem_ctx, struct junction_map* j,
return True;
}
-
WERROR _dfs_Enum(pipes_struct *p, struct dfs_Enum *r)
{
- struct junction_map jn[MAX_MSDFS_JUNCTIONS];
- int num_jn = 0;
- int i;
-
- num_jn = enum_msdfs_links(p->mem_ctx, jn, ARRAY_SIZE(jn));
+ struct junction_map *jn = NULL;
+ size_t num_jn = 0;
+ size_t i;
+ TALLOC_CTX *ctx = talloc_tos();
+
+ jn = enum_msdfs_links(ctx, &num_jn);
+ if (!jn || num_jn == 0) {
+ num_jn = 0;
+ jn = NULL;
+ }
vfs_ChDir(p->conn,p->conn->connectpath);
-
- DEBUG(5,("_dfs_Enum: %d junctions found in Dfs, doing level %d\n", num_jn, r->in.level));
+
+ DEBUG(5,("_dfs_Enum: %u junctions found in Dfs, doing level %d\n",
+ (unsigned int)num_jn, r->in.level));
*r->out.total = num_jn;
@@ -266,7 +300,7 @@ WERROR _dfs_Enum(pipes_struct *p, struct dfs_Enum *r)
switch (r->in.level) {
case 1:
if (num_jn) {
- if ((r->out.info->e.info1->s = TALLOC_ARRAY(p->mem_ctx, struct dfs_Info1, num_jn)) == NULL) {
+ if ((r->out.info->e.info1->s = TALLOC_ARRAY(ctx, struct dfs_Info1, num_jn)) == NULL) {
return WERR_NOMEM;
}
} else {
@@ -276,7 +310,7 @@ WERROR _dfs_Enum(pipes_struct *p, struct dfs_Enum *r)
break;
case 2:
if (num_jn) {
- if ((r->out.info->e.info2->s = TALLOC_ARRAY(p->mem_ctx, struct dfs_Info2, num_jn)) == NULL) {
+ if ((r->out.info->e.info2->s = TALLOC_ARRAY(ctx, struct dfs_Info2, num_jn)) == NULL) {
return WERR_NOMEM;
}
} else {
@@ -286,7 +320,7 @@ WERROR _dfs_Enum(pipes_struct *p, struct dfs_Enum *r)
break;
case 3:
if (num_jn) {
- if ((r->out.info->e.info3->s = TALLOC_ARRAY(p->mem_ctx, struct dfs_Info3, num_jn)) == NULL) {
+ if ((r->out.info->e.info3->s = TALLOC_ARRAY(ctx, struct dfs_Info3, num_jn)) == NULL) {
return WERR_NOMEM;
}
} else {
@@ -300,35 +334,44 @@ WERROR _dfs_Enum(pipes_struct *p, struct dfs_Enum *r)
for (i = 0; i < num_jn; i++) {
switch (r->in.level) {
- case 1:
- init_reply_dfs_info_1(p->mem_ctx, &jn[i], &r->out.info->e.info1->s[i]);
+ case 1:
+ init_reply_dfs_info_1(ctx, &jn[i], &r->out.info->e.info1->s[i]);
break;
case 2:
- init_reply_dfs_info_2(p->mem_ctx, &jn[i], &r->out.info->e.info2->s[i]);
+ init_reply_dfs_info_2(ctx, &jn[i], &r->out.info->e.info2->s[i]);
break;
case 3:
- init_reply_dfs_info_3(p->mem_ctx, &jn[i], &r->out.info->e.info3->s[i]);
+ init_reply_dfs_info_3(ctx, &jn[i], &r->out.info->e.info3->s[i]);
break;
default:
return WERR_INVALID_PARAM;
}
}
-
+
return WERR_OK;
}
WERROR _dfs_GetInfo(pipes_struct *p, struct dfs_GetInfo *r)
{
- int consumedcnt = sizeof(pstring);
- struct junction_map jn;
+ int consumedcnt = strlen(r->in.dfs_entry_path);
+ struct junction_map *jn = NULL;
BOOL self_ref = False;
+ TALLOC_CTX *ctx = talloc_tos();
BOOL ret;
- if(!create_junction(r->in.dfs_entry_path, &jn))
+ jn = TALLOC_ZERO_P(ctx, struct junction_map);
+ if (!jn) {
+ return WERR_NOMEM;
+ }
+
+ if(!create_junction(ctx, r->in.dfs_entry_path, jn)) {
return WERR_DFS_NO_SUCH_SERVER;
-
+ }
+
/* The following call can change the cwd. */
- if(!NT_STATUS_IS_OK(get_referred_path(p->mem_ctx, r->in.dfs_entry_path, &jn, &consumedcnt, &self_ref)) || consumedcnt < strlen(r->in.dfs_entry_path)) {
+ if(!NT_STATUS_IS_OK(get_referred_path(ctx, r->in.dfs_entry_path,
+ jn, &consumedcnt, &self_ref)) ||
+ consumedcnt < strlen(r->in.dfs_entry_path)) {
vfs_ChDir(p->conn,p->conn->connectpath);
return WERR_DFS_NO_SUCH_VOL;
}
@@ -336,18 +379,18 @@ WERROR _dfs_GetInfo(pipes_struct *p, struct dfs_GetInfo *r)
vfs_ChDir(p->conn,p->conn->connectpath);
switch (r->in.level) {
- case 1: ret = init_reply_dfs_info_1(p->mem_ctx, &jn, r->out.info->info1); break;
- case 2: ret = init_reply_dfs_info_2(p->mem_ctx, &jn, r->out.info->info2); break;
- case 3: ret = init_reply_dfs_info_3(p->mem_ctx, &jn, r->out.info->info3); break;
- case 100: ret = init_reply_dfs_info_100(p->mem_ctx, &jn, r->out.info->info100); break;
+ case 1: ret = init_reply_dfs_info_1(ctx, jn, r->out.info->info1); break;
+ case 2: ret = init_reply_dfs_info_2(ctx, jn, r->out.info->info2); break;
+ case 3: ret = init_reply_dfs_info_3(ctx, jn, r->out.info->info3); break;
+ case 100: ret = init_reply_dfs_info_100(ctx, jn, r->out.info->info100); break;
default:
r->out.info->info1 = NULL;
return WERR_INVALID_PARAM;
}
- if (!ret)
+ if (!ret)
return WERR_INVALID_PARAM;
-
+
return WERR_OK;
}
diff --git a/source/rpc_server/srv_lsa_hnd.c b/source/rpc_server/srv_lsa_hnd.c
index 7250da7d0cf..45b4fb9a5c7 100644
--- a/source/rpc_server/srv_lsa_hnd.c
+++ b/source/rpc_server/srv_lsa_hnd.c
@@ -44,7 +44,7 @@ static BOOL is_samr_lsa_pipe(const char *pipe_name)
pipes of the same name.
****************************************************************************/
-BOOL init_pipe_handle_list(pipes_struct *p, char *pipe_name)
+BOOL init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
{
pipes_struct *plist = get_first_internal_pipe();
struct handle_list *hl = NULL;
diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c
index 6035bb6de8c..91814979c5b 100644
--- a/source/rpc_server/srv_pipe_hnd.c
+++ b/source/rpc_server/srv_pipe_hnd.c
@@ -65,7 +65,7 @@ static ssize_t read_from_internal_pipe(void *np_conn, char *data, size_t n,
BOOL *is_data_outstanding);
static ssize_t write_to_internal_pipe(void *np_conn, char *data, size_t n);
static BOOL close_internal_rpc_pipe_hnd(void *np_conn);
-static void *make_internal_rpc_pipe_p(char *pipe_name,
+static void *make_internal_rpc_pipe_p(const char *pipe_name,
connection_struct *conn, uint16 vuid);
/****************************************************************************
@@ -167,7 +167,7 @@ static BOOL pipe_init_outgoing_data(pipes_struct *p)
Find first available pipe slot.
****************************************************************************/
-smb_np_struct *open_rpc_pipe_p(char *pipe_name,
+smb_np_struct *open_rpc_pipe_p(const char *pipe_name,
connection_struct *conn, uint16 vuid)
{
int i;
@@ -275,7 +275,7 @@ smb_np_struct *open_rpc_pipe_p(char *pipe_name,
Make an internal namedpipes structure
****************************************************************************/
-static void *make_internal_rpc_pipe_p(char *pipe_name,
+static void *make_internal_rpc_pipe_p(const char *pipe_name,
connection_struct *conn, uint16 vuid)
{
pipes_struct *p;
diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index e95fd0c7f90..950a186e039 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -4470,7 +4470,7 @@ NTSTATUS _samr_create_dom_alias(pipes_struct *p, SAMR_Q_CREATE_DOM_ALIAS *q_u, S
if (!sid_equal(&dom_sid, get_global_sam_sid()))
return NT_STATUS_ACCESS_DENIED;
- unistr2_to_ascii(name, &q_u->uni_acct_desc, sizeof(name)-1);
+ unistr2_to_ascii(name, &q_u->uni_acct_desc, sizeof(name));
se_priv_copy( &se_rights, &se_add_users );
can_add_accounts = user_has_privileges( p->pipe_user.nt_user_token, &se_rights );
@@ -4659,10 +4659,10 @@ NTSTATUS _samr_set_groupinfo(pipes_struct *p, SAMR_Q_SET_GROUPINFO *q_u, SAMR_R_
switch (ctr->switch_value1) {
case 1:
- unistr2_to_ascii(map.comment, &(ctr->group.info1.uni_acct_desc), sizeof(map.comment)-1);
+ unistr2_to_ascii(map.comment, &(ctr->group.info1.uni_acct_desc), sizeof(map.comment));
break;
case 4:
- unistr2_to_ascii(map.comment, &(ctr->group.info4.uni_acct_desc), sizeof(map.comment)-1);
+ unistr2_to_ascii(map.comment, &(ctr->group.info4.uni_acct_desc), sizeof(map.comment));
break;
default:
return NT_STATUS_INVALID_INFO_CLASS;
@@ -4743,7 +4743,7 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_
return NT_STATUS_INVALID_PARAMETER;
unistr2_to_ascii( acct_name, ctr->alias.info2.name.string,
- sizeof(acct_name)-1 );
+ sizeof(acct_name));
/* If the name is the same just reply "ok". Yes this
doesn't allow you to change the case of a group name. */
@@ -4766,7 +4766,7 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_
if ( ctr->alias.info3.description.string ) {
unistr2_to_ascii( info.acct_desc,
ctr->alias.info3.description.string,
- sizeof(info.acct_desc)-1 );
+ sizeof(info.acct_desc));
}
else
fstrcpy( info.acct_desc, "" );
diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index 1d7904f1afc..805f3e4856c 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/rpc_server/srv_spoolss_nt.c
@@ -1542,7 +1542,7 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u,
/* some sanity check because you can open a printer or a print server */
/* aka: \\server\printer or \\server */
- unistr2_to_ascii(name, q_u->printername, sizeof(name)-1);
+ unistr2_to_ascii(name, q_u->printername, sizeof(name));
DEBUGADD(3,("checking name: %s\n",name));
@@ -1990,8 +1990,8 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
return WERR_ACCESS_DENIED;
}
- unistr2_to_ascii(driver, &q_u->driver, sizeof(driver)-1 );
- unistr2_to_ascii(arch, &q_u->arch, sizeof(arch)-1 );
+ 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 */
@@ -2085,8 +2085,8 @@ WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIV
return WERR_ACCESS_DENIED;
}
- unistr2_to_ascii(driver, &q_u->driver, sizeof(driver)-1 );
- unistr2_to_ascii(arch, &q_u->arch, sizeof(arch)-1 );
+ 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) {
@@ -2463,7 +2463,7 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO
goto done;
}
- unistr2_to_ascii(value, valuename, sizeof(value)-1);
+ unistr2_to_ascii(value, valuename, sizeof(value));
if ( Printer->printer_type == SPLHND_SERVER )
status = getprinterdata_printer_server( p->mem_ctx, value, type, data, needed, *out_size );
@@ -2681,7 +2681,7 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE
Printer->notify.option=dup_spool_notify_option(option);
unistr2_to_ascii(Printer->notify.localmachine, localmachine,
- sizeof(Printer->notify.localmachine)-1);
+ sizeof(Printer->notify.localmachine));
/* Connect to the client machine and send a ReplyOpenPrinter */
@@ -4748,7 +4748,7 @@ WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_
* Level 5: same as Level 2
*/
- unistr2_to_ascii(name, servername, sizeof(name)-1);
+ unistr2_to_ascii(name, servername, sizeof(name));
strupper_m(name);
switch (level) {
@@ -5701,7 +5701,7 @@ WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_
*serverminorversion = 0;
fstrcpy(servername, get_server_name( printer ));
- unistr2_to_ascii(architecture, uni_arch, sizeof(architecture)-1);
+ unistr2_to_ascii(architecture, uni_arch, sizeof(architecture));
if (!get_printer_snum(p, handle, &snum, NULL))
return WERR_BADFID;
@@ -7128,8 +7128,8 @@ WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS
*needed = 0;
*returned = 0;
- unistr2_to_ascii(architecture, &q_u->environment, sizeof(architecture)-1);
- unistr2_to_ascii(servername, &q_u->name, sizeof(servername)-1);
+ unistr2_to_ascii(architecture, &q_u->environment, sizeof(architecture));
+ unistr2_to_ascii(servername, &q_u->name, sizeof(servername));
if ( !is_myname_or_ipaddr( servername ) )
return WERR_UNKNOWN_PRINTER_DRIVER;
@@ -7301,7 +7301,7 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *
rpcbuf_move(q_u->buffer, &r_u->buffer);
buffer = r_u->buffer;
- unistr2_to_ascii(form_name, uni_formname, sizeof(form_name)-1);
+ unistr2_to_ascii(form_name, uni_formname, sizeof(form_name));
DEBUG(4,("_spoolss_getform\n"));
DEBUGADD(5,("Offered buffer size [%d]\n", offered));
@@ -7917,8 +7917,8 @@ static WERROR getprinterdriverdir_level_1(UNISTR2 *name, UNISTR2 *uni_environmen
DRIVER_DIRECTORY_1 *info=NULL;
WERROR result = WERR_OK;
- unistr2_to_ascii(servername, name, sizeof(servername)-1);
- unistr2_to_ascii(long_archi, uni_environment, sizeof(long_archi)-1);
+ unistr2_to_ascii(servername, name, sizeof(servername));
+ unistr2_to_ascii(long_archi, uni_environment, sizeof(long_archi));
/* check for beginning double '\'s and that the server
long enough */
@@ -8235,7 +8235,7 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP
if (!W_ERROR_IS_OK(status))
return status;
- unistr2_to_ascii( valuename, value, sizeof(valuename)-1 );
+ unistr2_to_ascii(valuename, value, sizeof(valuename));
/*
* When client side code sets a magic printer data key, detect it and save
@@ -8327,7 +8327,7 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_
if (!W_ERROR_IS_OK(status))
return status;
- unistr2_to_ascii( valuename, value, sizeof(valuename)-1 );
+ unistr2_to_ascii(valuename, value, sizeof(valuename));
status = delete_printer_dataex( printer, SPOOL_PRINTERDATA_KEY, valuename );
@@ -9049,8 +9049,8 @@ WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u,
DEBUG(4,("_spoolss_getprinterdataex\n"));
- unistr2_to_ascii(keyname, &q_u->keyname, sizeof(keyname) - 1);
- unistr2_to_ascii(valuename, &q_u->valuename, sizeof(valuename) - 1);
+ unistr2_to_ascii(keyname, &q_u->keyname, sizeof(keyname));
+ unistr2_to_ascii(valuename, &q_u->valuename, sizeof(valuename));
DEBUG(10, ("_spoolss_getprinterdataex: key => [%s], value => [%s]\n",
keyname, valuename));
@@ -9181,8 +9181,8 @@ WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u,
if (!W_ERROR_IS_OK(status))
return status;
- unistr2_to_ascii( valuename, &q_u->value, sizeof(valuename) - 1);
- unistr2_to_ascii( keyname, &q_u->key, sizeof(keyname) - 1);
+ unistr2_to_ascii( valuename, &q_u->value, sizeof(valuename));
+ unistr2_to_ascii( keyname, &q_u->key, sizeof(keyname));
/* check for OID in valuename */
@@ -9259,8 +9259,8 @@ WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX
if (!W_ERROR_IS_OK(status))
return status;
- unistr2_to_ascii( valuename, value, sizeof(valuename)-1 );
- unistr2_to_ascii( keyname, key, sizeof(keyname)-1 );
+ unistr2_to_ascii(valuename, value, sizeof(valuename));
+ unistr2_to_ascii(keyname, key, sizeof(keyname));
status = delete_printer_dataex( printer, keyname, valuename );
@@ -9308,7 +9308,7 @@ WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPO
/* get the list of subkey names */
- unistr2_to_ascii( key, &q_u->key, sizeof(key)-1 );
+ unistr2_to_ascii(key, &q_u->key, sizeof(key));
data = printer->info_2->data;
num_keys = get_printer_subkeys( data, key, &keynames );
@@ -9383,7 +9383,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) - 1);
+ unistr2_to_ascii(key, &q_u->keyname, sizeof(key));
status = delete_all_printer_data( printer->info_2, key );
@@ -9434,7 +9434,7 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
* --jerry
*/
- unistr2_to_ascii(key, &q_u->key, sizeof(key) - 1);
+ unistr2_to_ascii(key, &q_u->key, sizeof(key));
if ( !strlen(key) ) {
result = WERR_INVALID_PARAM;
goto done;
@@ -9454,7 +9454,7 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
p_data = printer->info_2->data;
- unistr2_to_ascii(key, &q_u->key, sizeof(key) - 1);
+ unistr2_to_ascii(key, &q_u->key, sizeof(key));
if ( (key_index = lookup_printerkey( p_data, key)) == -1 )
{
DEBUG(10,("_spoolss_enumprinterdataex: Unknown keyname [%s]\n", key));
@@ -9571,7 +9571,7 @@ static WERROR getprintprocessordirectory_level_1(UNISTR2 *name,
PRINTPROCESSOR_DIRECTORY_1 *info=NULL;
WERROR result = WERR_OK;
- unistr2_to_ascii(long_archi, environment, sizeof(long_archi)-1);
+ unistr2_to_ascii(long_archi, environment, sizeof(long_archi));
if (!get_short_archi(long_archi))
return WERR_INVALID_ENVIRONMENT;
diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c
index 39066644448..332dc3d9643 100644
--- a/source/rpc_server/srv_srvsvc_nt.c
+++ b/source/rpc_server/srv_srvsvc_nt.c
@@ -1948,14 +1948,16 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
SEC_DESC *psd = NULL;
size_t sd_size;
DATA_BLOB null_pw;
- pstring filename;
+ pstring filename_in;
+ char *filename = NULL;
pstring qualname;
files_struct *fsp = NULL;
SMB_STRUCT_STAT st;
NTSTATUS nt_status;
struct current_user user;
connection_struct *conn = NULL;
- BOOL became_user = False;
+ BOOL became_user = False;
+ TALLOC_CTX *ctx = talloc_tos();
ZERO_STRUCT(st);
@@ -1985,8 +1987,8 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
}
became_user = True;
- unistr2_to_ascii(filename, &q_u->uni_file_name, sizeof(filename));
- nt_status = unix_convert(conn, filename, False, NULL, &st);
+ unistr2_to_ascii(filename_in, &q_u->uni_file_name, sizeof(filename_in));
+ nt_status = unix_convert(ctx, conn, filename_in, False, &filename, NULL, &st);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(3,("_srv_net_file_query_secdesc: bad pathname %s\n", filename));
r_u->status = WERR_ACCESS_DENIED;
@@ -2062,7 +2064,8 @@ error_exit:
WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u,
SRV_R_NET_FILE_SET_SECDESC *r_u)
{
- pstring filename;
+ pstring filename_in;
+ char *filename = NULL;
pstring qualname;
DATA_BLOB null_pw;
files_struct *fsp = NULL;
@@ -2071,6 +2074,7 @@ WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
struct current_user user;
connection_struct *conn = NULL;
BOOL became_user = False;
+ TALLOC_CTX *ctx = talloc_tos();
ZERO_STRUCT(st);
@@ -2100,8 +2104,8 @@ WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_
}
became_user = True;
- unistr2_to_ascii(filename, &q_u->uni_file_name, sizeof(filename));
- nt_status = unix_convert(conn, filename, False, NULL, &st);
+ unistr2_to_ascii(filename_in, &q_u->uni_file_name, sizeof(filename_in));
+ nt_status = unix_convert(ctx, conn, filename, False, &filename, NULL, &st);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(3,("_srv_net_file_set_secdesc: bad pathname %s\n", filename));
r_u->status = WERR_ACCESS_DENIED;
diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c
index 3f4117ffbe5..31a8e2bdfd1 100644
--- a/source/rpcclient/cmd_lsarpc.c
+++ b/source/rpcclient/cmd_lsarpc.c
@@ -86,7 +86,7 @@ static void display_query_info_3(DOM_QUERY_3 d)
{
fstring name;
- unistr2_to_ascii(name, &d.uni_domain_name, d.uni_dom_max_len);
+ unistr2_to_ascii(name, &d.uni_domain_name, sizeof(name));
d_printf("Domain Name: %s\n", name);
d_printf("Domain Sid: %s\n", sid_string_static(&d.dom_sid.sid));
@@ -96,7 +96,7 @@ static void display_query_info_5(DOM_QUERY_5 d)
{
fstring name;
- unistr2_to_ascii(name, &d.uni_domain_name, d.uni_dom_max_len);
+ unistr2_to_ascii(name, &d.uni_domain_name, sizeof(name));
d_printf("Domain Name: %s\n", name);
d_printf("Domain Sid: %s\n", sid_string_static(&d.dom_sid.sid));
@@ -118,9 +118,9 @@ static void display_query_info_12(DOM_QUERY_12 d)
{
fstring dom_name, dns_dom_name, forest_name;
- unistr2_to_ascii(dom_name, &d.uni_nb_dom_name, d.hdr_nb_dom_name.uni_max_len);
- unistr2_to_ascii(dns_dom_name, &d.uni_dns_dom_name, d.hdr_dns_dom_name.uni_max_len);
- unistr2_to_ascii(forest_name, &d.uni_forest_name, d.hdr_forest_name.uni_max_len);
+ unistr2_to_ascii(dom_name, &d.uni_nb_dom_name, sizeof(dom_name));
+ unistr2_to_ascii(dns_dom_name, &d.uni_dns_dom_name, sizeof(dns_dom_name));
+ unistr2_to_ascii(forest_name, &d.uni_forest_name, sizeof(forest_name));
d_printf("Domain NetBios Name: %s\n", dom_name);
d_printf("Domain DNS Name: %s\n", dns_dom_name);
diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c
index dd8cb6afc51..6acac8273cf 100644
--- a/source/rpcclient/cmd_netlogon.c
+++ b/source/rpcclient/cmd_netlogon.c
@@ -338,25 +338,25 @@ static void display_sam_sync(uint32 num_deltas, SAM_DELTA_HDR *hdr_deltas,
case SAM_DELTA_DOMAIN_INFO:
unistr2_to_ascii(name,
&deltas[i].domain_info.uni_dom_name,
- sizeof(name) - 1);
+ sizeof(name));
printf("Domain: %s\n", name);
break;
case SAM_DELTA_GROUP_INFO:
unistr2_to_ascii(name,
&deltas[i].group_info.uni_grp_name,
- sizeof(name) - 1);
+ sizeof(name));
printf("Group: %s\n", name);
break;
case SAM_DELTA_ACCOUNT_INFO:
unistr2_to_ascii(name,
&deltas[i].account_info.uni_acct_name,
- sizeof(name) - 1);
+ sizeof(name));
printf("Account: %s\n", name);
break;
case SAM_DELTA_ALIAS_INFO:
unistr2_to_ascii(name,
&deltas[i].alias_info.uni_als_name,
- sizeof(name) - 1);
+ sizeof(name));
printf("Alias: %s\n", name);
break;
case SAM_DELTA_ALIAS_MEM: {
diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c
index 26b97da19e6..640f0769c38 100644
--- a/source/rpcclient/cmd_samr.c
+++ b/source/rpcclient/cmd_samr.c
@@ -33,7 +33,7 @@ static void display_sam_user_info_7(SAM_USER_INFO_7 *usr)
{
fstring temp;
- unistr2_to_ascii(temp, &usr->uni_name, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_name, sizeof(temp));
printf("\tUser Name :\t%s\n", temp);
}
@@ -60,34 +60,34 @@ static void display_sam_user_info_21(SAM_USER_INFO_21 *usr)
{
fstring temp;
- unistr2_to_ascii(temp, &usr->uni_user_name, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_user_name, sizeof(temp));
printf("\tUser Name :\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_full_name, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_full_name, sizeof(temp));
printf("\tFull Name :\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_home_dir, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_home_dir, sizeof(temp));
printf("\tHome Drive :\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_dir_drive, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_dir_drive, sizeof(temp));
printf("\tDir Drive :\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_profile_path, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_profile_path, sizeof(temp));
printf("\tProfile Path:\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_logon_script, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_logon_script, sizeof(temp));
printf("\tLogon Script:\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_acct_desc, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_acct_desc, sizeof(temp));
printf("\tDescription :\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_workstations, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_workstations, sizeof(temp));
printf("\tWorkstations:\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_comment, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_comment, sizeof(temp));
printf("\tUnknown Str :\t%s\n", temp);
- unistr2_to_ascii(temp, &usr->uni_munged_dial, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &usr->uni_munged_dial, sizeof(temp));
printf("\tRemote Dial :\t%s\n", temp);
printf("\tLogon Time :\t%s\n",
@@ -159,13 +159,13 @@ static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2)
{
fstring name;
- unistr2_to_ascii(name, &info2->uni_domain, sizeof(name) - 1);
+ unistr2_to_ascii(name, &info2->uni_domain, sizeof(name));
printf("Domain:\t\t%s\n", name);
- unistr2_to_ascii(name, &info2->uni_server, sizeof(name) - 1);
+ unistr2_to_ascii(name, &info2->uni_server, sizeof(name));
printf("Server:\t\t%s\n", name);
- unistr2_to_ascii(name, &info2->uni_comment, sizeof(name) - 1);
+ unistr2_to_ascii(name, &info2->uni_comment, sizeof(name));
printf("Comment:\t%s\n", name);
printf("Total Users:\t%d\n", info2->num_domain_usrs);
@@ -190,7 +190,7 @@ static void display_sam_unk_info_4(SAM_UNK_INFO_4 *info4)
{
fstring name;
- unistr2_to_ascii(name, &info4->uni_comment, sizeof(name) - 1);
+ unistr2_to_ascii(name, &info4->uni_comment, sizeof(name));
printf("Comment:\t%s\n", name);
}
@@ -198,7 +198,7 @@ static void display_sam_unk_info_5(SAM_UNK_INFO_5 *info5)
{
fstring name;
- unistr2_to_ascii(name, &info5->uni_domain, sizeof(name) - 1);
+ unistr2_to_ascii(name, &info5->uni_domain, sizeof(name));
printf("Domain:\t\t%s\n", name);
}
@@ -206,7 +206,7 @@ static void display_sam_unk_info_6(SAM_UNK_INFO_6 *info6)
{
fstring name;
- unistr2_to_ascii(name, &info6->uni_server, sizeof(name) - 1);
+ unistr2_to_ascii(name, &info6->uni_server, sizeof(name));
printf("Server:\t\t%s\n", name);
}
@@ -252,13 +252,13 @@ static void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1)
printf("RID: 0x%x ", e1->rid_user);
printf("acb: 0x%x ", e1->acb_info);
- unistr2_to_ascii(tmp, &s1->uni_acct_name, sizeof(tmp)-1);
+ unistr2_to_ascii(tmp, &s1->uni_acct_name, sizeof(tmp));
printf("Account: %s\t", tmp);
- unistr2_to_ascii(tmp, &s1->uni_full_name, sizeof(tmp)-1);
+ unistr2_to_ascii(tmp, &s1->uni_full_name, sizeof(tmp));
printf("Name: %s\t", tmp);
- unistr2_to_ascii(tmp, &s1->uni_acct_desc, sizeof(tmp)-1);
+ unistr2_to_ascii(tmp, &s1->uni_acct_desc, sizeof(tmp));
printf("Desc: %s\n", tmp);
}
@@ -270,10 +270,10 @@ static void display_sam_info_2(SAM_ENTRY2 *e2, SAM_STR2 *s2)
printf("RID: 0x%x ", e2->rid_user);
printf("acb: 0x%x ", e2->acb_info);
- unistr2_to_ascii(tmp, &s2->uni_srv_name, sizeof(tmp)-1);
+ unistr2_to_ascii(tmp, &s2->uni_srv_name, sizeof(tmp));
printf("Account: %s\t", tmp);
- unistr2_to_ascii(tmp, &s2->uni_srv_desc, sizeof(tmp)-1);
+ unistr2_to_ascii(tmp, &s2->uni_srv_desc, sizeof(tmp));
printf("Name: %s\n", tmp);
}
@@ -286,10 +286,10 @@ static void display_sam_info_3(SAM_ENTRY3 *e3, SAM_STR3 *s3)
printf("RID: 0x%x ", e3->rid_grp);
printf("attr: 0x%x ", e3->attr);
- unistr2_to_ascii(tmp, &s3->uni_grp_name, sizeof(tmp)-1);
+ unistr2_to_ascii(tmp, &s3->uni_grp_name, sizeof(tmp));
printf("Account: %s\t", tmp);
- unistr2_to_ascii(tmp, &s3->uni_grp_desc, sizeof(tmp)-1);
+ unistr2_to_ascii(tmp, &s3->uni_grp_desc, sizeof(tmp));
printf("Name: %s\n", tmp);
}
@@ -450,9 +450,9 @@ static void display_group_info1(GROUP_INFO1 *info1)
{
fstring temp;
- unistr2_to_ascii(temp, &info1->uni_acct_name, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &info1->uni_acct_name, sizeof(temp));
printf("\tGroup Name:\t%s\n", temp);
- unistr2_to_ascii(temp, &info1->uni_acct_desc, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &info1->uni_acct_desc, sizeof(temp));
printf("\tDescription:\t%s\n", temp);
printf("\tGroup Attribute:%d\n", info1->group_attr);
printf("\tNum Members:%d\n", info1->num_members);
@@ -465,7 +465,7 @@ static void display_group_info2(GROUP_INFO2 *info2)
{
fstring name;
- unistr2_to_ascii(name, &info2->uni_acct_name, sizeof(name)-1);
+ unistr2_to_ascii(name, &info2->uni_acct_name, sizeof(name));
printf("\tGroup Description:%s\n", name);
}
@@ -486,7 +486,7 @@ static void display_group_info4(GROUP_INFO4 *info4)
{
fstring desc;
- unistr2_to_ascii(desc, &info4->uni_acct_desc, sizeof(desc)-1);
+ unistr2_to_ascii(desc, &info4->uni_acct_desc, sizeof(desc));
printf("\tGroup Description:%s\n", desc);
}
@@ -497,9 +497,9 @@ static void display_group_info5(GROUP_INFO5 *info5)
{
fstring temp;
- unistr2_to_ascii(temp, &info5->uni_acct_name, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &info5->uni_acct_name, sizeof(temp));
printf("\tGroup Name:\t%s\n", temp);
- unistr2_to_ascii(temp, &info5->uni_acct_desc, sizeof(temp)-1);
+ unistr2_to_ascii(temp, &info5->uni_acct_desc, sizeof(temp));
printf("\tDescription:\t%s\n", temp);
printf("\tGroup Attribute:%d\n", info5->group_attr);
printf("\tNum Members:%d\n", info5->num_members);
diff --git a/source/rpcclient/cmd_srvsvc.c b/source/rpcclient/cmd_srvsvc.c
index 02b692decc6..572609981dd 100644
--- a/source/rpcclient/cmd_srvsvc.c
+++ b/source/rpcclient/cmd_srvsvc.c
@@ -141,8 +141,8 @@ static void display_srv_info_101(SRV_INFO_101 *sv101)
fstring name;
fstring comment;
- unistr2_to_ascii(name, &sv101->uni_name, sizeof(name) - 1);
- unistr2_to_ascii(comment, &sv101->uni_comment, sizeof(comment) - 1);
+ unistr2_to_ascii(name, &sv101->uni_name, sizeof(name));
+ unistr2_to_ascii(comment, &sv101->uni_comment, sizeof(comment));
display_server(name, sv101->srv_type, comment);
@@ -159,9 +159,9 @@ static void display_srv_info_102(SRV_INFO_102 *sv102)
fstring comment;
fstring usr_path;
- unistr2_to_ascii(name, &sv102->uni_name, sizeof(name) - 1);
- unistr2_to_ascii(comment, &sv102->uni_comment, sizeof(comment) - 1);
- unistr2_to_ascii(usr_path, &sv102->uni_usr_path, sizeof(usr_path) - 1);
+ unistr2_to_ascii(name, &sv102->uni_name, sizeof(name));
+ unistr2_to_ascii(comment, &sv102->uni_comment, sizeof(comment));
+ unistr2_to_ascii(usr_path, &sv102->uni_usr_path, sizeof(usr_path));
display_server(name, sv102->srv_type, comment);
diff --git a/source/script/count_80_col.pl b/source/script/count_80_col.pl
new file mode 100755
index 00000000000..8b226228c97
--- /dev/null
+++ b/source/script/count_80_col.pl
@@ -0,0 +1,16 @@
+#!/usr/bin/perl -w
+
+open( INFILE, "$ARGV[0]" ) || die $@;
+
+$count = 0;
+while ( <INFILE> ) {
+ next if ($_ =~ /^#define/);
+ $count++ if (length($_) > 80);
+}
+
+close( INFILE );
+print "$ARGV[0]: $count lines > 80 characters\n" if ($count > 0);
+
+exit( 0 );
+
+
diff --git a/source/script/format_indent.sh b/source/script/format_indent.sh
new file mode 100755
index 00000000000..2af1ab41fae
--- /dev/null
+++ b/source/script/format_indent.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# -npro Do no read the '.indent.pro' files.
+# -kr Use K&R formatting rules
+# -i8 Set indentation level to 8 spaces.
+# -ts8 Set tab size to 8 spaces
+# -sob Swallow optional blank lines.
+# -l80 Set the maximum line length at 80 characters.
+# -ss On one-line for and while statments, force a blank before the semicolon
+# -ncs Do not put a space after cast operators.
+
+indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs "$@"
diff --git a/source/script/mkproto.awk b/source/script/mkproto.awk
index 65a10c856e0..fd38235e4e7 100644
--- a/source/script/mkproto.awk
+++ b/source/script/mkproto.awk
@@ -139,7 +139,7 @@ END {
gotstart = 1;
}
- if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|^SMB_BIG_INT/ ) {
+ if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^struct|^bool|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|^SMB_BIG_INT/ ) {
gotstart = 1;
}
diff --git a/source/script/strip_trail_ws.pl b/source/script/strip_trail_ws.pl
new file mode 100755
index 00000000000..c2c39e21e3c
--- /dev/null
+++ b/source/script/strip_trail_ws.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -w
+
+open( INFILE, "$ARGV[0]" ) || die $@;
+open( OUTFILE, ">$ARGV[0].new" ) || die $@;
+
+while ( <INFILE> ) {
+ $_ =~ s/[ \t\r]*$//;
+ print OUTFILE "$_";
+}
+
+close( INFILE );
+close( OUTFILE );
+
+rename( "$ARGV[0].new", "$ARGV[0]" ) || die @_;
+
+exit( 0 );
+
+
diff --git a/source/script/tests/test_posix_s3.sh b/source/script/tests/test_posix_s3.sh
index 975b0afc032..11c4ed77962 100755
--- a/source/script/tests/test_posix_s3.sh
+++ b/source/script/tests/test_posix_s3.sh
@@ -33,6 +33,7 @@ raw="$raw RAW-QFILEINFO RAW-QFSINFO RAW-READ RAW-RENAME RAW-SEARCH RAW-SEEK"
raw="$raw RAW-SFILEINFO RAW-SFILEINFO-BUG RAW-STREAMS RAW-UNLINK RAW-WRITE"
raw="$raw RAW-SAMBA3HIDE RAW-SAMBA3BADPATH RAW-SFILEINFO-RENAME"
raw="$raw RAW-SAMBA3CASEINSENSITIVE RAW-SAMBA3POSIXTIMEDLOCK"
+raw="$raw RAW-SAMBA3ROOTDIRFID"
rpc="RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC"
rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC"
diff --git a/source/smbd/close.c b/source/smbd/close.c
index dd4f28ee948..ae45aaa6dac 100644
--- a/source/smbd/close.c
+++ b/source/smbd/close.c
@@ -1,20 +1,20 @@
-/*
+/*
Unix SMB/CIFS implementation.
file closing
Copyright (C) Andrew Tridgell 1992-1998
Copyright (C) Jeremy Allison 1992-2007.
Copyright (C) Volker Lendecke 2005
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,60 +29,73 @@ extern struct current_user current_user;
static void check_magic(files_struct *fsp,connection_struct *conn)
{
- if (!*lp_magicscript(SNUM(conn)))
+ int ret;
+ const char *magic_output = NULL;
+ SMB_STRUCT_STAT st;
+ int tmp_fd, outfd;
+ TALLOC_CTX *ctx = NULL;
+ const char *p;
+
+ if (!*lp_magicscript(SNUM(conn))) {
return;
+ }
DEBUG(5,("checking magic for %s\n",fsp->fsp_name));
- {
- char *p;
- if (!(p = strrchr_m(fsp->fsp_name,'/')))
- p = fsp->fsp_name;
- else
- p++;
-
- if (!strequal(lp_magicscript(SNUM(conn)),p))
- return;
- }
-
- {
- int ret;
- pstring magic_output;
- pstring fname;
- SMB_STRUCT_STAT st;
- int tmp_fd, outfd;
-
- pstrcpy(fname,fsp->fsp_name);
- if (*lp_magicoutput(SNUM(conn)))
- pstrcpy(magic_output,lp_magicoutput(SNUM(conn)));
- else
- slprintf(magic_output,sizeof(fname)-1, "%s.out",fname);
-
- chmod(fname,0755);
- ret = smbrun(fname,&tmp_fd);
- DEBUG(3,("Invoking magic command %s gave %d\n",fname,ret));
- unlink(fname);
- if (ret != 0 || tmp_fd == -1) {
- if (tmp_fd != -1)
- close(tmp_fd);
- return;
- }
- outfd = open(magic_output, O_CREAT|O_EXCL|O_RDWR, 0600);
- if (outfd == -1) {
- close(tmp_fd);
- return;
- }
+ if (!(p = strrchr_m(fsp->fsp_name,'/'))) {
+ p = fsp->fsp_name;
+ } else {
+ p++;
+ }
+
+ if (!strequal(lp_magicscript(SNUM(conn)),p)) {
+ return;
+ }
+
+ ctx = talloc_stackframe();
- if (sys_fstat(tmp_fd,&st) == -1) {
+ if (*lp_magicoutput(SNUM(conn))) {
+ magic_output = lp_magicoutput(SNUM(conn));
+ } else {
+ magic_output = talloc_asprintf(ctx,
+ "%s.out",
+ fsp->fsp_name);
+ }
+ if (!magic_output) {
+ TALLOC_FREE(ctx);
+ return;
+ }
+
+ chmod(fsp->fsp_name,0755);
+ ret = smbrun(fsp->fsp_name,&tmp_fd);
+ DEBUG(3,("Invoking magic command %s gave %d\n",
+ fsp->fsp_name,ret));
+
+ unlink(fsp->fsp_name);
+ if (ret != 0 || tmp_fd == -1) {
+ if (tmp_fd != -1) {
close(tmp_fd);
- close(outfd);
- return;
}
+ TALLOC_FREE(ctx);
+ return;
+ }
+ outfd = open(magic_output, O_CREAT|O_EXCL|O_RDWR, 0600);
+ if (outfd == -1) {
+ close(tmp_fd);
+ TALLOC_FREE(ctx);
+ return;
+ }
- transfer_file(tmp_fd,outfd,(SMB_OFF_T)st.st_size);
+ if (sys_fstat(tmp_fd,&st) == -1) {
close(tmp_fd);
close(outfd);
+ return;
}
+
+ transfer_file(tmp_fd,outfd,(SMB_OFF_T)st.st_size);
+ close(tmp_fd);
+ close(outfd);
+ TALLOC_FREE(ctx);
}
/****************************************************************************
@@ -90,7 +103,7 @@ static void check_magic(files_struct *fsp,connection_struct *conn)
****************************************************************************/
static NTSTATUS close_filestruct(files_struct *fsp)
-{
+{
NTSTATUS status = NT_STATUS_OK;
connection_struct *conn = fsp->conn;
@@ -492,7 +505,8 @@ static NTSTATUS close_directory(files_struct *fsp, enum file_close_type close_ty
TALLOC_FREE(lck);
- status = rmdir_internals(fsp->conn, fsp->fsp_name);
+ status = rmdir_internals(talloc_tos(),
+ fsp->conn, fsp->fsp_name);
DEBUG(5,("close_directory: %s. Delete on close was set - "
"deleting directory returned %s.\n",
diff --git a/source/smbd/dfree.c b/source/smbd/dfree.c
index 2290558f0a7..94394686009 100644
--- a/source/smbd/dfree.c
+++ b/source/smbd/dfree.c
@@ -81,10 +81,18 @@ SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, BOOL small
dfree_command = lp_dfree_command(SNUM(conn));
if (dfree_command && *dfree_command) {
const char *p;
- char **lines;
- pstring syscmd;
+ char **lines = NULL;
+ char *syscmd = NULL;
+
+ syscmd = talloc_asprintf(talloc_tos(),
+ "%s %s",
+ dfree_command,
+ path);
+
+ if (!syscmd) {
+ return (SMB_BIG_UINT)-1;
+ }
- slprintf(syscmd, sizeof(syscmd)-1, "%s %s", dfree_command, path);
DEBUG (3, ("disk_free: Running command %s\n", syscmd));
lines = file_lines_pload(syscmd, NULL);
diff --git a/source/smbd/dir.c b/source/smbd/dir.c
index eec8fa12ef8..a7b1b020b83 100644
--- a/source/smbd/dir.c
+++ b/source/smbd/dir.c
@@ -1,18 +1,19 @@
-/*
+/*
Unix SMB/CIFS implementation.
Directory handling routines
Copyright (C) Andrew Tridgell 1992-1998
-
+ Copyright (C) Jeremy Allison 2007
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -72,15 +73,25 @@ static int dirhandles_open = 0;
Make a dir struct.
****************************************************************************/
-void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,uint32 mode,time_t date, BOOL uc)
-{
+BOOL make_dir_struct(TALLOC_CTX *ctx,
+ char *buf,
+ const char *mask,
+ const char *fname,
+ SMB_OFF_T size,
+ uint32 mode,
+ time_t date,
+ BOOL uc)
+{
char *p;
- pstring mask2;
+ char *mask2 = talloc_strdup(ctx, mask);
- pstrcpy(mask2,mask);
+ if (!mask2) {
+ return False;
+ }
- if ((mode & aDIR) != 0)
+ if ((mode & aDIR) != 0) {
size = 0;
+ }
memset(buf+1,' ',11);
if ((p = strchr_m(mask2,'.')) != NULL) {
@@ -88,8 +99,9 @@ void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T si
push_ascii(buf+1,mask2,8, 0);
push_ascii(buf+9,p+1,3, 0);
*p = '.';
- } else
+ } else {
push_ascii(buf+1,mask2,11, 0);
+ }
memset(buf+21,'\0',DIR_STRUCT_SIZE-21);
SCVAL(buf,21,mode);
@@ -100,6 +112,7 @@ void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T si
Strange, but verified on W2K3. Needed for OS/2. JRA. */
push_ascii(buf+30,fname,12, uc ? STR_UPPER : 0);
DEBUG(8,("put name [%s] from [%s] into dir struct\n",buf+30, fname));
+ return True;
}
/****************************************************************************
@@ -238,7 +251,7 @@ static void dptr_close_internal(struct dptr_struct *dptr)
DLIST_REMOVE(dirptrs, dptr);
- /*
+ /*
* Free the dnum in the bitmap. Remember the dnum value is always
* biased by one with respect to the bitmap.
*/
@@ -380,12 +393,11 @@ static void dptr_close_oldest(BOOL old)
wcard must not be zero.
****************************************************************************/
-NTSTATUS dptr_create(connection_struct *conn, pstring path, BOOL old_handle, BOOL expect_close,uint16 spid,
+NTSTATUS dptr_create(connection_struct *conn, const char *path, BOOL old_handle, BOOL expect_close,uint16 spid,
const char *wcard, BOOL wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret)
{
struct dptr_struct *dptr = NULL;
struct smb_Dir *dir_hnd;
- const char *dir2;
NTSTATUS status;
DEBUG(5,("dptr_create dir=%s\n", path));
@@ -399,17 +411,12 @@ NTSTATUS dptr_create(connection_struct *conn, pstring path, BOOL old_handle, BOO
return status;
}
- /* use a const pointer from here on */
- dir2 = path;
- if (!*dir2)
- dir2 = ".";
-
- dir_hnd = OpenDir(conn, dir2, wcard, attr);
+ dir_hnd = OpenDir(conn, path, wcard, attr);
if (!dir_hnd) {
return map_nt_error_from_unix(errno);
}
- string_set(&conn->dirpath,dir2);
+ string_set(&conn->dirpath,path);
if (dirhandles_open >= MAX_OPEN_DIRECTORIES) {
dptr_idleoldest();
@@ -488,7 +495,7 @@ NTSTATUS dptr_create(connection_struct *conn, pstring path, BOOL old_handle, BOO
dptr->dnum += 1; /* Always bias the dnum by one - no zero dnums allowed. */
- string_set(&dptr->path,dir2);
+ string_set(&dptr->path,path);
dptr->conn = conn;
dptr->dir_hnd = dir_hnd;
dptr->spid = spid;
@@ -569,7 +576,10 @@ static const char *dptr_normal_ReadDirName(struct dptr_struct *dptr, long *poffs
Return the next visible file name, skipping veto'd and invisible files.
****************************************************************************/
-const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT_STAT *pst)
+const char *dptr_ReadDirName(TALLOC_CTX *ctx,
+ struct dptr_struct *dptr,
+ long *poffset,
+ SMB_STRUCT_STAT *pst)
{
SET_STAT_INVALID(*pst);
@@ -584,7 +594,7 @@ const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT
}
if (!dptr->did_stat) {
- pstring pathreal;
+ char *pathreal = NULL;
/* We know the stored wcard contains no wildcard characters. See if we can match
with a stat call. If we can't, then set did_stat to true to
@@ -608,14 +618,19 @@ const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT
return dptr->wcard;
}
- pstrcpy(pathreal,dptr->path);
- pstrcat(pathreal,"/");
- pstrcat(pathreal,dptr->wcard);
+ pathreal = talloc_asprintf(ctx,
+ "%s/%s",
+ dptr->path,
+ dptr->wcard);
+ if (!pathreal) {
+ return NULL;
+ }
if (SMB_VFS_STAT(dptr->conn,pathreal,pst) == 0) {
/* We need to set the underlying dir_hnd offset to -1 also as
this function is usually called with the output from TellDir. */
dptr->dir_hnd->offset = *poffset = END_OF_DIRECTORY_OFFSET;
+ TALLOC_FREE(pathreal);
return dptr->wcard;
} else {
/* If we get any other error than ENOENT or ENOTDIR
@@ -624,10 +639,13 @@ const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT
/* We need to set the underlying dir_hdn offset to -1 also as
this function is usually called with the output from TellDir. */
dptr->dir_hnd->offset = *poffset = END_OF_DIRECTORY_OFFSET;
+ TALLOC_FREE(pathreal);
return dptr->wcard;
}
}
+ TALLOC_FREE(pathreal);
+
/* In case sensitive mode we don't search - we know if it doesn't exist
with a stat we will fail. */
@@ -758,45 +776,59 @@ BOOL dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype)
return True;
}
-static BOOL mangle_mask_match(connection_struct *conn, fstring filename, char *mask)
+static BOOL mangle_mask_match(connection_struct *conn,
+ const char *filename,
+ const char *mask)
{
- mangle_map(filename,True,False,conn->params);
- return mask_match_search(filename,mask,False);
+ char mname[13];
+
+ if (!name_to_8_3(filename,mname,False,conn->params)) {
+ return False;
+ }
+ return mask_match_search(mname,mask,False);
}
/****************************************************************************
Get an 8.3 directory entry.
****************************************************************************/
-BOOL get_dir_entry(connection_struct *conn,char *mask,uint32 dirtype, pstring fname,
- SMB_OFF_T *size,uint32 *mode,time_t *date,BOOL check_descend)
+BOOL get_dir_entry(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ const char *mask,
+ uint32 dirtype,
+ char **pp_fname_out,
+ SMB_OFF_T *size,
+ uint32 *mode,
+ time_t *date,
+ BOOL check_descend)
{
- const char *dname;
+ const char *dname = NULL;
BOOL found = False;
SMB_STRUCT_STAT sbuf;
- pstring path;
- pstring pathreal;
- pstring filename;
+ char *pathreal = NULL;
+ const char *filename = NULL;
BOOL needslash;
- *path = *pathreal = *filename = 0;
+ *pp_fname_out = NULL;
needslash = ( conn->dirpath[strlen(conn->dirpath) -1] != '/');
- if (!conn->dirptr)
+ if (!conn->dirptr) {
return(False);
+ }
while (!found) {
long curoff = dptr_TellDir(conn->dirptr);
- dname = dptr_ReadDirName(conn->dirptr, &curoff, &sbuf);
+ dname = dptr_ReadDirName(ctx, conn->dirptr, &curoff, &sbuf);
DEBUG(6,("readdir on dirptr 0x%lx now at offset %ld\n",
(long)conn->dirptr,TellDir(conn->dirptr->dir_hnd)));
-
- if (dname == NULL)
+
+ if (dname == NULL) {
return(False);
-
- pstrcpy(filename,dname);
+ }
+
+ filename = dname;
/* notice the special *.* handling. This appears to be the only difference
between the wildcard handling in this routine and in the trans2 routines.
@@ -805,39 +837,65 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,uint32 dirtype, pstring fn
if ((strcmp(mask,"*.*") == 0) ||
mask_match_search(filename,mask,False) ||
mangle_mask_match(conn,filename,mask)) {
+ char mname[13];
+
+ if (!mangle_is_8_3(filename, False, conn->params)) {
+ if (!name_to_8_3(filename,mname,False,
+ conn->params)) {
+ continue;
+ }
+ filename = mname;
+ }
+
+ if (needslash) {
+ pathreal = talloc_asprintf(ctx,
+ "%s/%s",
+ conn->dirpath,
+ dname);
+ } else {
+ pathreal = talloc_asprintf(ctx,
+ "%s%s",
+ conn->dirpath,
+ dname);
+ }
+ if (!pathreal) {
+ return False;
+ }
- if (!mangle_is_8_3(filename, False, conn->params))
- mangle_map(filename,True,False,
- conn->params);
-
- pstrcpy(fname,filename);
- *path = 0;
- pstrcpy(path,conn->dirpath);
- if(needslash)
- pstrcat(path,"/");
- pstrcpy(pathreal,path);
- pstrcat(path,fname);
- pstrcat(pathreal,dname);
if (!VALID_STAT(sbuf) && (SMB_VFS_STAT(conn, pathreal, &sbuf)) != 0) {
- DEBUG(5,("Couldn't stat 1 [%s]. Error = %s\n",path, strerror(errno) ));
+ DEBUG(5,("Couldn't stat 1 [%s]. Error = %s\n",
+ pathreal, strerror(errno) ));
+ TALLOC_FREE(pathreal);
continue;
}
-
+
*mode = dos_mode(conn,pathreal,&sbuf);
if (!dir_check_ftype(conn,*mode,dirtype)) {
DEBUG(5,("[%s] attribs 0x%x didn't match 0x%x\n",filename,(unsigned int)*mode,(unsigned int)dirtype));
+ TALLOC_FREE(pathreal);
continue;
}
*size = sbuf.st_size;
*date = sbuf.st_mtime;
- DEBUG(3,("get_dir_entry mask=[%s] found %s fname=%s\n",mask, pathreal,fname));
+ DEBUG(3,("get_dir_entry mask=[%s] found %s "
+ "fname=%s (%s)\n",
+ mask,
+ pathreal,
+ dname,
+ filename));
found = True;
+ *pp_fname_out = talloc_strdup(ctx, filename);
+ if (!*pp_fname_out) {
+ return False;
+ }
+
DirCacheAdd(conn->dirptr->dir_hnd, dname, curoff);
+ TALLOC_FREE(pathreal);
}
}
@@ -1015,7 +1073,6 @@ BOOL is_visible_file(connection_struct *conn, const char *dir_path, const char *
}
if (hide_unreadable || hide_unwriteable || hide_special) {
- pstring link_target;
char *entry = NULL;
if (asprintf(&entry, "%s/%s", dir_path, name) == -1) {
@@ -1025,7 +1082,7 @@ BOOL is_visible_file(connection_struct *conn, const char *dir_path, const char *
/* If it's a dfs symlink, ignore _hide xxxx_ options */
if (lp_host_msdfs() &&
lp_msdfs_root(SNUM(conn)) &&
- is_msdfs_link(conn, entry, link_target, NULL)) {
+ is_msdfs_link(conn, entry, NULL)) {
SAFE_FREE(entry);
return True;
}
@@ -1194,7 +1251,7 @@ void SeekDir(struct smb_Dir *dirp, long offset)
if (offset != dirp->offset) {
if (offset == START_OF_DIRECTORY_OFFSET) {
RewindDir(dirp, &offset);
- /*
+ /*
* Ok we should really set the file number here
* to 1 to enable ".." to be returned next. Trouble
* is I'm worried about callers using SeekDir(dirp,0)
diff --git a/source/smbd/filename.c b/source/smbd/filename.c
index 5f9563b83c8..fb8ed07ee8e 100644
--- a/source/smbd/filename.c
+++ b/source/smbd/filename.c
@@ -2,7 +2,7 @@
Unix SMB/CIFS implementation.
filename handling routines
Copyright (C) Andrew Tridgell 1992-1998
- Copyright (C) Jeremy Allison 1999-2004
+ Copyright (C) Jeremy Allison 1999-2007
Copyright (C) Ying Chen 2000
Copyright (C) Volker Lendecke 2007
@@ -37,11 +37,12 @@ static BOOL mangled_equal(const char *name1,
const char *name2,
const struct share_params *p)
{
- pstring tmpname;
+ char mname[13];
- pstrcpy(tmpname, name2);
- mangle_map(tmpname, True, False, p);
- return strequal(name1, tmpname);
+ if (!name_to_8_3(name2, mname, False, p)) {
+ return False;
+ }
+ return strequal(name1, mname);
}
/****************************************************************************
@@ -106,10 +107,12 @@ stat struct will be filled with zeros (and this can be detected by checking
for nlinks = 0, which can never be true for any file).
****************************************************************************/
-NTSTATUS unix_convert(connection_struct *conn,
- pstring orig_path,
+NTSTATUS unix_convert(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ const char *orig_path,
BOOL allow_wcard_last_component,
- char *saved_last_component,
+ char **pp_conv_path,
+ char **pp_saved_last_component,
SMB_STRUCT_STAT *pst)
{
SMB_STRUCT_STAT st;
@@ -121,14 +124,17 @@ NTSTATUS unix_convert(connection_struct *conn,
NTSTATUS result;
SET_STAT_INVALID(*pst);
-
- if(saved_last_component) {
- *saved_last_component = 0;
+ *pp_conv_path = NULL;
+ if(pp_saved_last_component) {
+ *pp_saved_last_component = NULL;
}
if (conn->printer) {
/* we don't ever use the filenames on a printer share as a
filename - so don't convert them */
+ if (!(*pp_conv_path = talloc_strdup(ctx,orig_path))) {
+ return NT_STATUS_NO_MEMORY;
+ }
return NT_STATUS_OK;
}
@@ -157,11 +163,13 @@ NTSTATUS unix_convert(connection_struct *conn,
*/
if (!*orig_path) {
- if (!(name = SMB_STRDUP("."))) {
+ if (!(name = talloc_strdup(ctx,"."))) {
return NT_STATUS_NO_MEMORY;
}
if (SMB_VFS_STAT(conn,name,&st) == 0) {
*pst = st;
+ } else {
+ return map_nt_error_from_unix(errno);
}
DEBUG(5,("conversion finished \"\" -> %s\n",name));
goto done;
@@ -183,17 +191,18 @@ NTSTATUS unix_convert(connection_struct *conn,
* Ensure saved_last_component is valid even if file exists.
*/
- if(saved_last_component) {
+ if(pp_saved_last_component) {
end = strrchr_m(orig_path, '/');
if (end) {
- pstrcpy(saved_last_component, end + 1);
+ *pp_saved_last_component = talloc_strdup(ctx, end + 1);
} else {
- pstrcpy(saved_last_component, orig_path);
+ *pp_saved_last_component = talloc_strdup(ctx,
+ orig_path);
}
}
- if (!(name = SMB_STRDUP(orig_path))) {
- DEBUG(0, ("strdup failed\n"));
+ if (!(name = talloc_strdup(ctx, orig_path))) {
+ DEBUG(0, ("talloc_strdup failed\n"));
return NT_STATUS_NO_MEMORY;
}
@@ -224,9 +233,9 @@ NTSTATUS unix_convert(connection_struct *conn,
* building the directories with asprintf and free it.
*/
- if ((dirpath == NULL) && (!(dirpath = SMB_STRDUP("")))) {
- DEBUG(0, ("strdup failed\n"));
- SAFE_FREE(name);
+ if ((dirpath == NULL) && (!(dirpath = talloc_strdup(ctx,"")))) {
+ DEBUG(0, ("talloc_strdup failed\n"));
+ TALLOC_FREE(name);
return NT_STATUS_NO_MEMORY;
}
@@ -264,8 +273,7 @@ NTSTATUS unix_convert(connection_struct *conn,
*/
if (conn->case_sensitive &&
- !mangle_is_mangled(name, conn->params) &&
- !*lp_mangled_map(conn->params)) {
+ !mangle_is_mangled(name, conn->params)) {
goto done;
}
@@ -302,8 +310,14 @@ NTSTATUS unix_convert(connection_struct *conn,
*end = 0;
}
- if (saved_last_component != 0) {
- pstrcpy(saved_last_component, end ? end + 1 : start);
+ if (pp_saved_last_component) {
+ TALLOC_FREE(*pp_saved_last_component);
+ *pp_saved_last_component = talloc_strdup(ctx,
+ end ? end + 1 : start);
+ if (!*pp_saved_last_component) {
+ DEBUG(0, ("talloc failed\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
}
/* The name cannot have a component of "." */
@@ -473,25 +487,27 @@ NTSTATUS unix_convert(connection_struct *conn,
*/
if (mangle_is_mangled(start, conn->params)
- && mangle_check_cache_alloc(start,
- &unmangled,
- conn->params)) {
+ && mangle_lookup_name_from_8_3(ctx,
+ start,
+ &unmangled,
+ conn->params)) {
char *tmp;
size_t start_ofs = start - name;
if (*dirpath != '\0') {
- asprintf(&tmp, "%s/%s", dirpath,
- unmangled);
- SAFE_FREE(unmangled);
+ tmp = talloc_asprintf(ctx,
+ "%s/%s", dirpath,
+ unmangled);
+ TALLOC_FREE(unmangled);
}
else {
tmp = unmangled;
}
if (tmp == NULL) {
- DEBUG(0, ("malloc failed\n"));
- result = NT_STATUS_NO_MEMORY;
+ DEBUG(0, ("talloc failed\n"));
+ return NT_STATUS_NO_MEMORY;
}
- SAFE_FREE(name);
+ TALLOC_FREE(name);
name = tmp;
start = name + start_ofs;
end = start + strlen(start);
@@ -511,18 +527,20 @@ NTSTATUS unix_convert(connection_struct *conn,
size_t start_ofs = start - name;
if (*dirpath != '\0') {
- asprintf(&tmp, "%s/%s/%s", dirpath,
- found_name, end+1);
+ tmp = talloc_asprintf(ctx,
+ "%s/%s/%s", dirpath,
+ found_name, end+1);
}
else {
- asprintf(&tmp, "%s/%s", found_name,
- end+1);
+ tmp = talloc_asprintf(ctx,
+ "%s/%s", found_name,
+ end+1);
}
if (tmp == NULL) {
- DEBUG(0, ("asprintf failed\n"));
- result = NT_STATUS_NO_MEMORY;
+ DEBUG(0, ("talloc_asprintf failed\n"));
+ return NT_STATUS_NO_MEMORY;
}
- SAFE_FREE(name);
+ TALLOC_FREE(name);
name = tmp;
start = name + start_ofs;
end = start + strlen(found_name);
@@ -532,18 +550,18 @@ NTSTATUS unix_convert(connection_struct *conn,
size_t start_ofs = start - name;
if (*dirpath != '\0') {
- asprintf(&tmp, "%s/%s", dirpath,
- found_name);
- }
- else {
- tmp = SMB_STRDUP(found_name);
+ tmp = talloc_asprintf(ctx,
+ "%s/%s", dirpath,
+ found_name);
+ } else {
+ tmp = talloc_strdup(ctx,
+ found_name);
}
if (tmp == NULL) {
- DEBUG(0, ("malloc failed\n"));
- result = NT_STATUS_NO_MEMORY;
- goto fail;
+ DEBUG(0, ("talloc failed\n"));
+ return NT_STATUS_NO_MEMORY;
}
- SAFE_FREE(name);
+ TALLOC_FREE(name);
name = tmp;
start = name + start_ofs;
@@ -560,7 +578,7 @@ NTSTATUS unix_convert(connection_struct *conn,
}
}
- SAFE_FREE(found_name);
+ TALLOC_FREE(found_name);
} /* end else */
#ifdef DEVELOPER
@@ -577,19 +595,19 @@ NTSTATUS unix_convert(connection_struct *conn,
*/
if (*dirpath != '\0') {
- char *tmp;
-
- if (asprintf(&tmp, "%s/%s", dirpath, start) == -1) {
- DEBUG(0, ("asprintf failed\n"));
+ char *tmp = talloc_asprintf(ctx,
+ "%s/%s", dirpath, start);
+ if (!tmp) {
+ DEBUG(0, ("talloc_asprintf failed\n"));
return NT_STATUS_NO_MEMORY;
}
- SAFE_FREE(dirpath);
+ TALLOC_FREE(dirpath);
dirpath = tmp;
}
else {
- SAFE_FREE(dirpath);
- if (!(dirpath = SMB_STRDUP(start))) {
- DEBUG(0, ("strdup failed\n"));
+ TALLOC_FREE(dirpath);
+ if (!(dirpath = talloc_strdup(ctx,start))) {
+ DEBUG(0, ("talloc_strdup failed\n"));
return NT_STATUS_NO_MEMORY;
}
}
@@ -628,17 +646,23 @@ NTSTATUS unix_convert(connection_struct *conn,
DEBUG(5,("conversion finished %s -> %s\n",orig_path, name));
done:
- pstrcpy(orig_path, name);
- SAFE_FREE(name);
- SAFE_FREE(dirpath);
+ *pp_conv_path = name;
+ TALLOC_FREE(dirpath);
return NT_STATUS_OK;
fail:
DEBUG(10, ("dirpath = [%s] start = [%s]\n", dirpath, start));
- pstrcpy(orig_path, dirpath);
- pstrcat(orig_path, "/");
- pstrcat(orig_path, start);
- SAFE_FREE(name);
- SAFE_FREE(dirpath);
+ if (*dirpath != '\0') {
+ *pp_conv_path = talloc_asprintf(ctx,
+ "%s/%s", dirpath, start);
+ } else {
+ *pp_conv_path = talloc_strdup(ctx, start);
+ }
+ if (!*pp_conv_path) {
+ DEBUG(0, ("talloc_asprintf failed\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
+ TALLOC_FREE(name);
+ TALLOC_FREE(dirpath);
return result;
}
@@ -649,7 +673,7 @@ NTSTATUS unix_convert(connection_struct *conn,
a valid one for the user to access.
****************************************************************************/
-NTSTATUS check_name(connection_struct *conn, const pstring name)
+NTSTATUS check_name(connection_struct *conn, const char *name)
{
if (IS_VETO_PATH(conn, name)) {
/* Is it not dot or dot dot. */
@@ -682,8 +706,9 @@ static BOOL fname_equal(const char *name1, const char *name2,
BOOL case_sensitive)
{
/* Normal filename handling */
- if (case_sensitive)
+ if (case_sensitive) {
return(strcmp(name1,name2) == 0);
+ }
return(strequal(name1,name2));
}
@@ -701,17 +726,19 @@ static BOOL scan_directory(connection_struct *conn, const char *path,
BOOL mangled;
char *unmangled_name = NULL;
long curpos;
+ TALLOC_CTX *ctx = talloc_tos();
mangled = mangle_is_mangled(name, conn->params);
/* handle null paths */
- if ((path == NULL) || (*path == 0))
+ if ((path == NULL) || (*path == 0)) {
path = ".";
+ }
/*
* The incoming name can be mangled, and if we de-mangle it
* here it will not compare correctly against the filename (name2)
- * read from the directory and then mangled by the mangle_map()
+ * read from the directory and then mangled by the name_to_8_3()
* call. We need to mangle both names or neither.
* (JRA).
*
@@ -724,15 +751,20 @@ static BOOL scan_directory(connection_struct *conn, const char *path,
*/
if (mangled && !conn->case_sensitive) {
- mangled = !mangle_check_cache_alloc(name, &unmangled_name,
- conn->params);
- name = unmangled_name;
+ mangled = !mangle_lookup_name_from_8_3(ctx,
+ name,
+ &unmangled_name,
+ conn->params);
+ if (!mangled) {
+ /* Name is now unmangled. */
+ name = unmangled_name;
+ }
}
/* open the directory */
if (!(cur_dir = OpenDir(conn, path, NULL, 0))) {
DEBUG(3,("scan dir didn't open dir [%s]\n",path));
- SAFE_FREE(unmangled_name);
+ TALLOC_FREE(unmangled_name);
return(False);
}
@@ -741,8 +773,7 @@ static BOOL scan_directory(connection_struct *conn, const char *path,
while ((dname = ReadDirName(cur_dir, &curpos))) {
/* Is it dot or dot dot. */
- if ((dname[0] == '.') && (!dname[1] ||
- (dname[1] == '.' && !dname[2]))) {
+ if (ISDOT(dname) || ISDOTDOT(dname)) {
continue;
}
@@ -760,15 +791,19 @@ static BOOL scan_directory(connection_struct *conn, const char *path,
if ((mangled && mangled_equal(name,dname,conn->params)) ||
fname_equal(name, dname, conn->case_sensitive)) {
/* we've found the file, change it's name and return */
- *found_name = SMB_STRDUP(dname);
- SAFE_FREE(unmangled_name);
+ *found_name = talloc_strdup(ctx,dname);
+ TALLOC_FREE(unmangled_name);
CloseDir(cur_dir);
+ if (!*found_name) {
+ errno = ENOMEM;
+ return False;
+ }
return(True);
}
}
- SAFE_FREE(unmangled_name);
+ TALLOC_FREE(unmangled_name);
CloseDir(cur_dir);
errno = ENOENT;
- return(False);
+ return False;
}
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index 24037069292..0709acc756c 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -54,9 +54,10 @@ static void copy_trans_params_and_data(char *outbuf, int align,
if(data_len < 0)
data_len = 0;
- DEBUG(5,("copy_trans_params_and_data: params[%d..%d] data[%d..%d]\n",
+ DEBUG(5,("copy_trans_params_and_data: params[%d..%d] data[%d..%d] (align %d)\n",
param_offset, param_offset + param_len,
- data_offset , data_offset + data_len));
+ data_offset , data_offset + data_len,
+ align));
*copy_into = '\0';
@@ -65,7 +66,12 @@ static void copy_trans_params_and_data(char *outbuf, int align,
if (param_len)
memcpy(copy_into, &rparam[param_offset], param_len);
- copy_into += param_len + align;
+ copy_into += param_len;
+ if (align) {
+ memset(copy_into, '\0', align);
+ }
+
+ copy_into += align;
if (data_len )
memcpy(copy_into, &rdata[data_offset], data_len);
diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c
index 9eb2a283cc1..87cbc9183e9 100644
--- a/source/smbd/lanman.c
+++ b/source/smbd/lanman.c
@@ -50,6 +50,20 @@ extern userdom_struct current_user_info;
#define SHPWLEN 8 /* share password length */
+/* Limit size of ipc replies */
+
+static char *smb_realloc_limit(void *ptr, size_t size)
+{
+ char *val;
+
+ size = MAX((size),4*1024);
+ val = (char *)SMB_REALLOC(ptr,size);
+ if (val) {
+ memset(val,'\0',size);
+ }
+ return val;
+}
+
static BOOL api_Unsupported(connection_struct *conn, uint16 vuid,
char *param, int tpscnt,
char *data, int tdscnt,
@@ -401,7 +415,7 @@ static void PackDriverData(struct pack_desc* desc)
SIVAL(drivdata,0,sizeof drivdata); /* cb */
SIVAL(drivdata,4,1000); /* lVersion */
memset(drivdata+8,0,32); /* szDeviceName */
- push_ascii(drivdata+8,"NULL",-1, STR_TERMINATE);
+ push_ascii(drivdata+8,"NULL",32, STR_TERMINATE);
PACKl(desc,"l",drivdata,sizeof drivdata); /* pDriverData */
}
@@ -824,7 +838,7 @@ static BOOL api_DosPrintQGetInfo(connection_struct *conn, uint16 vuid,
*/
*rdata_len = 0;
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -846,7 +860,7 @@ static BOOL api_DosPrintQGetInfo(connection_struct *conn, uint16 vuid,
}
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
SAFE_FREE(queue);
return False;
@@ -879,7 +893,7 @@ static BOOL api_DosPrintQGetInfo(connection_struct *conn, uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
SAFE_FREE(queue);
SAFE_FREE(tmpdata);
@@ -940,7 +954,7 @@ static BOOL api_DosPrintQEnum(connection_struct *conn, uint16 vuid,
*/
*rdata_len = 0;
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -982,7 +996,7 @@ static BOOL api_DosPrintQEnum(connection_struct *conn, uint16 vuid,
}
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
goto err;
}
@@ -1008,7 +1022,7 @@ static BOOL api_DosPrintQEnum(connection_struct *conn, uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
goto err;
}
@@ -1381,11 +1395,10 @@ static BOOL api_RNetServerEnum(connection_struct *conn, uint16 vuid,
}
*rdata_len = fixed_len + string_len;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
- memset(*rdata,'\0',*rdata_len);
p2 = (*rdata) + fixed_len; /* auxilliary data (strings) will go here */
p = *rdata;
@@ -1411,7 +1424,7 @@ static BOOL api_RNetServerEnum(connection_struct *conn, uint16 vuid,
}
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -1460,7 +1473,7 @@ static BOOL api_RNetGroupGetUsers(connection_struct *conn, uint16 vuid,
*rdata_len = 0;
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -1652,7 +1665,7 @@ static BOOL api_RNetShareGetInfo(connection_struct *conn,uint16 vuid,
return False;
}
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -1663,7 +1676,7 @@ static BOOL api_RNetShareGetInfo(connection_struct *conn,uint16 vuid,
}
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -1746,12 +1759,11 @@ static BOOL api_RNetShareEnum( connection_struct *conn, uint16 vuid,
}
*rdata_len = fixed_len + string_len;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
- memset(*rdata,0,*rdata_len);
-
+
p2 = (*rdata) + fixed_len; /* auxiliary data (strings) will go here */
p = *rdata;
f_len = fixed_len;
@@ -1772,7 +1784,7 @@ static BOOL api_RNetShareEnum( connection_struct *conn, uint16 vuid,
}
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -1902,7 +1914,7 @@ static BOOL api_RNetShareAdd(connection_struct *conn,uint16 vuid,
}
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -1916,7 +1928,7 @@ static BOOL api_RNetShareAdd(connection_struct *conn,uint16 vuid,
error_exit:
*rparam_len = 4;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -1990,7 +2002,7 @@ static BOOL api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
unbecome_root();
*rdata_len = cli_buf_size;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
@@ -2020,7 +2032,7 @@ static BOOL api_RNetGroupEnum(connection_struct *conn,uint16 vuid,
*rdata_len = PTR_DIFF(p,*rdata);
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2066,16 +2078,16 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid,
}
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
-
+
/* check it's a supported varient */
-
+
if ( strcmp(str1,"zWrLeh") != 0 )
return False;
-
+
switch( uLevel ) {
case 0:
level_string = "B21";
@@ -2088,10 +2100,11 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid,
return False;
*rdata_len = mdrcnt + 1024;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
+
SSVAL(*rparam,0,NERR_Success);
SSVAL(*rparam,2,0); /* converter word */
@@ -2213,7 +2226,7 @@ static BOOL api_RNetUserEnum(connection_struct *conn, uint16 vuid,
resume_context, cli_buf_size));
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2223,7 +2236,7 @@ static BOOL api_RNetUserEnum(connection_struct *conn, uint16 vuid,
return False;
*rdata_len = cli_buf_size;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
@@ -2291,13 +2304,13 @@ static BOOL api_NetRemoteTOD(connection_struct *conn,uint16 vuid,
char *p;
*rparam_len = 4;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
*rdata_len = 21;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
@@ -2381,7 +2394,7 @@ static BOOL api_SetUserPassword(connection_struct *conn,uint16 vuid,
memcpy(pass2,p+16,16);
*rparam_len = 4;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2458,7 +2471,7 @@ static BOOL api_SamOEMChangePassword(connection_struct *conn,uint16 vuid,
fstring user;
char *p = get_safe_str_ptr(param,tpscnt,param,2);
*rparam_len = 2;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2561,7 +2574,7 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid,
return(False);
*rparam_len = 4;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2633,7 +2646,7 @@ static BOOL api_WPrintQueueCtrl(connection_struct *conn,uint16 vuid,
return(False);
*rparam_len = 4;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2731,7 +2744,7 @@ static BOOL api_PrintJobInfo(connection_struct *conn, uint16 vuid,
if(!rap_to_pjobid(SVAL(p,0), sharename, &jobid))
return False;
*rparam_len = 4;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2856,7 +2869,7 @@ static BOOL api_RNetServerGetInfo(connection_struct *conn,uint16 vuid,
}
*rdata_len = mdrcnt;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
@@ -2915,7 +2928,7 @@ static BOOL api_RNetServerGetInfo(connection_struct *conn,uint16 vuid,
*rdata_len = PTR_DIFF(p2,*rdata);
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2950,7 +2963,7 @@ static BOOL api_NetWkstaGetInfo(connection_struct *conn,uint16 vuid,
DEBUG(4,("NetWkstaGetInfo level %d\n",level));
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -2961,7 +2974,7 @@ static BOOL api_NetWkstaGetInfo(connection_struct *conn,uint16 vuid,
}
*rdata_len = mdrcnt + 1024;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
@@ -3227,7 +3240,7 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
}
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -3252,7 +3265,7 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
}
*rdata_len = mdrcnt + 1024;
- *rdata = SMB_REALLOC_LIMIT(*rdata,*rdata_len);
+ *rdata = smb_realloc_limit(*rdata,*rdata_len);
if (!*rdata) {
return False;
}
@@ -3462,7 +3475,7 @@ static BOOL api_WWkstaUserLogon(connection_struct *conn,uint16 vuid,
return False;
}
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -3504,7 +3517,7 @@ static BOOL api_WWkstaUserLogon(connection_struct *conn,uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -3551,7 +3564,7 @@ static BOOL api_WAccessGetUserPerms(connection_struct *conn,uint16 vuid,
}
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -3623,7 +3636,7 @@ static BOOL api_WPrintJobGetInfo(connection_struct *conn, uint16 vuid,
}
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -3649,7 +3662,7 @@ static BOOL api_WPrintJobGetInfo(connection_struct *conn, uint16 vuid,
}
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -3719,7 +3732,7 @@ static BOOL api_WPrintJobEnumerate(connection_struct *conn, uint16 vuid,
count = print_queue_status(snum,&queue,&status);
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -3740,7 +3753,7 @@ static BOOL api_WPrintJobEnumerate(connection_struct *conn, uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -3867,7 +3880,7 @@ static BOOL api_WPrintDestGetInfo(connection_struct *conn, uint16 vuid,
desc.neededlen = 0;
} else {
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -3888,7 +3901,7 @@ static BOOL api_WPrintDestGetInfo(connection_struct *conn, uint16 vuid,
}
*rparam_len = 6;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -3944,7 +3957,7 @@ static BOOL api_WPrintDestEnum(connection_struct *conn, uint16 vuid,
}
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -3969,7 +3982,7 @@ static BOOL api_WPrintDestEnum(connection_struct *conn, uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -4016,7 +4029,7 @@ static BOOL api_WPrintDriverEnum(connection_struct *conn, uint16 vuid,
}
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -4032,7 +4045,7 @@ static BOOL api_WPrintDriverEnum(connection_struct *conn, uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -4078,7 +4091,7 @@ static BOOL api_WPrintQProcEnum(connection_struct *conn, uint16 vuid,
}
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -4095,7 +4108,7 @@ static BOOL api_WPrintQProcEnum(connection_struct *conn, uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -4142,7 +4155,7 @@ static BOOL api_WPrintPortEnum(connection_struct *conn, uint16 vuid,
}
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -4160,7 +4173,7 @@ static BOOL api_WPrintPortEnum(connection_struct *conn, uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -4217,7 +4230,7 @@ static BOOL api_RNetSessionEnum(connection_struct *conn, uint16 vuid,
num_sessions = list_sessions(talloc_tos(), &session_list);
if (mdrcnt > 0) {
- *rdata = SMB_REALLOC_LIMIT(*rdata,mdrcnt);
+ *rdata = smb_realloc_limit(*rdata,mdrcnt);
if (!*rdata) {
return False;
}
@@ -4245,7 +4258,7 @@ static BOOL api_RNetSessionEnum(connection_struct *conn, uint16 vuid,
*rdata_len = desc.usedlen;
*rparam_len = 8;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -4269,7 +4282,7 @@ static BOOL api_TooSmall(connection_struct *conn,uint16 vuid, char *param, char
int *rdata_len, int *rparam_len)
{
*rparam_len = MIN(*rparam_len,mprcnt);
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
@@ -4295,7 +4308,7 @@ static BOOL api_Unsupported(connection_struct *conn, uint16 vuid,
int *rdata_len, int *rparam_len)
{
*rparam_len = 4;
- *rparam = SMB_REALLOC_LIMIT(*rparam,*rparam_len);
+ *rparam = smb_realloc_limit(*rparam,*rparam_len);
if (!*rparam) {
return False;
}
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c
index fce86903f24..4c00f6d14ab 100644
--- a/source/smbd/mangle.c
+++ b/source/smbd/mangle.c
@@ -1,18 +1,18 @@
-/*
+/*
Unix SMB/CIFS implementation.
Name mangling interface
Copyright (C) Andrew Tridgell 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/>.
*/
@@ -100,50 +100,53 @@ BOOL mangle_is_8_3_wildcards(const char *fname, BOOL check_case,
return mangle_fns->is_8_3(fname, check_case, True, p);
}
+BOOL mangle_must_mangle(const char *fname,
+ const struct share_params *p)
+{
+ if (!lp_manglednames(p)) {
+ return False;
+ }
+ return mangle_fns->must_mangle(fname, p);
+}
+
/*
- try to reverse map a 8.3 name to the original filename. This doesn't have to
+ try to reverse map a 8.3 name to the original filename. This doesn't have to
always succeed, as the directory handling code in smbd will scan the directory
looking for a matching name if it doesn't. It should succeed most of the time
or there will be a huge performance penalty
*/
-BOOL mangle_check_cache(char *s, size_t maxlen,
+BOOL mangle_lookup_name_from_8_3(TALLOC_CTX *ctx,
+ const char *in,
+ char **out, /* talloced on the given context. */
const struct share_params *p)
{
- return mangle_fns->check_cache(s, maxlen, p);
+ return mangle_fns->lookup_name_from_8_3(ctx, in, out, p);
}
-BOOL mangle_check_cache_alloc(const char *name, char **presult,
- const struct share_params *p)
-{
- pstring tmp;
- char *result;
- pstrcpy(tmp, name);
-
- if (!mangle_check_cache(tmp, sizeof(pstring)-1, p)
- || !(result = SMB_STRDUP(tmp))) {
- return False;
- }
- *presult = result;
- return True;
-}
-
-/*
- map a long filename to a 8.3 name.
+/*
+ mangle a long filename to a 8.3 name.
+ Return True if we did mangle the name (ie. out is filled in).
+ False on error.
+ JRA.
*/
-void mangle_map(pstring OutName, BOOL need83, BOOL cache83,
+BOOL name_to_8_3(const char *in,
+ char out[13],
+ BOOL cache83,
const struct share_params *p)
{
+ memset(out,'\0',13);
+
/* name mangling can be disabled for speed, in which case
we just truncate the string */
if (!lp_manglednames(p)) {
- if (need83) {
- string_truncate(OutName, 12);
- }
- return;
+ safe_strcpy(out,in,12);
+ return True;
}
- /* invoke the inane "mangled map" code */
- mangle_map_filename(OutName, p);
- mangle_fns->name_map(OutName, need83, cache83, lp_defaultcase(p->service), p);
+ return mangle_fns->name_to_8_3(in,
+ out,
+ cache83,
+ lp_defaultcase(p->service),
+ p);
}
diff --git a/source/smbd/mangle_hash.c b/source/smbd/mangle_hash.c
index 4c02d9685fb..d63a980cfbc 100644
--- a/source/smbd/mangle_hash.c
+++ b/source/smbd/mangle_hash.c
@@ -1,20 +1,21 @@
-/*
+/*
Unix SMB/CIFS implementation.
Name mangling
Copyright (C) Andrew Tridgell 1992-2002
Copyright (C) Simo Sorce 2001
Copyright (C) Andrew Bartlett 2002
-
+ Copyright (C) Jeremy Allison 2007
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -244,14 +245,14 @@ static NTSTATUS is_8_3_w(const smb_ucs2_t *fname, BOOL allow_wildcards)
if (strlen_w(fname) > 12)
return NT_STATUS_UNSUCCESSFUL;
-
+
if (strcmp_wa(fname, ".") == 0 || strcmp_wa(fname, "..") == 0)
return NT_STATUS_OK;
/* Name cannot start with '.' */
if (*fname == UCS2_CHAR('.'))
return NT_STATUS_UNSUCCESSFUL;
-
+
if (!NT_STATUS_IS_OK(is_valid_name(fname, allow_wildcards, True)))
goto done;
@@ -293,7 +294,7 @@ static BOOL is_8_3(const char *fname, BOOL check_case, BOOL allow_wildcards,
if (strlen(f) > 12)
return False;
-
+
size = push_ucs2_allocate(&ucs2name, f);
if (size == (size_t)-1) {
DEBUG(0,("is_8_3: internal error push_ucs2_allocate() failed!\n"));
@@ -305,15 +306,13 @@ static BOOL is_8_3(const char *fname, BOOL check_case, BOOL allow_wildcards,
done:
SAFE_FREE(ucs2name);
- if (!NT_STATUS_IS_OK(ret)) {
+ if (!NT_STATUS_IS_OK(ret)) {
return False;
}
-
+
return True;
}
-
-
/* -------------------------------------------------------------------------- **
* Functions...
*/
@@ -330,10 +329,11 @@ done:
*
* ************************************************************************** **
*/
+
static void init_chartest( void )
{
const unsigned char *s;
-
+
memset( (char *)chartest, '\0', 256 );
for( s = (const unsigned char *)basechars; *s; s++ ) {
@@ -360,6 +360,7 @@ static void init_chartest( void )
*
* ************************************************************************** **
*/
+
static BOOL is_mangled(const char *s, const struct share_params *p)
{
char *magic;
@@ -406,7 +407,8 @@ static void mangle_reset( void )
crh 07-Apr-1998
**************************************************************************/
-static void cache_mangled_name( const char mangled_name[13], char *raw_name )
+static void cache_mangled_name( const char mangled_name[13],
+ const char *raw_name )
{
TDB_DATA data_val;
char mangled_name_key[13];
@@ -459,30 +461,37 @@ static void cache_mangled_name( const char mangled_name[13], char *raw_name )
* ************************************************************************** **
*/
-static BOOL check_cache( char *s, size_t maxlen, const struct share_params *p )
+static BOOL lookup_name_from_8_3(TALLOC_CTX *ctx,
+ const char *in,
+ char **out, /* talloced on the given context. */
+ const struct share_params *p)
{
TDB_DATA data_val;
- char *ext_start = NULL;
char *saved_ext = NULL;
+ char *s = talloc_strdup(ctx, in);
magic_char = lp_magicchar(p);
/* If the cache isn't initialized, give up. */
- if( !tdb_mangled_cache )
- return( False );
+ if(!s || !tdb_mangled_cache ) {
+ TALLOC_FREE(s);
+ return False;
+ }
data_val = tdb_fetch_bystring(tdb_mangled_cache, s);
/* If we didn't find the name *with* the extension, try without. */
if(data_val.dptr == NULL || data_val.dsize == 0) {
- ext_start = strrchr( s, '.' );
+ char *ext_start = strrchr( s, '.' );
if( ext_start ) {
- if((saved_ext = SMB_STRDUP(ext_start)) == NULL)
+ if((saved_ext = talloc_strdup(ctx,ext_start)) == NULL) {
+ TALLOC_FREE(s);
return False;
+ }
*ext_start = '\0';
data_val = tdb_fetch_bystring(tdb_mangled_cache, s);
- /*
+ /*
* At this point s is the name without the
* extension. We re-add the extension if saved_ext
* is not null, before freeing saved_ext.
@@ -492,31 +501,32 @@ static BOOL check_cache( char *s, size_t maxlen, const struct share_params *p )
/* Okay, if we haven't found it we're done. */
if(data_val.dptr == NULL || data_val.dsize == 0) {
- if(saved_ext) {
- /* Replace the saved_ext as it was truncated. */
- (void)safe_strcat( s, saved_ext, maxlen );
- SAFE_FREE(saved_ext);
- }
- return( False );
+ TALLOC_FREE(saved_ext);
+ TALLOC_FREE(s);
+ return False;
}
- /* If we *did* find it, we need to copy it into the string buffer. */
- (void)safe_strcpy( s, (const char *)data_val.dptr, maxlen );
- if( saved_ext ) {
- /* Replace the saved_ext as it was truncated. */
- (void)safe_strcat( s, saved_ext, maxlen );
- SAFE_FREE(saved_ext);
+ /* If we *did* find it, we need to talloc it on the given ctx. */
+ if (saved_ext) {
+ *out = talloc_asprintf(ctx, "%s%s",
+ (char *)data_val.dptr,
+ saved_ext);
+ } else {
+ *out = talloc_strdup(ctx, (char *)data_val.dptr);
}
+
+ TALLOC_FREE(s);
+ TALLOC_FREE(saved_ext);
SAFE_FREE(data_val.dptr);
- return( True );
+
+ return *out ? True : False;
}
/*****************************************************************************
- * do the actual mangling to 8.3 format
- * the buffer must be able to hold 13 characters (including the null)
- *****************************************************************************
- */
-static void to_8_3(char *s, int default_case)
+ Do the actual mangling to 8.3 format.
+*****************************************************************************/
+
+static BOOL to_8_3(const char *in, char out[13], int default_case)
{
int csum;
char *p;
@@ -524,11 +534,16 @@ static void to_8_3(char *s, int default_case)
char base[9];
int baselen = 0;
int extlen = 0;
+ char *s = SMB_STRDUP(in);
extension[0] = 0;
base[0] = 0;
- p = strrchr(s,'.');
+ if (!s) {
+ return False;
+ }
+
+ p = strrchr(s,'.');
if( p && (strlen(p+1) < (size_t)4) ) {
BOOL all_normal = ( strisnormal(p+1, default_case) ); /* XXXXXXXXX */
@@ -557,7 +572,7 @@ static void to_8_3(char *s, int default_case)
extension[extlen] = 0;
}
}
-
+
p = s;
while( *p && baselen < 5 ) {
@@ -567,79 +582,88 @@ static void to_8_3(char *s, int default_case)
p++;
}
base[baselen] = 0;
-
+
csum = csum % (MANGLE_BASE*MANGLE_BASE);
-
- (void)slprintf(s, 12, "%s%c%c%c",
- base, magic_char, mangle( csum/MANGLE_BASE ), mangle( csum ) );
-
+
+ memcpy(out, base, baselen);
+ out[baselen] = magic_char;
+ out[baselen+1] = mangle( csum/MANGLE_BASE );
+ out[baselen+2] = mangle( csum );
+
if( *extension ) {
- (void)pstrcat( s, "." );
- (void)pstrcat( s, extension );
+ out[baselen+3] = '.';
+ safe_strcpy(&out[baselen+4], extension, 3);
+ }
+
+ SAFE_FREE(s);
+ return True;
+}
+
+static BOOL must_mangle(const char *name,
+ const struct share_params *p)
+{
+ smb_ucs2_t *name_ucs2 = NULL;
+ NTSTATUS status;
+ magic_char = lp_magicchar(p);
+
+ if (push_ucs2_allocate(&name_ucs2, name) == (size_t)-1) {
+ DEBUG(0, ("push_ucs2_allocate failed!\n"));
+ return False;
}
+ status = is_valid_name(name_ucs2, False, False);
+ SAFE_FREE(name_ucs2);
+ return NT_STATUS_IS_OK(status);
}
/*****************************************************************************
* Convert a filename to DOS format. Return True if successful.
+ * Input: in Incoming name.
*
- * Input: OutName - Source *and* destination buffer.
+ * out 8.3 DOS name.
*
- * NOTE that OutName must point to a memory space that
- * is at least 13 bytes in size!
- *
- * need83 - If False, name mangling will be skipped unless the
- * name contains illegal characters. Mapping will still
- * be done, if appropriate. This is probably used to
- * signal that a client does not require name mangling,
- * thus skipping the name mangling even on shares which
- * have name-mangling turned on.
* cache83 - If False, the mangled name cache will not be updated.
* This is usually used to prevent that we overwrite
* a conflicting cache entry prematurely, i.e. before
* we know whether the client is really interested in the
* current name. (See PR#13758). UKD.
*
- * Output: Returns False only if the name wanted mangling but the share does
- * not have name mangling turned on.
- *
* ****************************************************************************
*/
-static void name_map(char *OutName, BOOL need83, BOOL cache83,
- int default_case, const struct share_params *p)
+static BOOL hash_name_to_8_3(const char *in,
+ char out[13],
+ BOOL cache83,
+ int default_case,
+ const struct share_params *p)
{
- smb_ucs2_t *OutName_ucs2;
+ smb_ucs2_t *in_ucs2 = NULL;
magic_char = lp_magicchar(p);
- DEBUG(5,("name_map( %s, need83 = %s, cache83 = %s)\n", OutName,
- need83 ? "True" : "False", cache83 ? "True" : "False"));
-
- if (push_ucs2_allocate(&OutName_ucs2, OutName) == (size_t)-1) {
+ DEBUG(5,("hash_name_to_8_3( %s, cache83 = %s)\n", in,
+ cache83 ? "True" : "False"));
+
+ if (push_ucs2_allocate(&in_ucs2, in) == (size_t)-1) {
DEBUG(0, ("push_ucs2_allocate failed!\n"));
- return;
+ return False;
}
- if( !need83 && !NT_STATUS_IS_OK(is_valid_name(OutName_ucs2, False, False)))
- need83 = True;
-
- /* check if it's already in 8.3 format */
- if (need83 && !NT_STATUS_IS_OK(is_8_3_w(OutName_ucs2, False))) {
- char *tmp = NULL;
-
- /* mangle it into 8.3 */
- if (cache83)
- tmp = SMB_STRDUP(OutName);
-
- to_8_3(OutName, default_case);
+ /* If it's already 8.3, just copy. */
+ if (NT_STATUS_IS_OK(is_valid_name(in_ucs2, False, False)) &&
+ NT_STATUS_IS_OK(is_8_3_w(in_ucs2, False))) {
+ SAFE_FREE(in_ucs2);
+ safe_strcpy(out, in, 12);
+ return True;
+ }
- if(tmp != NULL) {
- cache_mangled_name(OutName, tmp);
- SAFE_FREE(tmp);
- }
+ SAFE_FREE(in_ucs2);
+ if (!to_8_3(in, out, default_case)) {
+ return False;
}
- DEBUG(5,("name_map() ==> [%s]\n", OutName));
- SAFE_FREE(OutName_ucs2);
+ cache_mangled_name(out, in);
+
+ DEBUG(5,("hash_name_to_8_3(%s) ==> [%s]\n", in, out));
+ return True;
}
/*
@@ -649,9 +673,10 @@ static void name_map(char *OutName, BOOL need83, BOOL cache83,
static struct mangle_fns mangle_fns = {
mangle_reset,
is_mangled,
+ must_mangle,
is_8_3,
- check_cache,
- name_map
+ lookup_name_from_8_3,
+ hash_name_to_8_3
};
/* return the methods for this mangling implementation */
diff --git a/source/smbd/mangle_hash2.c b/source/smbd/mangle_hash2.c
index c3db112051a..73f81fe9aec 100644
--- a/source/smbd/mangle_hash2.c
+++ b/source/smbd/mangle_hash2.c
@@ -368,18 +368,23 @@ static void mangle_reset(void)
/*
try to find a 8.3 name in the cache, and if found then
- replace the string with the original long name.
+ replace the string with the original long name.
*/
-static BOOL check_cache(char *name, size_t maxlen, const struct share_params *p)
+static BOOL lookup_name_from_8_3(TALLOC_CTX *ctx,
+ const char *name,
+ char **pp_out, /* talloced on the given context. */
+ const struct share_params *p)
{
unsigned int hash, multiplier;
unsigned int i;
const char *prefix;
char extension[4];
+ *pp_out = NULL;
+
/* make sure that this is a mangled name from this cache */
if (!is_mangled(name, p)) {
- M_DEBUG(10,("check_cache: %s -> not mangled\n", name));
+ M_DEBUG(10,("lookup_name_from_8_3: %s -> not mangled\n", name));
return False;
}
@@ -394,7 +399,8 @@ static BOOL check_cache(char *name, size_t maxlen, const struct share_params *p)
/* now look in the prefix cache for that hash */
prefix = cache_lookup(hash);
if (!prefix) {
- M_DEBUG(10,("check_cache: %s -> %08X -> not found\n", name, hash));
+ M_DEBUG(10,("lookup_name_from_8_3: %s -> %08X -> not found\n",
+ name, hash));
return False;
}
@@ -407,17 +413,22 @@ static BOOL check_cache(char *name, size_t maxlen, const struct share_params *p)
}
if (extension[0]) {
- M_DEBUG(10,("check_cache: %s -> %s.%s\n", name, prefix, extension));
- slprintf(name, maxlen, "%s.%s", prefix, extension);
+ M_DEBUG(10,("lookup_name_from_8_3: %s -> %s.%s\n",
+ name, prefix, extension));
+ *pp_out = talloc_asprintf(ctx, "%s.%s", prefix, extension);
} else {
- M_DEBUG(10,("check_cache: %s -> %s\n", name, prefix));
- safe_strcpy(name, prefix, maxlen);
+ M_DEBUG(10,("lookup_name_from_8_3: %s -> %s\n", name, prefix));
+ *pp_out = talloc_strdup(ctx, prefix);
+ }
+
+ if (!pp_out) {
+ M_DEBUG(0,("talloc_fail"));
+ return False;
}
return True;
}
-
/*
look for a DOS reserved name
*/
@@ -499,18 +510,27 @@ static BOOL is_legal_name(const char *name)
return True;
}
+static BOOL must_mangle(const char *name,
+ const struct share_params *p)
+{
+ if (is_reserved_name(name)) {
+ return True;
+ }
+ return !is_legal_name(name);
+}
+
/*
the main forward mapping function, which converts a long filename to
a 8.3 name
- if need83 is not set then we only do the mangling if the name is illegal
- as a long name
-
if cache83 is not set then we don't cache the result
- the name parameter must be able to hold 13 bytes
*/
-static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case, const struct share_params *p)
+static BOOL hash2_name_to_8_3(const char *name,
+ char new_name[13],
+ BOOL cache83,
+ int default_case,
+ const struct share_params *p)
{
char *dot_p;
char lead_chars[7];
@@ -518,20 +538,14 @@ static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case,
unsigned int extension_length, i;
unsigned int prefix_len;
unsigned int hash, v;
- char new_name[13];
/* reserved names are handled specially */
if (!is_reserved_name(name)) {
- /* if the name is already a valid 8.3 name then we don't need to
- do anything */
- if (is_8_3(name, False, False, p)) {
- return;
- }
-
- /* if the caller doesn't strictly need 8.3 then just check for illegal
- filenames */
- if (!need83 && is_legal_name(name)) {
- return;
+ /* if the name is already a valid 8.3 name then we don't need to
+ * change anything */
+ if (is_legal_name(name) && is_8_3(name, False, False, p)) {
+ safe_strcpy(new_name, name, 12);
+ return True;
}
}
@@ -548,7 +562,9 @@ static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case,
break;
}
}
- if (i == 0 || i == 4) dot_p = NULL;
+ if (i == 0 || i == 4) {
+ dot_p = NULL;
+ }
}
/* the leading characters in the mangled name is taken from
@@ -580,11 +596,12 @@ static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case,
for (i=1; extension_length < 3 && dot_p[i]; i++) {
char c = dot_p[i];
if (FLAG_CHECK(c, FLAG_ASCII)) {
- extension[extension_length++] = toupper_ascii(c);
+ extension[extension_length++] =
+ toupper_ascii(c);
}
}
}
-
+
/* find the hash for this prefix */
v = hash = mangle_hash(name, prefix_len);
@@ -593,7 +610,7 @@ static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case,
new_name[i] = lead_chars[i];
}
new_name[7] = base_forward(v % 36);
- new_name[6] = '~';
+ new_name[6] = '~';
for (i=5; i>=mangle_prefix; i--) {
v = v / 36;
new_name[i] = base_forward(v % 36);
@@ -613,22 +630,18 @@ static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case,
cache_insert(name, prefix_len, hash);
}
- M_DEBUG(10,("name_map: %s -> %08X -> %s (cache=%d)\n",
+ M_DEBUG(10,("hash2_name_to_8_3: %s -> %08X -> %s (cache=%d)\n",
name, hash, new_name, cache83));
- /* and overwrite the old name */
- fstrcpy(name, new_name);
-
- /* all done, we've managed to mangle it */
+ return True;
}
-
-/* initialise the flags table
+/* initialise the flags table
we allow only a very restricted set of characters as 'ascii' in this
mangling backend. This isn't a significant problem as modern clients
use the 'long' filenames anyway, and those don't have these
- restrictions.
+ restrictions.
*/
static void init_tables(void)
{
@@ -642,8 +655,8 @@ static void init_tables(void)
char_flags[i] |= FLAG_ILLEGAL;
}
- if ((i >= '0' && i <= '9') ||
- (i >= 'a' && i <= 'z') ||
+ if ((i >= '0' && i <= '9') ||
+ (i >= 'a' && i <= 'z') ||
(i >= 'A' && i <= 'Z')) {
char_flags[i] |= (FLAG_ASCII | FLAG_BASECHAR);
}
@@ -663,7 +676,7 @@ static void init_tables(void)
memset(base_reverse, 0, sizeof(base_reverse));
for (i=0;i<36;i++) {
base_reverse[(unsigned char)base_forward(i)] = i;
- }
+ }
/* fill in the reserved names flags. These are used as a very
fast filter for finding possible DOS reserved filenames */
@@ -694,9 +707,10 @@ static void init_tables(void)
static struct mangle_fns mangle_fns = {
mangle_reset,
is_mangled,
+ must_mangle,
is_8_3,
- check_cache,
- name_map
+ lookup_name_from_8_3,
+ hash2_name_to_8_3
};
/* return the methods for this mangling implementation */
@@ -729,30 +743,45 @@ static BOOL posix_is_mangled(const char *s, const struct share_params *p)
return False;
}
-static BOOL posix_is_8_3(const char *fname, BOOL check_case, BOOL allow_wildcards, const struct share_params *p)
+static BOOL posix_must_mangle(const char *s, const struct share_params *p)
{
return False;
}
-static BOOL posix_check_cache( char *s, size_t maxlen, const struct share_params *p )
+static BOOL posix_is_8_3(const char *fname,
+ BOOL check_case,
+ BOOL allow_wildcards,
+ const struct share_params *p)
{
return False;
}
-static void posix_name_map(char *OutName, BOOL need83, BOOL cache83, int default_case, const struct share_params *p)
+static BOOL posix_lookup_name_from_8_3(TALLOC_CTX *ctx,
+ const char *in,
+ char **out, /* talloced on the given context. */
+ const struct share_params *p)
{
- if (need83) {
- memset(OutName, '\0', 13);
- }
+ return False;
+}
+
+static BOOL posix_name_to_8_3(const char *in,
+ char out[13],
+ BOOL cache83,
+ int default_case,
+ const struct share_params *p)
+{
+ memset(out, '\0', 13);
+ return True;
}
/* POSIX paths backend - no mangle. */
static struct mangle_fns posix_mangle_fns = {
- posix_mangle_reset,
- posix_is_mangled,
- posix_is_8_3,
- posix_check_cache,
- posix_name_map
+ posix_mangle_reset,
+ posix_is_mangled,
+ posix_must_mangle,
+ posix_is_8_3,
+ posix_lookup_name_from_8_3,
+ posix_name_to_8_3
};
struct mangle_fns *posix_mangle_init(void)
diff --git a/source/smbd/mangle_map.c b/source/smbd/mangle_map.c
deleted file mode 100644
index 81de1252488..00000000000
--- a/source/smbd/mangle_map.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- Name mapping code
- Copyright (C) Jeremy Allison 1998
- Copyright (C) Andrew Tridgell 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/>.
-*/
-
-#include "includes.h"
-
-
-/* ************************************************************************** **
- * Used only in do_fwd_mangled_map(), below.
- * ************************************************************************** **
- */
-static char *map_filename( char *s, /* This is null terminated */
- const char *pattern, /* This isn't. */
- int len ) /* This is the length of pattern. */
- {
- static pstring matching_bit; /* The bit of the string which matches */
- /* a * in pattern if indeed there is a * */
- char *sp; /* Pointer into s. */
- char *pp; /* Pointer into p. */
- char *match_start; /* Where the matching bit starts. */
- pstring pat;
-
- StrnCpy( pat, pattern, len ); /* Get pattern into a proper string! */
- pstrcpy( matching_bit, "" ); /* Match but no star gets this. */
- pp = pat; /* Initialize the pointers. */
- sp = s;
-
- if( strequal(s, ".") || strequal(s, ".."))
- {
- return NULL; /* Do not map '.' and '..' */
- }
-
- if( (len == 1) && (*pattern == '*') )
- {
- return NULL; /* Impossible, too ambiguous for */
- } /* words! */
-
- while( (*sp) /* Not the end of the string. */
- && (*pp) /* Not the end of the pattern. */
- && (*sp == *pp) /* The two match. */
- && (*pp != '*') ) /* No wildcard. */
- {
- sp++; /* Keep looking. */
- pp++;
- }
-
- if( !*sp && !*pp ) /* End of pattern. */
- return( matching_bit ); /* Simple match. Return empty string. */
-
- if( *pp == '*' )
- {
- pp++; /* Always interrested in the chacter */
- /* after the '*' */
- if( !*pp ) /* It is at the end of the pattern. */
- {
- StrnCpy( matching_bit, s, sp-s );
- return( matching_bit );
- }
- else
- {
- /* The next character in pattern must match a character further */
- /* along s than sp so look for that character. */
- match_start = sp;
- while( (*sp) /* Not the end of s. */
- && (*sp != *pp) ) /* Not the same */
- sp++; /* Keep looking. */
- if( !*sp ) /* Got to the end without a match. */
- {
- return( NULL );
- } /* Still hope for a match. */
- else
- {
- /* Now sp should point to a matching character. */
- StrnCpy(matching_bit, match_start, sp-match_start);
- /* Back to needing a stright match again. */
- while( (*sp) /* Not the end of the string. */
- && (*pp) /* Not the end of the pattern. */
- && (*sp == *pp) ) /* The two match. */
- {
- sp++; /* Keep looking. */
- pp++;
- }
- if( !*sp && !*pp ) /* Both at end so it matched */
- return( matching_bit );
- else
- return( NULL );
- }
- }
- }
- return( NULL ); /* No match. */
- } /* map_filename */
-
-
-/* ************************************************************************** **
- * MangledMap is a series of name pairs in () separated by spaces.
- * If s matches the first of the pair then the name given is the
- * second of the pair. A * means any number of any character and if
- * present in the second of the pair as well as the first the
- * matching part of the first string takes the place of the * in the
- * second.
- *
- * I wanted this so that we could have RCS files which can be used
- * by UNIX and DOS programs. My mapping string is (RCS rcs) which
- * converts the UNIX RCS file subdirectory to lowercase thus
- * preventing mangling.
- *
- * See 'mangled map' in smb.conf(5).
- *
- * ************************************************************************** **
- */
-static void mangled_map(char *s, const char *MangledMap)
-{
- const char *start=MangledMap; /* Use this to search for mappings. */
- const char *end; /* Used to find the end of strings. */
- char *match_string;
- pstring new_string; /* Make up the result here. */
- char *np; /* Points into new_string. */
-
- DEBUG( 5, ("Mangled Mapping '%s' map '%s'\n", s, MangledMap) );
- while( *start ) {
- while( (*start) && (*start != '(') )
- start++;
- if( !*start )
- continue; /* Always check for the end. */
- start++; /* Skip the ( */
- end = start; /* Search for the ' ' or a ')' */
- DEBUG( 5, ("Start of first in pair '%s'\n", start) );
- while( (*end) && !((*end == ' ') || (*end == ')')) )
- end++;
- if( !*end ) {
- start = end;
- continue; /* Always check for the end. */
- }
- DEBUG( 5, ("End of first in pair '%s'\n", end) );
- if( (match_string = map_filename( s, start, end-start )) ) {
- int size_left = sizeof(new_string) - 1;
- DEBUG( 5, ("Found a match\n") );
- /* Found a match. */
- start = end + 1; /* Point to start of what it is to become. */
- DEBUG( 5, ("Start of second in pair '%s'\n", start) );
- end = start;
- np = new_string;
- while( (*end && size_left > 0) /* Not the end of string. */
- && (*end != ')') /* Not the end of the pattern. */
- && (*end != '*') ) { /* Not a wildcard. */
- *np++ = *end++;
- size_left--;
- }
-
- if( !*end ) {
- start = end;
- continue; /* Always check for the end. */
- }
- if( *end == '*' ) {
- if (size_left > 0 )
- safe_strcpy( np, match_string, size_left );
- np += strlen( match_string );
- size_left -= strlen( match_string );
- end++; /* Skip the '*' */
- while ((*end && size_left > 0) /* Not the end of string. */
- && (*end != ')') /* Not the end of the pattern. */
- && (*end != '*')) { /* Not a wildcard. */
- *np++ = *end++;
- size_left--;
- }
- }
- if (!*end) {
- start = end;
- continue; /* Always check for the end. */
- }
- if (size_left > 0)
- *np++ = '\0'; /* NULL terminate it. */
- DEBUG(5,("End of second in pair '%s'\n", end));
- new_string[sizeof(new_string)-1] = '\0';
- pstrcpy( s, new_string ); /* Substitute with the new name. */
- DEBUG( 5, ("s is now '%s'\n", s) );
- }
- start = end; /* Skip a bit which cannot be wanted anymore. */
- start++;
- }
-}
-
-/*
- front end routine to the mangled map code
- personally I think that the whole idea of "mangled map" is completely bogus
-*/
-void mangle_map_filename(fstring fname, const struct share_params *p)
-{
- char *map;
-
- map = lp_mangled_map(p);
- if (!map || !*map) return;
-
- mangled_map(fname, map);
-}
diff --git a/source/smbd/msdfs.c b/source/smbd/msdfs.c
index 16f3cd4370c..ff55904b81c 100644
--- a/source/smbd/msdfs.c
+++ b/source/smbd/msdfs.c
@@ -1,4 +1,4 @@
-/*
+/*
Unix SMB/Netbios implementation.
Version 3.0
MSDFS services for Samba
@@ -9,12 +9,12 @@
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/>.
@@ -36,22 +36,37 @@ extern uint32 global_client_caps;
SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES bit and then
send a local path, we have to cope with that too....
+ This version does everything using pointers within one copy of the
+ pathname string, talloced on the struct dfs_path pointer (which
+ must be talloced). This may be too clever to live....
JRA.
**********************************************************************/
static NTSTATUS parse_dfs_path(const char *pathname,
BOOL allow_wcards,
- struct dfs_path *pdp,
+ struct dfs_path *pdp, /* MUST BE TALLOCED */
BOOL *ppath_contains_wcard)
{
- pstring pathname_local;
+ char *pathname_local;
char *p,*temp;
+ char *eos_ptr;
NTSTATUS status = NT_STATUS_OK;
char sepchar;
ZERO_STRUCTP(pdp);
- pstrcpy(pathname_local,pathname);
+ /*
+ * This is the only talloc we should need to do
+ * on the struct dfs_path. All the pointers inside
+ * it should point to offsets within this string.
+ */
+
+ pathname_local = talloc_strdup(pdp, pathname);
+ if (!pathname_local) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ /* Get a pointer to the terminating '\0' */
+ eos_ptr = &pathname_local[strlen(pathname_local)];
p = temp = pathname_local;
pdp->posix_path = (lp_posix_pathnames() && *pathname == '/');
@@ -66,17 +81,22 @@ static NTSTATUS parse_dfs_path(const char *pathname,
* Try and convert to a local path.
*/
- pdp->hostname[0] = '\0';
- pdp->servicename[0] = '\0';
+ pdp->hostname = eos_ptr; /* "" */
+ pdp->servicename = eos_ptr; /* "" */
/* We've got no info about separators. */
pdp->posix_path = lp_posix_pathnames();
p = temp;
- DEBUG(10,("parse_dfs_path: trying to convert %s to a local path\n",
+ DEBUG(10,("parse_dfs_path: trying to convert %s to a "
+ "local path\n",
temp));
goto local_path;
}
+ /*
+ * Safe to use on talloc'ed string as it only shrinks.
+ * It also doesn't affect the eos_ptr.
+ */
trim_char(temp,sepchar,sepchar);
DEBUG(10,("parse_dfs_path: temp = |%s| after trimming %c's\n",
@@ -93,34 +113,38 @@ static NTSTATUS parse_dfs_path(const char *pathname,
* Try and convert to a local path.
*/
- pdp->hostname[0] = '\0';
- pdp->servicename[0] = '\0';
+ pdp->hostname = eos_ptr; /* "" */
+ pdp->servicename = eos_ptr; /* "" */
p = temp;
- DEBUG(10,("parse_dfs_path: trying to convert %s to a local path\n",
+ DEBUG(10,("parse_dfs_path: trying to convert %s "
+ "to a local path\n",
temp));
goto local_path;
}
*p = '\0';
- fstrcpy(pdp->hostname,temp);
+ pdp->hostname = temp;
+
DEBUG(10,("parse_dfs_path: hostname: %s\n",pdp->hostname));
/* If we got a hostname, is it ours (or an IP address) ? */
if (!is_myname_or_ipaddr(pdp->hostname)) {
/* Repair path. */
*p = sepchar;
- DEBUG(10,("parse_dfs_path: hostname %s isn't ours. Try local path from path %s\n",
+ DEBUG(10,("parse_dfs_path: hostname %s isn't ours. "
+ "Try local path from path %s\n",
pdp->hostname, temp));
/*
* Possibly client sent a local path by mistake.
* Try and convert to a local path.
*/
- pdp->hostname[0] = '\0';
- pdp->servicename[0] = '\0';
+ pdp->hostname = eos_ptr; /* "" */
+ pdp->servicename = eos_ptr; /* "" */
p = temp;
- DEBUG(10,("parse_dfs_path: trying to convert %s to a local path\n",
+ DEBUG(10,("parse_dfs_path: trying to convert %s "
+ "to a local path\n",
temp));
goto local_path;
}
@@ -129,12 +153,12 @@ static NTSTATUS parse_dfs_path(const char *pathname,
temp = p+1;
p = strchr_m(temp,sepchar);
if(p == NULL) {
- fstrcpy(pdp->servicename,temp);
- pdp->reqpath[0] = '\0';
+ pdp->servicename = temp;
+ pdp->reqpath = eos_ptr; /* "" */
return NT_STATUS_OK;
}
*p = '\0';
- fstrcpy(pdp->servicename,temp);
+ pdp->servicename = temp;
DEBUG(10,("parse_dfs_path: servicename: %s\n",pdp->servicename));
p++;
@@ -143,14 +167,15 @@ static NTSTATUS parse_dfs_path(const char *pathname,
*ppath_contains_wcard = False;
- pstrcpy(pdp->reqpath, p);
+ pdp->reqpath = p;
/* Rest is reqpath. */
if (pdp->posix_path) {
status = check_path_syntax_posix(pdp->reqpath);
} else {
if (allow_wcards) {
- status = check_path_syntax_wcard(pdp->reqpath, ppath_contains_wcard);
+ status = check_path_syntax_wcard(pdp->reqpath,
+ ppath_contains_wcard);
} else {
status = check_path_syntax(pdp->reqpath);
}
@@ -171,7 +196,9 @@ static NTSTATUS parse_dfs_path(const char *pathname,
Note this CHANGES CWD !!!! JRA.
*********************************************************/
-static NTSTATUS create_conn_struct(connection_struct *conn, int snum, const char *path)
+static NTSTATUS create_conn_struct(connection_struct *conn,
+ int snum,
+ const char *path)
{
pstring connpath;
@@ -187,7 +214,8 @@ static NTSTATUS create_conn_struct(connection_struct *conn, int snum, const char
return NT_STATUS_NO_MEMORY;
}
- if (!(conn->params = TALLOC_ZERO_P(conn->mem_ctx, struct share_params))) {
+ if (!(conn->params = TALLOC_ZERO_P(conn->mem_ctx,
+ struct share_params))) {
DEBUG(0, ("TALLOC failed\n"));
return NT_STATUS_NO_MEMORY;
}
@@ -204,15 +232,16 @@ static NTSTATUS create_conn_struct(connection_struct *conn, int snum, const char
}
/*
- * Windows seems to insist on doing trans2getdfsreferral() calls on the IPC$
- * share as the anonymous user. If we try to chdir as that user we will
- * fail.... WTF ? JRA.
+ * Windows seems to insist on doing trans2getdfsreferral() calls on
+ * the IPC$ share as the anonymous user. If we try to chdir as that
+ * user we will fail.... WTF ? JRA.
*/
if (vfs_ChDir(conn,conn->connectpath) != 0) {
NTSTATUS status = map_nt_error_from_unix(errno);
- DEBUG(3,("create_conn_struct: Can't ChDir to new conn path %s. Error was %s\n",
- conn->connectpath, strerror(errno) ));
+ DEBUG(3,("create_conn_struct: Can't ChDir to new conn path %s. "
+ "Error was %s\n",
+ conn->connectpath, strerror(errno) ));
conn_free_internal(conn);
return status;
}
@@ -240,23 +269,31 @@ static NTSTATUS create_conn_struct(connection_struct *conn, int snum, const char
**********************************************************************/
static BOOL parse_msdfs_symlink(TALLOC_CTX *ctx,
- char *target,
+ const char *target,
struct referral **preflist,
int *refcount)
{
- pstring temp;
+ char *temp = NULL;
char *prot;
- char *alt_path[MAX_REFERRAL_COUNT];
+ char **alt_path = NULL;
int count = 0, i;
struct referral *reflist;
- pstrcpy(temp,target);
+ temp = talloc_strdup(ctx, target);
+ if (!temp) {
+ return False;
+ }
prot = strtok(temp,":");
if (!prot) {
DEBUG(0,("parse_msdfs_symlink: invalid path !\n"));
return False;
}
+ alt_path = TALLOC_ARRAY(ctx, char *, MAX_REFERRAL_COUNT);
+ if (!alt_path) {
+ return False;
+ }
+
/* parse out the alternate paths */
while((count<MAX_REFERRAL_COUNT) &&
((alt_path[count] = strtok(NULL,",")) != NULL)) {
@@ -266,19 +303,21 @@ static BOOL parse_msdfs_symlink(TALLOC_CTX *ctx,
DEBUG(10,("parse_msdfs_symlink: count=%d\n", count));
if (count) {
- reflist = *preflist = TALLOC_ZERO_ARRAY(ctx, struct referral, count);
+ reflist = *preflist = TALLOC_ZERO_ARRAY(ctx,
+ struct referral, count);
if(reflist == NULL) {
- DEBUG(0,("parse_msdfs_symlink: talloc failed!\n"));
+ TALLOC_FREE(alt_path);
return False;
}
} else {
reflist = *preflist = NULL;
}
-
+
for(i=0;i<count;i++) {
char *p;
- /* Canonicalize link target. Replace all /'s in the path by a \ */
+ /* Canonicalize link target.
+ * Replace all /'s in the path by a \ */
string_replace(alt_path[i], '/', '\\');
/* Remove leading '\\'s */
@@ -287,66 +326,113 @@ static BOOL parse_msdfs_symlink(TALLOC_CTX *ctx,
p++;
}
- pstrcpy(reflist[i].alternate_path, "\\");
- pstrcat(reflist[i].alternate_path, p);
+ reflist[i].alternate_path = talloc_asprintf(ctx,
+ "\\%s",
+ p);
+ if (!reflist[i].alternate_path) {
+ return False;
+ }
reflist[i].proximity = 0;
reflist[i].ttl = REFERRAL_TTL;
- DEBUG(10, ("parse_msdfs_symlink: Created alt path: %s\n", reflist[i].alternate_path));
+ DEBUG(10, ("parse_msdfs_symlink: Created alt path: %s\n",
+ reflist[i].alternate_path));
*refcount += 1;
}
+ TALLOC_FREE(alt_path);
return True;
}
-
+
/**********************************************************************
Returns true if the unix path is a valid msdfs symlink and also
returns the target string from inside the link.
**********************************************************************/
-BOOL is_msdfs_link(connection_struct *conn,
+static BOOL is_msdfs_link_internal(TALLOC_CTX *ctx,
+ connection_struct *conn,
const char *path,
- pstring link_target,
+ char **pp_link_target,
SMB_STRUCT_STAT *sbufp)
{
SMB_STRUCT_STAT st;
int referral_len = 0;
+ char link_target_buf[7];
+ size_t bufsize = 0;
+ char *link_target = NULL;
+
+ if (pp_link_target) {
+ bufsize = 1024;
+ link_target = TALLOC_ARRAY(ctx, char, bufsize);
+ if (!link_target) {
+ return False;
+ }
+ *pp_link_target = link_target;
+ } else {
+ bufsize = sizeof(link_target_buf);
+ link_target = link_target_buf;
+ }
if (sbufp == NULL) {
sbufp = &st;
}
if (SMB_VFS_LSTAT(conn, path, sbufp) != 0) {
- DEBUG(5,("is_msdfs_link: %s does not exist.\n",path));
- return False;
+ DEBUG(5,("is_msdfs_link_read_target: %s does not exist.\n",
+ path));
+ goto err;
}
-
+
if (!S_ISLNK(sbufp->st_mode)) {
- DEBUG(5,("is_msdfs_link: %s is not a link.\n",path));
- return False;
+ DEBUG(5,("is_msdfs_link_read_target: %s is not a link.\n",
+ path));
+ goto err;
}
- /* open the link and read it */
- referral_len = SMB_VFS_READLINK(conn, path, link_target, sizeof(pstring)-1);
+ referral_len = SMB_VFS_READLINK(conn, path, link_target, bufsize - 1);
if (referral_len == -1) {
- DEBUG(0,("is_msdfs_link: Error reading msdfs link %s: %s\n",
+ DEBUG(0,("is_msdfs_link_read_target: Error reading "
+ "msdfs link %s: %s\n",
path, strerror(errno)));
- return False;
+ goto err;
}
link_target[referral_len] = '\0';
- DEBUG(5,("is_msdfs_link: %s -> %s\n",path, link_target));
+ DEBUG(5,("is_msdfs_link_internal: %s -> %s\n",path,
+ link_target));
if (!strnequal(link_target, "msdfs:", 6)) {
- return False;
+ goto err;
}
return True;
+
+ err:
+
+ if (link_target != link_target_buf) {
+ TALLOC_FREE(link_target);
+ }
+ return False;
+}
+
+/**********************************************************************
+ Returns true if the unix path is a valid msdfs symlink.
+**********************************************************************/
+
+BOOL is_msdfs_link(connection_struct *conn,
+ const char *path,
+ SMB_STRUCT_STAT *sbufp)
+{
+ return is_msdfs_link_internal(talloc_tos(),
+ conn,
+ path,
+ NULL,
+ sbufp);
}
/*****************************************************************
Used by other functions to decide if a dfs path is remote,
and to get the list of referred locations for that remote path.
-
+
search_flag: For findfirsts, dfs links themselves are not
redirected, but paths beyond the links are. For normal smb calls,
even dfs links need to be redirected.
@@ -358,24 +444,27 @@ BOOL is_msdfs_link(connection_struct *conn,
link redirect are in targetpath.
*****************************************************************/
-static NTSTATUS dfs_path_lookup(connection_struct *conn,
- const char *dfspath, /* Incoming complete dfs path */
- const struct dfs_path *pdp, /* Parsed out server+share+extrapath. */
- BOOL search_flag, /* Called from a findfirst ? */
- int *consumedcntp,
- pstring targetpath)
+static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ const char *dfspath, /* Incoming complete dfs path */
+ const struct dfs_path *pdp, /* Parsed out
+ server+share+extrapath. */
+ BOOL search_flag, /* Called from a findfirst ? */
+ int *consumedcntp,
+ char **pp_targetpath)
{
char *p = NULL;
char *q = NULL;
SMB_STRUCT_STAT sbuf;
NTSTATUS status;
- pstring localpath;
- pstring canon_dfspath; /* Canonicalized dfs path. (only '/' components). */
+ char *localpath = NULL;
+ char *canon_dfspath = NULL; /* Canonicalized dfs path. (only '/'
+ components). */
DEBUG(10,("dfs_path_lookup: Conn path = %s reqpath = %s\n",
conn->connectpath, pdp->reqpath));
- /*
+ /*
* Note the unix path conversion here we're doing we can
* throw away. We're looking for a symlink for a dfs
* resolution, if we don't find it we'll do another
@@ -387,8 +476,8 @@ static NTSTATUS dfs_path_lookup(connection_struct *conn,
* think this is needed. JRA.
*/
- pstrcpy(localpath, pdp->reqpath);
- status = unix_convert(conn, localpath, search_flag, NULL, &sbuf);
+ status = unix_convert(ctx, conn, pdp->reqpath, search_flag, &localpath,
+ NULL, &sbuf);
if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status,
NT_STATUS_OBJECT_PATH_NOT_FOUND)) {
return status;
@@ -396,7 +485,7 @@ static NTSTATUS dfs_path_lookup(connection_struct *conn,
/* Optimization - check if we can redirect the whole path. */
- if (is_msdfs_link(conn, localpath, targetpath, NULL)) {
+ if (is_msdfs_link_internal(ctx, conn, localpath, pp_targetpath, NULL)) {
if (search_flag) {
DEBUG(6,("dfs_path_lookup (FindFirst) No redirection "
"for dfs link %s.\n", dfspath));
@@ -404,7 +493,8 @@ static NTSTATUS dfs_path_lookup(connection_struct *conn,
}
DEBUG(6,("dfs_path_lookup: %s resolves to a "
- "valid dfs link %s.\n", dfspath, targetpath));
+ "valid dfs link %s.\n", dfspath,
+ pp_targetpath ? *pp_targetpath : ""));
if (consumedcntp) {
*consumedcntp = strlen(dfspath);
@@ -416,7 +506,10 @@ static NTSTATUS dfs_path_lookup(connection_struct *conn,
* so if a Windows path replace all '\\' characters with '/'.
* For a POSIX DFS path we know all separators are already '/'. */
- pstrcpy(canon_dfspath, dfspath);
+ canon_dfspath = talloc_strdup(ctx, dfspath);
+ if (!canon_dfspath) {
+ return NT_STATUS_NO_MEMORY;
+ }
if (!pdp->posix_path) {
string_replace(canon_dfspath, '\\', '/');
}
@@ -431,7 +524,7 @@ static NTSTATUS dfs_path_lookup(connection_struct *conn,
/*
* Redirect if any component in the path is a link.
- * We do this by walking backwards through the
+ * We do this by walking backwards through the
* local path, chopping off the last component
* in both the local path and the canonicalized
* DFS path. If we hit a DFS link then we're done.
@@ -448,14 +541,17 @@ static NTSTATUS dfs_path_lookup(connection_struct *conn,
*q = '\0';
}
- if (is_msdfs_link(conn, localpath, targetpath, NULL)) {
+ if (is_msdfs_link_internal(ctx, conn,
+ localpath, pp_targetpath, NULL)) {
DEBUG(4, ("dfs_path_lookup: Redirecting %s because "
"parent %s is dfs link\n", dfspath, localpath));
if (consumedcntp) {
*consumedcntp = strlen(canon_dfspath);
DEBUG(10, ("dfs_path_lookup: Path consumed: %s "
- "(%d)\n", canon_dfspath, *consumedcntp));
+ "(%d)\n",
+ canon_dfspath,
+ *consumedcntp));
}
return NT_STATUS_PATH_NOT_COVERED;
@@ -477,7 +573,7 @@ static NTSTATUS dfs_path_lookup(connection_struct *conn,
Decides if a dfs pathname should be redirected or not.
If not, the pathname is converted to a tcon-relative local unix path
- search_wcard_flag: this flag performs 2 functions bother related
+ search_wcard_flag: this flag performs 2 functions both related
to searches. See resolve_dfs_path() and parse_dfs_path_XX()
for details.
@@ -485,25 +581,36 @@ static NTSTATUS dfs_path_lookup(connection_struct *conn,
(mapped into a local path).
or NT_STATUS_NOT_COVERED meaning return a DFS redirect, or
any other NT_STATUS error which is a genuine error to be
- returned to the client.
+ returned to the client.
*****************************************************************/
-static NTSTATUS dfs_redirect( connection_struct *conn,
- pstring dfs_path,
+static NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ const char *path_in,
BOOL search_wcard_flag,
+ char **pp_path_out,
BOOL *ppath_contains_wcard)
{
NTSTATUS status;
- struct dfs_path dp;
- pstring targetpath;
-
- status = parse_dfs_path(dfs_path, search_wcard_flag, &dp, ppath_contains_wcard);
+ struct dfs_path *pdp = TALLOC_P(ctx, struct dfs_path);
+
+ if (!pdp) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ status = parse_dfs_path(path_in, search_wcard_flag, pdp,
+ ppath_contains_wcard);
if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(pdp);
return status;
}
- if (dp.reqpath[0] == '\0') {
- pstrcpy(dfs_path, dp.reqpath);
+ if (pdp->reqpath[0] == '\0') {
+ TALLOC_FREE(pdp);
+ *pp_path_out = talloc_strdup(ctx, "");
+ if (!*pp_path_out) {
+ return NT_STATUS_NO_MEMORY;
+ }
DEBUG(5,("dfs_redirect: self-referral.\n"));
return NT_STATUS_OK;
}
@@ -512,45 +619,63 @@ static NTSTATUS dfs_redirect( connection_struct *conn,
path and return OK */
if (!lp_msdfs_root(SNUM(conn))) {
- pstrcpy(dfs_path, dp.reqpath);
+ *pp_path_out = talloc_strdup(ctx, pdp->reqpath);
+ TALLOC_FREE(pdp);
+ if (!*pp_path_out) {
+ return NT_STATUS_NO_MEMORY;
+ }
return NT_STATUS_OK;
}
/* If it looked like a local path (zero hostname/servicename)
- * just treat as a tcon-relative path. */
+ * just treat as a tcon-relative path. */
- if (dp.hostname[0] == '\0' && dp.servicename[0] == '\0') {
- pstrcpy(dfs_path, dp.reqpath);
+ if (pdp->hostname[0] == '\0' && pdp->servicename[0] == '\0') {
+ *pp_path_out = talloc_strdup(ctx, pdp->reqpath);
+ TALLOC_FREE(pdp);
+ if (!*pp_path_out) {
+ return NT_STATUS_NO_MEMORY;
+ }
return NT_STATUS_OK;
}
- if (!( strequal(dp.servicename, lp_servicename(SNUM(conn)))
- || (strequal(dp.servicename, HOMES_NAME)
- && strequal(lp_servicename(SNUM(conn)), get_current_username()) )) ) {
+ if (!( strequal(pdp->servicename, lp_servicename(SNUM(conn)))
+ || (strequal(pdp->servicename, HOMES_NAME)
+ && strequal(lp_servicename(SNUM(conn)),
+ get_current_username()) )) ) {
/* The given sharename doesn't match this connection. */
+ TALLOC_FREE(pdp);
return NT_STATUS_OBJECT_PATH_NOT_FOUND;
}
- status = dfs_path_lookup(conn, dfs_path, &dp,
- search_wcard_flag, NULL, targetpath);
+ status = dfs_path_lookup(ctx, conn, path_in, pdp,
+ search_wcard_flag, NULL, NULL);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status, NT_STATUS_PATH_NOT_COVERED)) {
- DEBUG(3,("dfs_redirect: Redirecting %s\n", dfs_path));
+ DEBUG(3,("dfs_redirect: Redirecting %s\n", path_in));
} else {
- DEBUG(10,("dfs_redirect: dfs_path_lookup failed for %s with %s\n",
- dfs_path, nt_errstr(status) ));
+ DEBUG(10,("dfs_redirect: dfs_path_lookup "
+ "failed for %s with %s\n",
+ path_in, nt_errstr(status) ));
}
return status;
}
- DEBUG(3,("dfs_redirect: Not redirecting %s.\n", dfs_path));
+ DEBUG(3,("dfs_redirect: Not redirecting %s.\n", path_in));
/* Form non-dfs tcon-relative path */
- pstrcpy(dfs_path, dp.reqpath);
+ *pp_path_out = talloc_strdup(ctx, pdp->reqpath);
+ TALLOC_FREE(pdp);
+ if (!*pp_path_out) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ DEBUG(3,("dfs_redirect: Path %s converted to non-dfs path %s\n",
+ path_in,
+ *pp_path_out));
- DEBUG(3,("dfs_redirect: Path converted to non-dfs path %s\n", dfs_path));
return NT_STATUS_OK;
}
@@ -570,11 +695,13 @@ static NTSTATUS self_ref(TALLOC_CTX *ctx,
jucn->referral_count = 1;
if((ref = TALLOC_ZERO_P(ctx, struct referral)) == NULL) {
- DEBUG(0,("self_ref: talloc failed for referral\n"));
return NT_STATUS_NO_MEMORY;
}
- pstrcpy(ref->alternate_path,dfs_path);
+ ref->alternate_path = talloc_strdup(ctx, dfs_path);
+ if (!ref->alternate_path) {
+ return NT_STATUS_NO_MEMORY;
+ }
ref->proximity = 0;
ref->ttl = REFERRAL_TTL;
jucn->referral_list = ref;
@@ -595,57 +722,77 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
{
struct connection_struct conns;
struct connection_struct *conn = &conns;
- struct dfs_path dp;
- pstring conn_path;
- pstring targetpath;
+ char *targetpath = NULL;
int snum;
NTSTATUS status = NT_STATUS_NOT_FOUND;
BOOL dummy;
+ struct dfs_path *pdp = TALLOC_P(ctx, struct dfs_path);
- ZERO_STRUCT(conns);
+ if (!pdp) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ ZERO_STRUCT(conns);
*self_referralp = False;
- status = parse_dfs_path(dfs_path, False, &dp, &dummy);
+ status = parse_dfs_path(dfs_path, False, pdp, &dummy);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
/* Verify hostname in path */
- if (!is_myname_or_ipaddr(dp.hostname)) {
+ if (!is_myname_or_ipaddr(pdp->hostname)) {
DEBUG(3, ("get_referred_path: Invalid hostname %s in path %s\n",
- dp.hostname, dfs_path));
+ pdp->hostname, dfs_path));
+ TALLOC_FREE(pdp);
return NT_STATUS_NOT_FOUND;
}
- fstrcpy(jucn->service_name, dp.servicename);
- pstrcpy(jucn->volume_name, dp.reqpath);
+ jucn->service_name = talloc_strdup(ctx, pdp->servicename);
+ jucn->volume_name = talloc_strdup(ctx, pdp->reqpath);
+ if (!jucn->service_name || !jucn->volume_name) {
+ TALLOC_FREE(pdp);
+ return NT_STATUS_NO_MEMORY;
+ }
/* Verify the share is a dfs root */
snum = lp_servicenumber(jucn->service_name);
if(snum < 0) {
- if ((snum = find_service(jucn->service_name)) < 0) {
+ fstring service_name;
+ fstrcpy(service_name, jucn->service_name);
+ if ((snum = find_service(service_name)) < 0) {
return NT_STATUS_NOT_FOUND;
}
+ TALLOC_FREE(jucn->service_name);
+ jucn->service_name = talloc_strdup(ctx, service_name);
+ if (!jucn->service_name) {
+ TALLOC_FREE(pdp);
+ return NT_STATUS_NO_MEMORY;
+ }
}
- if (!lp_msdfs_root(snum)) {
- DEBUG(3,("get_referred_path: |%s| in dfs path %s is not a dfs root.\n",
- dp.servicename, dfs_path));
+ if (!lp_msdfs_root(snum) && (*lp_msdfs_proxy(snum) == '\0')) {
+ DEBUG(3,("get_referred_path: |%s| in dfs path %s is not "
+ "a dfs root.\n",
+ pdp->servicename, dfs_path));
+ TALLOC_FREE(pdp);
return NT_STATUS_NOT_FOUND;
}
/*
* Self referrals are tested with a anonymous IPC connection and
- * a GET_DFS_REFERRAL call to \\server\share. (which means dp.reqpath[0] points
- * to an empty string). create_conn_struct cd's into the directory and will
- * fail if it cannot (as the anonymous user). Cope with this.
+ * a GET_DFS_REFERRAL call to \\server\share. (which means
+ * dp.reqpath[0] points to an empty string). create_conn_struct cd's
+ * into the directory and will fail if it cannot (as the anonymous
+ * user). Cope with this.
*/
- if (dp.reqpath[0] == '\0') {
+ if (pdp->reqpath[0] == '\0') {
+ char *tmp;
struct referral *ref;
if (*lp_msdfs_proxy(snum) == '\0') {
+ TALLOC_FREE(pdp);
return self_ref(ctx,
dfs_path,
jucn,
@@ -653,44 +800,67 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
self_referralp);
}
- /*
+ /*
* It's an msdfs proxy share. Redirect to
* the configured target share.
*/
jucn->referral_count = 1;
if ((ref = TALLOC_ZERO_P(ctx, struct referral)) == NULL) {
- DEBUG(0, ("malloc failed for referral\n"));
+ TALLOC_FREE(pdp);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ if (!(tmp = talloc_strdup(ctx, lp_msdfs_proxy(snum)))) {
+ TALLOC_FREE(pdp);
return NT_STATUS_NO_MEMORY;
}
- pstrcpy(ref->alternate_path, lp_msdfs_proxy(snum));
- if (dp.reqpath[0] != '\0') {
- pstrcat(ref->alternate_path, dp.reqpath);
+ trim_string(tmp, "\\", 0);
+
+ ref->alternate_path = talloc_asprintf(ctx, "\\%s", tmp);
+ TALLOC_FREE(tmp);
+
+ if (!ref->alternate_path) {
+ TALLOC_FREE(pdp);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ if (pdp->reqpath[0] != '\0') {
+ ref->alternate_path = talloc_asprintf_append(
+ ref->alternate_path,
+ "%s",
+ pdp->reqpath);
+ if (!ref->alternate_path) {
+ TALLOC_FREE(pdp);
+ return NT_STATUS_NO_MEMORY;
+ }
}
ref->proximity = 0;
ref->ttl = REFERRAL_TTL;
jucn->referral_list = ref;
*consumedcntp = strlen(dfs_path);
+ TALLOC_FREE(pdp);
return NT_STATUS_OK;
}
- pstrcpy(conn_path, lp_pathname(snum));
- status = create_conn_struct(conn, snum, conn_path);
+ status = create_conn_struct(conn, snum, lp_pathname(snum));
if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(pdp);
return status;
}
/* If this is a DFS path dfs_lookup should return
* NT_STATUS_PATH_NOT_COVERED. */
- status = dfs_path_lookup(conn, dfs_path, &dp,
- False, consumedcntp, targetpath);
+ status = dfs_path_lookup(ctx, conn, dfs_path, pdp,
+ False, consumedcntp, &targetpath);
if (!NT_STATUS_EQUAL(status, NT_STATUS_PATH_NOT_COVERED)) {
DEBUG(3,("get_referred_path: No valid referrals for path %s\n",
dfs_path));
conn_free_internal(conn);
+ TALLOC_FREE(pdp);
return status;
}
@@ -701,22 +871,24 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
DEBUG(3,("get_referred_path: failed to parse symlink "
"target %s\n", targetpath ));
conn_free_internal(conn);
+ TALLOC_FREE(pdp);
return NT_STATUS_NOT_FOUND;
}
conn_free_internal(conn);
+ TALLOC_FREE(pdp);
return NT_STATUS_OK;
}
static int setup_ver2_dfs_referral(const char *pathname,
- char **ppdata,
+ char **ppdata,
struct junction_map *junction,
int consumedcnt,
BOOL self_referral)
{
char* pdata = *ppdata;
- unsigned char uni_requestedpath[1024];
+ unsigned char uni_requestedpath[sizeof(pstring)];
int uni_reqpathoffset1,uni_reqpathoffset2;
int uni_curroffset;
int requestedpathlen=0;
@@ -726,30 +898,35 @@ static int setup_ver2_dfs_referral(const char *pathname,
DEBUG(10,("Setting up version2 referral\nRequested path:\n"));
- requestedpathlen = rpcstr_push(uni_requestedpath, pathname, sizeof(pstring),
- STR_TERMINATE);
+ requestedpathlen = rpcstr_push(uni_requestedpath,
+ pathname, sizeof(pstring),
+ STR_TERMINATE);
if (DEBUGLVL(10)) {
- dump_data(0, uni_requestedpath,requestedpathlen);
+ dump_data(0, uni_requestedpath,requestedpathlen);
}
DEBUG(10,("ref count = %u\n",junction->referral_count));
- uni_reqpathoffset1 = REFERRAL_HEADER_SIZE +
+ uni_reqpathoffset1 = REFERRAL_HEADER_SIZE +
VERSION2_REFERRAL_SIZE * junction->referral_count;
uni_reqpathoffset2 = uni_reqpathoffset1 + requestedpathlen;
uni_curroffset = uni_reqpathoffset2 + requestedpathlen;
- reply_size = REFERRAL_HEADER_SIZE + VERSION2_REFERRAL_SIZE*junction->referral_count +
- 2 * requestedpathlen;
+ reply_size = REFERRAL_HEADER_SIZE +
+ VERSION2_REFERRAL_SIZE*junction->referral_count +
+ 2 * requestedpathlen;
DEBUG(10,("reply_size: %u\n",reply_size));
/* add up the unicode lengths of all the referral paths */
for(i=0;i<junction->referral_count;i++) {
- DEBUG(10,("referral %u : %s\n",i,junction->referral_list[i].alternate_path));
- reply_size += (strlen(junction->referral_list[i].alternate_path)+1)*2;
+ DEBUG(10,("referral %u : %s\n",
+ i,
+ junction->referral_list[i].alternate_path));
+ reply_size +=
+ (strlen(junction->referral_list[i].alternate_path)+1)*2;
}
DEBUG(10,("reply_size = %u\n",reply_size));
@@ -769,9 +946,10 @@ static int setup_ver2_dfs_referral(const char *pathname,
/* create the header */
SSVAL(pdata,0,consumedcnt * 2); /* path consumed */
- SSVAL(pdata,2,junction->referral_count); /* number of referral in this pkt */
+ /* number of referral in this pkt */
+ SSVAL(pdata,2,junction->referral_count);
if(self_referral) {
- SIVAL(pdata,4,DFSREF_REFERRAL_SERVER | DFSREF_STORAGE_SERVER);
+ SIVAL(pdata,4,DFSREF_REFERRAL_SERVER | DFSREF_STORAGE_SERVER);
} else {
SIVAL(pdata,4,DFSREF_STORAGE_SERVER);
}
@@ -789,7 +967,9 @@ static int setup_ver2_dfs_referral(const char *pathname,
} else {
SSVAL(pdata,offset+4,0);
}
- SSVAL(pdata,offset+6,0); /* ref_flags :use path_consumed bytes? */
+
+ /* ref_flags :use path_consumed bytes? */
+ SSVAL(pdata,offset+6,0);
SIVAL(pdata,offset+8,ref->proximity);
SIVAL(pdata,offset+12,ref->ttl);
@@ -810,41 +990,47 @@ static int setup_ver2_dfs_referral(const char *pathname,
}
static int setup_ver3_dfs_referral(const char *pathname,
- char **ppdata,
+ char **ppdata,
struct junction_map *junction,
int consumedcnt,
BOOL self_referral)
{
- char* pdata = *ppdata;
+ char *pdata = *ppdata;
- unsigned char uni_reqpath[1024];
+ unsigned char uni_reqpath[sizeof(pstring)];
int uni_reqpathoffset1, uni_reqpathoffset2;
int uni_curroffset;
int reply_size = 0;
int reqpathlen = 0;
int offset,i=0;
-
+
DEBUG(10,("setting up version3 referral\n"));
- reqpathlen = rpcstr_push(uni_reqpath, pathname, sizeof(pstring), STR_TERMINATE);
-
+ reqpathlen = rpcstr_push(uni_reqpath, pathname,
+ sizeof(pstring), STR_TERMINATE);
+
if (DEBUGLVL(10)) {
- dump_data(0, uni_reqpath,reqpathlen);
+ dump_data(0, uni_reqpath,reqpathlen);
}
- uni_reqpathoffset1 = REFERRAL_HEADER_SIZE + VERSION3_REFERRAL_SIZE * junction->referral_count;
+ uni_reqpathoffset1 = REFERRAL_HEADER_SIZE +
+ VERSION3_REFERRAL_SIZE * junction->referral_count;
uni_reqpathoffset2 = uni_reqpathoffset1 + reqpathlen;
reply_size = uni_curroffset = uni_reqpathoffset2 + reqpathlen;
for(i=0;i<junction->referral_count;i++) {
- DEBUG(10,("referral %u : %s\n",i,junction->referral_list[i].alternate_path));
- reply_size += (strlen(junction->referral_list[i].alternate_path)+1)*2;
+ DEBUG(10,("referral %u : %s\n",
+ i,
+ junction->referral_list[i].alternate_path));
+ reply_size +=
+ (strlen(junction->referral_list[i].alternate_path)+1)*2;
}
pdata = (char *)SMB_REALLOC(pdata,reply_size);
if(pdata == NULL) {
- DEBUG(0,("version3 referral setup: malloc failed for Realloc!\n"));
+ DEBUG(0,("version3 referral setup:"
+ "malloc failed for Realloc!\n"));
return -1;
}
*ppdata = pdata;
@@ -853,15 +1039,15 @@ static int setup_ver3_dfs_referral(const char *pathname,
SSVAL(pdata,0,consumedcnt * 2); /* path consumed */
SSVAL(pdata,2,junction->referral_count); /* number of referral */
if(self_referral) {
- SIVAL(pdata,4,DFSREF_REFERRAL_SERVER | DFSREF_STORAGE_SERVER);
+ SIVAL(pdata,4,DFSREF_REFERRAL_SERVER | DFSREF_STORAGE_SERVER);
} else {
SIVAL(pdata,4,DFSREF_STORAGE_SERVER);
}
-
+
/* copy in the reqpaths */
memcpy(pdata+uni_reqpathoffset1,uni_reqpath,reqpathlen);
memcpy(pdata+uni_reqpathoffset2,uni_reqpath,reqpathlen);
-
+
offset = 8;
for(i=0;i<junction->referral_count;i++) {
struct referral* ref = &(junction->referral_list[i]);
@@ -875,14 +1061,16 @@ static int setup_ver3_dfs_referral(const char *pathname,
SSVAL(pdata,offset+4,0);
}
- SSVAL(pdata,offset+6,0); /* ref_flags :use path_consumed bytes? */
+ /* ref_flags :use path_consumed bytes? */
+ SSVAL(pdata,offset+6,0);
SIVAL(pdata,offset+8,ref->ttl);
-
+
SSVAL(pdata,offset+12,uni_reqpathoffset1-offset);
SSVAL(pdata,offset+14,uni_reqpathoffset2-offset);
/* copy referred path into current offset */
unilen = rpcstr_push(pdata+uni_curroffset,ref->alternate_path,
- sizeof(pstring), STR_UNICODE | STR_TERMINATE);
+ sizeof(pstring),
+ STR_UNICODE | STR_TERMINATE);
SSVAL(pdata,offset+16,uni_curroffset-offset);
/* copy 0x10 bytes of 00's in the ServiceSite GUID */
memset(pdata+offset+18,'\0',16);
@@ -905,12 +1093,12 @@ int setup_dfs_referral(connection_struct *orig_conn,
int max_referral_level,
char **ppdata, NTSTATUS *pstatus)
{
- struct junction_map junction;
+ struct junction_map *junction = NULL;
int consumedcnt = 0;
BOOL self_referral = False;
int reply_size = 0;
char *pathnamep = NULL;
- pstring local_dfs_path;
+ char *local_dfs_path = NULL;
TALLOC_CTX *ctx;
if (!(ctx=talloc_init("setup_dfs_referral"))) {
@@ -918,8 +1106,6 @@ int setup_dfs_referral(connection_struct *orig_conn,
return -1;
}
- ZERO_STRUCT(junction);
-
/* get the junction entry */
if (!dfs_path) {
talloc_destroy(ctx);
@@ -927,34 +1113,51 @@ int setup_dfs_referral(connection_struct *orig_conn,
return -1;
}
- /*
+ /*
* Trim pathname sent by client so it begins with only one backslash.
* Two backslashes confuse some dfs clients
*/
- pstrcpy(local_dfs_path, dfs_path);
+ local_dfs_path = talloc_strdup(ctx,dfs_path);
+ if (!local_dfs_path) {
+ *pstatus = NT_STATUS_NO_MEMORY;
+ talloc_destroy(ctx);
+ return -1;
+ }
pathnamep = local_dfs_path;
- while (IS_DIRECTORY_SEP(pathnamep[0]) && IS_DIRECTORY_SEP(pathnamep[1])) {
+ while (IS_DIRECTORY_SEP(pathnamep[0]) &&
+ IS_DIRECTORY_SEP(pathnamep[1])) {
pathnamep++;
}
+ junction = TALLOC_ZERO_P(ctx, struct junction_map);
+ if (!junction) {
+ *pstatus = NT_STATUS_NO_MEMORY;
+ talloc_destroy(ctx);
+ return -1;
+ }
+
/* The following call can change cwd. */
- *pstatus = get_referred_path(ctx, pathnamep, &junction, &consumedcnt, &self_referral);
+ *pstatus = get_referred_path(ctx, pathnamep, junction,
+ &consumedcnt, &self_referral);
if (!NT_STATUS_IS_OK(*pstatus)) {
vfs_ChDir(orig_conn,orig_conn->connectpath);
talloc_destroy(ctx);
return -1;
}
vfs_ChDir(orig_conn,orig_conn->connectpath);
-
+
if (!self_referral) {
pathnamep[consumedcnt] = '\0';
if( DEBUGLVL( 3 ) ) {
int i=0;
- dbgtext("setup_dfs_referral: Path %s to alternate path(s):",pathnamep);
- for(i=0;i<junction.referral_count;i++)
- dbgtext(" %s",junction.referral_list[i].alternate_path);
+ dbgtext("setup_dfs_referral: Path %s to "
+ "alternate path(s):",
+ pathnamep);
+ for(i=0;i<junction->referral_count;i++)
+ dbgtext(" %s",
+ junction->referral_list[i].alternate_path);
dbgtext(".\n");
}
}
@@ -971,20 +1174,23 @@ int setup_dfs_referral(connection_struct *orig_conn,
switch(max_referral_level) {
case 2:
- reply_size = setup_ver2_dfs_referral(pathnamep, ppdata, &junction,
- consumedcnt, self_referral);
+ reply_size = setup_ver2_dfs_referral(pathnamep,
+ ppdata, junction,
+ consumedcnt, self_referral);
break;
case 3:
- reply_size = setup_ver3_dfs_referral(pathnamep, ppdata, &junction,
- consumedcnt, self_referral);
+ reply_size = setup_ver3_dfs_referral(pathnamep, ppdata,
+ junction, consumedcnt, self_referral);
break;
default:
- DEBUG(0,("setup_dfs_referral: Invalid dfs referral version: %d\n", max_referral_level));
+ DEBUG(0,("setup_dfs_referral: Invalid dfs referral "
+ "version: %d\n",
+ max_referral_level));
talloc_destroy(ctx);
*pstatus = NT_STATUS_INVALID_LEVEL;
return -1;
}
-
+
if (DEBUGLVL(10)) {
DEBUGADD(0,("DFS Referral pdata:\n"));
dump_data(0,(uint8 *)*ppdata,reply_size);
@@ -1003,73 +1209,87 @@ int setup_dfs_referral(connection_struct *orig_conn,
Creates a junction structure from a DFS pathname
**********************************************************************/
-BOOL create_junction(const char *dfs_path, struct junction_map *jucn)
+BOOL create_junction(TALLOC_CTX *ctx,
+ const char *dfs_path,
+ struct junction_map *jucn)
{
int snum;
BOOL dummy;
- struct dfs_path dp;
-
- NTSTATUS status = parse_dfs_path(dfs_path, False, &dp, &dummy);
+ struct dfs_path *pdp = TALLOC_P(ctx,struct dfs_path);
+ NTSTATUS status;
+ if (!pdp) {
+ return False;
+ }
+ status = parse_dfs_path(dfs_path, False, pdp, &dummy);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
/* check if path is dfs : validate first token */
- if (!is_myname_or_ipaddr(dp.hostname)) {
- DEBUG(4,("create_junction: Invalid hostname %s in dfs path %s\n",
- dp.hostname, dfs_path));
+ if (!is_myname_or_ipaddr(pdp->hostname)) {
+ DEBUG(4,("create_junction: Invalid hostname %s "
+ "in dfs path %s\n",
+ pdp->hostname, dfs_path));
+ TALLOC_FREE(pdp);
return False;
}
/* Check for a non-DFS share */
- snum = lp_servicenumber(dp.servicename);
+ snum = lp_servicenumber(pdp->servicename);
if(snum < 0 || !lp_msdfs_root(snum)) {
DEBUG(4,("create_junction: %s is not an msdfs root.\n",
- dp.servicename));
+ pdp->servicename));
+ TALLOC_FREE(pdp);
return False;
}
- fstrcpy(jucn->service_name,dp.servicename);
- pstrcpy(jucn->volume_name,dp.reqpath);
- pstrcpy(jucn->comment, lp_comment(snum));
+ jucn->service_name = talloc_strdup(ctx, pdp->servicename);
+ jucn->volume_name = talloc_strdup(ctx, pdp->reqpath);
+ jucn->comment = talloc_strdup(ctx, lp_comment(snum));
+
+ TALLOC_FREE(pdp);
+ if (!jucn->service_name || !jucn->volume_name || ! jucn->comment) {
+ return False;
+ }
return True;
}
/**********************************************************************
- Forms a valid Unix pathname from the junction
+ Forms a valid Unix pathname from the junction
**********************************************************************/
-static BOOL junction_to_local_path(struct junction_map *jucn,
- char *path,
- int max_pathlen,
+static BOOL junction_to_local_path(const struct junction_map *jucn,
+ char **pp_path_out,
connection_struct *conn_out)
{
int snum;
- pstring conn_path;
snum = lp_servicenumber(jucn->service_name);
if(snum < 0) {
return False;
}
-
- safe_strcpy(path, lp_pathname(snum), max_pathlen-1);
- safe_strcat(path, "/", max_pathlen-1);
- safe_strcat(path, jucn->volume_name, max_pathlen-1);
-
- pstrcpy(conn_path, lp_pathname(snum));
- if (!NT_STATUS_IS_OK(create_conn_struct(conn_out, snum, conn_path))) {
+ if (!NT_STATUS_IS_OK(create_conn_struct(conn_out, snum,
+ lp_pathname(snum)))) {
return False;
}
+ *pp_path_out = talloc_asprintf(conn_out->mem_ctx,
+ "%s/%s",
+ lp_pathname(snum),
+ jucn->volume_name);
+ if (!*pp_path_out) {
+ return False;
+ }
return True;
}
-BOOL create_msdfs_link(struct junction_map *jucn, BOOL exists)
+BOOL create_msdfs_link(const struct junction_map *jucn,
+ BOOL exists)
{
- pstring path;
- pstring msdfs_link;
+ char *path = NULL;
+ char *msdfs_link = NULL;
connection_struct conns;
connection_struct *conn = &conns;
int i=0;
@@ -1078,15 +1298,18 @@ BOOL create_msdfs_link(struct junction_map *jucn, BOOL exists)
ZERO_STRUCT(conns);
- if(!junction_to_local_path(jucn, path, sizeof(path), conn)) {
+ if(!junction_to_local_path(jucn, &path, conn)) {
return False;
}
-
+
/* Form the msdfs_link contents */
- pstrcpy(msdfs_link, "msdfs:");
+ msdfs_link = talloc_strdup(conn->mem_ctx, "msdfs:");
+ if (!msdfs_link) {
+ goto out;
+ }
for(i=0; i<jucn->referral_count; i++) {
- char* refpath = jucn->referral_list[i].alternate_path;
-
+ char *refpath = jucn->referral_list[i].alternate_path;
+
/* Alternate paths always use Windows separators. */
trim_char(refpath, '\\', '\\');
if(*refpath == '\0') {
@@ -1096,10 +1319,18 @@ BOOL create_msdfs_link(struct junction_map *jucn, BOOL exists)
continue;
}
if (i > 0 && insert_comma) {
- pstrcat(msdfs_link, ",");
+ msdfs_link = talloc_asprintf_append_buffer(msdfs_link,
+ ",%s",
+ refpath);
+ } else {
+ msdfs_link = talloc_asprintf_append_buffer(msdfs_link,
+ "%s",
+ refpath);
}
- pstrcat(msdfs_link, refpath);
+ if (!msdfs_link) {
+ goto out;
+ }
if (!insert_comma) {
insert_comma = True;
}
@@ -1115,12 +1346,12 @@ BOOL create_msdfs_link(struct junction_map *jucn, BOOL exists)
}
if(SMB_VFS_SYMLINK(conn, msdfs_link, path) < 0) {
- DEBUG(1,("create_msdfs_link: symlink failed %s -> %s\nError: %s\n",
- path, msdfs_link, strerror(errno)));
+ DEBUG(1,("create_msdfs_link: symlink failed "
+ "%s -> %s\nError: %s\n",
+ path, msdfs_link, strerror(errno)));
goto out;
}
-
-
+
ret = True;
out:
@@ -1129,47 +1360,105 @@ out:
return ret;
}
-BOOL remove_msdfs_link(struct junction_map *jucn)
+BOOL remove_msdfs_link(const struct junction_map *jucn)
{
- pstring path;
+ char *path = NULL;
connection_struct conns;
connection_struct *conn = &conns;
BOOL ret = False;
ZERO_STRUCT(conns);
- if( junction_to_local_path(jucn, path, sizeof(path), conn) ) {
+ if( junction_to_local_path(jucn, &path, conn) ) {
if( SMB_VFS_UNLINK(conn, path) == 0 ) {
ret = True;
}
- talloc_destroy( conn->mem_ctx );
}
conn_free_internal(conn);
return ret;
}
+/*********************************************************************
+ Return the number of DFS links at the root of this share.
+*********************************************************************/
+
+static int count_dfs_links(TALLOC_CTX *ctx, int snum)
+{
+ size_t cnt = 0;
+ SMB_STRUCT_DIR *dirp = NULL;
+ char *dname = NULL;
+ const char *connect_path = lp_pathname(snum);
+ const char *msdfs_proxy = lp_msdfs_proxy(snum);
+ connection_struct conn;
+
+ ZERO_STRUCT(conn);
+
+ if(*connect_path == '\0') {
+ return 0;
+ }
+
+ /*
+ * Fake up a connection struct for the VFS layer.
+ */
+
+ if (!NT_STATUS_IS_OK(create_conn_struct(&conn, snum, connect_path))) {
+ return 0;
+ }
+
+ /* Count a link for the msdfs root - convention */
+ cnt = 1;
+
+ /* No more links if this is an msdfs proxy. */
+ if (*msdfs_proxy != '\0') {
+ goto out;
+ }
+
+ /* Now enumerate all dfs links */
+ dirp = SMB_VFS_OPENDIR(&conn, ".", NULL, 0);
+ if(!dirp) {
+ goto out;
+ }
+
+ while ((dname = vfs_readdirname(&conn, dirp)) != NULL) {
+ if (is_msdfs_link(&conn,
+ dname,
+ NULL)) {
+ cnt++;
+ }
+ }
+
+ SMB_VFS_CLOSEDIR(&conn,dirp);
+
+out:
+
+ conn_free_internal(&conn);
+ return cnt;
+}
+
+/*********************************************************************
+*********************************************************************/
+
static int form_junctions(TALLOC_CTX *ctx,
int snum,
struct junction_map *jucn,
- int jn_remain)
+ size_t jn_remain)
{
- int cnt = 0;
- SMB_STRUCT_DIR *dirp;
- char *dname;
- pstring connect_path;
+ size_t cnt = 0;
+ SMB_STRUCT_DIR *dirp = NULL;
+ char *dname = NULL;
+ const char *connect_path = lp_pathname(snum);
char *service_name = lp_servicename(snum);
+ const char *msdfs_proxy = lp_msdfs_proxy(snum);
connection_struct conn;
struct referral *ref = NULL;
-
+
ZERO_STRUCT(conn);
- if (jn_remain <= 0) {
+ if (jn_remain == 0) {
return 0;
}
- pstrcpy(connect_path,lp_pathname(snum));
-
if(*connect_path == '\0') {
return 0;
}
@@ -1182,33 +1471,44 @@ static int form_junctions(TALLOC_CTX *ctx,
return 0;
}
- /* form a junction for the msdfs root - convention
+ /* form a junction for the msdfs root - convention
DO NOT REMOVE THIS: NT clients will not work with us
if this is not present
- */
- fstrcpy(jucn[cnt].service_name, service_name);
- jucn[cnt].volume_name[0] = '\0';
+ */
+ jucn[cnt].service_name = talloc_strdup(ctx,service_name);
+ jucn[cnt].volume_name = talloc_strdup(ctx, "");
+ if (!jucn[cnt].service_name || jucn[cnt].volume_name) {
+ goto out;
+ }
jucn[cnt].referral_count = 1;
ref = jucn[cnt].referral_list = TALLOC_ZERO_P(ctx, struct referral);
if (jucn[cnt].referral_list == NULL) {
- DEBUG(0, ("talloc failed!\n"));
goto out;
}
ref->proximity = 0;
ref->ttl = REFERRAL_TTL;
- if (*lp_msdfs_proxy(snum) != '\0') {
- pstrcpy(ref->alternate_path, lp_msdfs_proxy(snum));
- cnt++;
- goto out;
- }
-
- pstr_sprintf(ref->alternate_path, "\\\\%s\\%s",
+ if (*msdfs_proxy != '\0') {
+ ref->alternate_path = talloc_strdup(ctx,
+ msdfs_proxy);
+ } else {
+ ref->alternate_path = talloc_asprintf(ctx,
+ "\\\\%s\\%s",
get_local_machine_name(),
service_name);
+ }
+
+ if (!ref->alternate_path) {
+ goto out;
+ }
cnt++;
+ /* Don't enumerate if we're an msdfs proxy. */
+ if (*msdfs_proxy != '\0') {
+ goto out;
+ }
+
/* Now enumerate all dfs links */
dirp = SMB_VFS_OPENDIR(&conn, ".", NULL, 0);
if(!dirp) {
@@ -1216,41 +1516,55 @@ static int form_junctions(TALLOC_CTX *ctx,
}
while ((dname = vfs_readdirname(&conn, dirp)) != NULL) {
- pstring link_target;
+ char *link_target = NULL;
if (cnt >= jn_remain) {
SMB_VFS_CLOSEDIR(&conn,dirp);
- DEBUG(2, ("ran out of MSDFS junction slots"));
+ DEBUG(2, ("form_junctions: ran out of MSDFS "
+ "junction slots"));
goto out;
}
- if (is_msdfs_link(&conn, dname, link_target, NULL)) {
+ if (is_msdfs_link_internal(ctx,
+ &conn,
+ dname, &link_target,
+ NULL)) {
if (parse_msdfs_symlink(ctx,
link_target,
&jucn[cnt].referral_list,
&jucn[cnt].referral_count)) {
- fstrcpy(jucn[cnt].service_name, service_name);
- pstrcpy(jucn[cnt].volume_name, dname);
+ jucn[cnt].service_name = talloc_strdup(ctx,
+ service_name);
+ jucn[cnt].volume_name = talloc_strdup(ctx,
+ dname);
+ if (!jucn[cnt].service_name ||
+ !jucn[cnt].volume_name) {
+ goto out;
+ }
cnt++;
}
}
}
-
- SMB_VFS_CLOSEDIR(&conn,dirp);
out:
+ if (dirp) {
+ SMB_VFS_CLOSEDIR(&conn,dirp);
+ }
+
conn_free_internal(&conn);
return cnt;
}
-int enum_msdfs_links(TALLOC_CTX *ctx, struct junction_map *jucn, int jn_max)
+struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx, size_t *p_num_jn)
{
+ struct junction_map *jn = NULL;
int i=0;
+ size_t jn_count = 0;
int sharecount = 0;
- int jn_count = 0;
+ *p_num_jn = 0;
if(!lp_host_msdfs()) {
- return 0;
+ return NULL;
}
/* Ensure all the usershares are loaded. */
@@ -1259,24 +1573,57 @@ int enum_msdfs_links(TALLOC_CTX *ctx, struct junction_map *jucn, int jn_max)
sharecount = load_usershare_shares();
unbecome_root();
- for(i=0;i < sharecount && (jn_max - jn_count) > 0;i++) {
+ for(i=0;i < sharecount;i++) {
+ if(lp_msdfs_root(i)) {
+ jn_count += count_dfs_links(ctx, i);
+ }
+ }
+ if (jn_count == 0) {
+ return NULL;
+ }
+ jn = TALLOC_ARRAY(ctx, struct junction_map, jn_count);
+ if (!jn) {
+ return NULL;
+ }
+ for(i=0; i < sharecount; i++) {
+ if (*p_num_jn >= jn_count) {
+ break;
+ }
if(lp_msdfs_root(i)) {
- jn_count += form_junctions(ctx, i,jucn,jn_max - jn_count);
+ *p_num_jn += form_junctions(ctx, i,
+ &jn[*p_num_jn],
+ jn_count - *p_num_jn);
}
}
- return jn_count;
+ return jn;
}
/******************************************************************************
Core function to resolve a dfs pathname.
******************************************************************************/
-NTSTATUS resolve_dfspath(connection_struct *conn, BOOL dfs_pathnames, pstring name)
+NTSTATUS resolve_dfspath(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ BOOL dfs_pathnames,
+ const char *name_in,
+ char **pp_name_out)
{
NTSTATUS status = NT_STATUS_OK;
BOOL dummy;
if (dfs_pathnames) {
- status = dfs_redirect(conn, name, False, &dummy);
+ status = dfs_redirect(ctx,
+ conn,
+ name_in,
+ False,
+ pp_name_out,
+ &dummy);
+ } else {
+ /*
+ * Cheat and just return a copy of the in ptr.
+ * Once srvstr_get_path() uses talloc it'll
+ * be a talloced ptr anyway.
+ */
+ *pp_name_out = CONST_DISCARD(char *,name_in);
}
return status;
}
@@ -1288,11 +1635,28 @@ NTSTATUS resolve_dfspath(connection_struct *conn, BOOL dfs_pathnames, pstring na
we're allowing wildcards and when we're not. JRA.
******************************************************************************/
-NTSTATUS resolve_dfspath_wcard(connection_struct *conn, BOOL dfs_pathnames, pstring name, BOOL *ppath_contains_wcard)
+NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ BOOL dfs_pathnames,
+ const char *name_in,
+ char **pp_name_out,
+ BOOL *ppath_contains_wcard)
{
NTSTATUS status = NT_STATUS_OK;
if (dfs_pathnames) {
- status = dfs_redirect(conn, name, True, ppath_contains_wcard);
+ status = dfs_redirect(ctx,
+ conn,
+ name_in,
+ True,
+ pp_name_out,
+ ppath_contains_wcard);
+ } else {
+ /*
+ * Cheat and just return a copy of the in ptr.
+ * Once srvstr_get_path() uses talloc it'll
+ * be a talloced ptr anyway.
+ */
+ *pp_name_out = CONST_DISCARD(char *,name_in);
}
return status;
}
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index b5af173d45e..e69fd86995d 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -1,7 +1,7 @@
/*
Unix SMB/CIFS implementation.
SMB NT transaction handling
- Copyright (C) Jeremy Allison 1994-1998
+ Copyright (C) Jeremy Allison 1994-2007
Copyright (C) Stefan (metze) Metzmacher 2003
This program is free software; you can redistribute it and/or modify
@@ -51,7 +51,7 @@ static char *nttrans_realloc(char **ptr, size_t size)
if (ptr==NULL) {
smb_panic("nttrans_realloc() called with NULL ptr");
}
-
+
*ptr = (char *)SMB_REALLOC(*ptr, size);
if(*ptr == NULL) {
return NULL;
@@ -80,7 +80,7 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
int alignment_offset = 3;
int data_alignment_offset = 0;
- /*
+ /*
* If there genuinely are no parameters or data to send just send
* the empty packet.
*/
@@ -101,10 +101,10 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
data_alignment_offset = 4 - (params_to_send % 4);
}
- /*
+ /*
* Space is bufsize minus Netbios over TCP header minus SMB header.
* The alignment_offset is to align the param bytes on a four byte
- * boundary (2 bytes for data len, one byte pad).
+ * boundary (2 bytes for data len, one byte pad).
* NT needs this to work correctly.
*/
@@ -131,7 +131,7 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
total_sent_thistime = params_to_send + data_to_send +
alignment_offset + data_alignment_offset;
- /*
+ /*
* We can never send more than useable_space.
*/
@@ -146,7 +146,7 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
SIVAL(req->outbuf,smb_ntr_TotalParameterCount,paramsize);
SIVAL(req->outbuf,smb_ntr_TotalDataCount,datasize);
- /*
+ /*
* Calculate how many parameters and data we can fit into
* this packet. Parameters get precedence.
*/
@@ -172,7 +172,7 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
SIVAL(req->outbuf,smb_ntr_ParameterOffset,
((smb_buf(req->outbuf)+alignment_offset)
- smb_base(req->outbuf)));
- /*
+ /*
* Absolute displacement of param bytes sent in this packet.
*/
@@ -202,7 +202,7 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
SIVAL(req->outbuf,smb_ntr_DataDisplacement, pd - pdata);
}
- /*
+ /*
* Copy the param bytes into the packet.
*/
@@ -229,7 +229,7 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
+params_sent_thistime+data_alignment_offset,
pd,data_sent_thistime);
}
-
+
DEBUG(9,("nt_rep: params_sent_thistime = %d, data_sent_thistime = %d, useable_space = %d\n",
params_sent_thistime, data_sent_thistime, useable_space));
DEBUG(9,("nt_rep: params_to_send = %d, data_to_send = %d, paramsize = %d, datasize = %d\n",
@@ -240,7 +240,7 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
0, 0, nt_error,
__LINE__,__FILE__);
}
-
+
/* Send the packet */
show_msg((char *)req->outbuf);
if (!send_smb(smbd_server_fd(),(char *)req->outbuf)) {
@@ -248,10 +248,10 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
}
TALLOC_FREE(req->outbuf);
-
+
pp += params_sent_thistime;
pd += data_sent_thistime;
-
+
params_to_send -= params_sent_thistime;
data_to_send -= data_sent_thistime;
@@ -264,7 +264,7 @@ void send_nt_replies(struct smb_request *req, NTSTATUS nt_error,
params_to_send, data_to_send));
return;
}
- }
+ }
}
/****************************************************************************
@@ -385,14 +385,20 @@ static void nt_open_pipe(char *fname, connection_struct *conn,
static void do_ntcreate_pipe_open(connection_struct *conn,
struct smb_request *req)
{
- pstring fname;
+ char *fname = NULL;
int pnum = -1;
char *p = NULL;
uint32 flags = IVAL(req->inbuf,smb_ntcreate_Flags);
+ TALLOC_CTX *ctx = talloc_tos();
- srvstr_pull_buf((char *)req->inbuf, req->flags2, fname,
- smb_buf(req->inbuf), sizeof(fname), STR_TERMINATE);
+ srvstr_pull_buf_talloc(ctx, (char *)req->inbuf, req->flags2, &fname,
+ smb_buf(req->inbuf), STR_TERMINATE);
+ if (!fname) {
+ reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND,
+ ERRDOS, ERRbadpipe);
+ return;
+ }
nt_open_pipe(fname, conn, req, &pnum);
if (req->outbuf) {
@@ -402,7 +408,7 @@ static void do_ntcreate_pipe_open(connection_struct *conn,
/*
* Deal with pipe return.
- */
+ */
if (flags & EXTENDED_RESPONSE_REQUIRED) {
/* This is very strange. We
@@ -434,7 +440,7 @@ static void do_ntcreate_pipe_open(connection_struct *conn,
if (flags & EXTENDED_RESPONSE_REQUIRED) {
p += 25;
SIVAL(p,0,FILE_GENERIC_ALL);
- /*
+ /*
* For pipes W2K3 seems to return
* 0x12019B next.
* This is ((FILE_GENERIC_READ|FILE_GENERIC_WRITE) & ~FILE_APPEND_DATA)
@@ -470,9 +476,9 @@ static void reply_ntcreate_and_X_quota(connection_struct *conn,
}
reply_outbuf(req, 34, 0);
-
+
p = (char *)req->outbuf + smb_vwv2;
-
+
/* SCVAL(p,0,NO_OPLOCK_RETURN); */
p++;
SSVAL(p,0,fsp->fnum);
@@ -488,8 +494,8 @@ static void reply_ntcreate_and_X_quota(connection_struct *conn,
void reply_ntcreate_and_X(connection_struct *conn,
struct smb_request *req)
-{
- pstring fname;
+{
+ char *fname = NULL;
uint32 flags;
uint32 access_mask;
uint32 file_attributes;
@@ -513,6 +519,7 @@ void reply_ntcreate_and_X(connection_struct *conn,
BOOL extended_oplock_granted = False;
NTSTATUS status;
struct case_semantics_state *case_state = NULL;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBntcreateX);
@@ -576,10 +583,9 @@ void reply_ntcreate_and_X(connection_struct *conn,
/*
* This filename is relative to a directory fid.
*/
- pstring rel_fname;
+ char *rel_fname = NULL;
files_struct *dir_fsp = file_fsp(
SVAL(req->inbuf, smb_ntcreate_RootDirectoryFid));
- size_t dir_name_len;
if(!dir_fsp) {
reply_doserror(req, ERRDOS, ERRbadfid);
@@ -589,8 +595,9 @@ void reply_ntcreate_and_X(connection_struct *conn,
if(!dir_fsp->is_directory) {
- srvstr_get_path((char *)req->inbuf, req->flags2, fname,
- smb_buf(req->inbuf), sizeof(fname), 0,
+ srvstr_get_path(ctx, (char *)req->inbuf,
+ req->flags2, &fname,
+ smb_buf(req->inbuf), 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -621,34 +628,68 @@ void reply_ntcreate_and_X(connection_struct *conn,
return;
}
- /*
- * Copy in the base directory name.
- */
+ if (ISDOT(dir_fsp->fsp_name)) {
+ /*
+ * We're at the toplevel dir, the final file name
+ * must not contain ./, as this is filtered out
+ * normally by srvstr_get_path and unix_convert
+ * explicitly rejects paths containing ./.
+ */
+ fname = talloc_strdup(ctx,"");
+ if (!fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBntcreateX);
+ return;
+ }
+ } else {
+ size_t dir_name_len = strlen(dir_fsp->fsp_name);
+
+ /*
+ * Copy in the base directory name.
+ */
- pstrcpy( fname, dir_fsp->fsp_name );
- dir_name_len = strlen(fname);
+ fname = TALLOC_ARRAY(ctx, char, dir_name_len+2);
+ if (!fname) {
+ reply_nterror(
+ req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBntcreateX);
+ return;
+ }
+ memcpy(fname, dir_fsp->fsp_name, dir_name_len+1);
- /*
- * Ensure it ends in a '\'.
- */
+ /*
+ * Ensure it ends in a '/'.
+ * We used TALLOC_SIZE +2 to add space for the '/'.
+ */
- if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != '/')) {
- pstrcat(fname, "/");
- dir_name_len++;
+ if(dir_name_len &&
+ (fname[dir_name_len-1] != '\\') &&
+ (fname[dir_name_len-1] != '/')) {
+ fname[dir_name_len] = '/';
+ fname[dir_name_len+1] = '\0';
+ }
}
- srvstr_get_path((char *)req->inbuf, req->flags2, rel_fname,
- smb_buf(req->inbuf), sizeof(rel_fname), 0,
+ srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &rel_fname,
+ smb_buf(req->inbuf), 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBntcreateX);
return;
}
- pstrcat(fname, rel_fname);
+ fname = talloc_asprintf(ctx, "%s%s",
+ fname,
+ rel_fname);
+ if (!fname) {
+ reply_nterror(
+ req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBntcreateX);
+ return;
+ }
} else {
- srvstr_get_path((char *)req->inbuf, req->flags2, fname,
- smb_buf(req->inbuf), sizeof(fname), 0,
+ srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &fname,
+ smb_buf(req->inbuf), 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -681,12 +722,15 @@ void reply_ntcreate_and_X(connection_struct *conn,
return;
}
}
-
+
/*
- * Now contruct the smb_open_mode value from the filename,
+ * Now contruct the smb_open_mode value from the filename,
* desired access and the share access.
*/
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES, fname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -707,17 +751,17 @@ void reply_ntcreate_and_X(connection_struct *conn,
/*
* Ordinary file or directory.
*/
-
+
/*
* Check if POSIX semantics are wanted.
*/
-
+
if (file_attributes & FILE_FLAG_POSIX_SEMANTICS) {
case_state = set_posix_case_semantics(NULL, conn);
file_attributes &= ~FILE_FLAG_POSIX_SEMANTICS;
}
-
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(case_state);
reply_nterror(req, status);
@@ -885,8 +929,8 @@ void reply_ntcreate_and_X(connection_struct *conn,
reply_doserror(req, ERRDOS, ERRnoaccess);
END_PROFILE(SMBntcreateX);
return;
- }
-
+ }
+
/* Save the requested allocation size. */
if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) {
if (allocation_size && (allocation_size > (SMB_BIG_UINT)file_len)) {
@@ -909,7 +953,7 @@ void reply_ntcreate_and_X(connection_struct *conn,
}
}
- /*
+ /*
* If the caller set the extended oplock request bit
* and we granted one (by whatever means) - set the
* correct bit for extended oplock reply.
@@ -936,7 +980,7 @@ void reply_ntcreate_and_X(connection_struct *conn,
}
p = (char *)req->outbuf + smb_vwv2;
-
+
/*
* Currently as we don't support level II oplocks we just report
* exclusive & batch here.
@@ -953,7 +997,7 @@ void reply_ntcreate_and_X(connection_struct *conn,
} else {
SCVAL(p,0,NO_OPLOCK_RETURN);
}
-
+
p++;
SSVAL(p,0,fsp->fnum);
p += 2;
@@ -1023,13 +1067,14 @@ static void do_nt_transact_create_pipe(connection_struct *conn,
char **ppparams, uint32 parameter_count,
char **ppdata, uint32 data_count)
{
- pstring fname;
+ char *fname = NULL;
char *params = *ppparams;
int pnum = -1;
char *p = NULL;
NTSTATUS status;
size_t param_len;
uint32 flags;
+ TALLOC_CTX *ctx = talloc_tos();
/*
* Ensure minimum number of parameters sent.
@@ -1043,8 +1088,8 @@ static void do_nt_transact_create_pipe(connection_struct *conn,
flags = IVAL(params,0);
- srvstr_get_path(params, req->flags2, fname, params+53,
- sizeof(fname), parameter_count-53, STR_TERMINATE,
+ srvstr_get_path(ctx, params, req->flags2, &fname, params+53,
+ parameter_count-53, STR_TERMINATE,
&status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -1057,7 +1102,7 @@ static void do_nt_transact_create_pipe(connection_struct *conn,
/* Error return */
return;
}
-
+
/* Realloc the size of parameters and data we will return */
if (flags & EXTENDED_RESPONSE_REQUIRED) {
/* Extended response is 32 more byyes. */
@@ -1070,16 +1115,16 @@ static void do_nt_transact_create_pipe(connection_struct *conn,
reply_doserror(req, ERRDOS, ERRnomem);
return;
}
-
+
p = params;
SCVAL(p,0,NO_OPLOCK_RETURN);
-
+
p += 2;
SSVAL(p,0,pnum);
p += 2;
SIVAL(p,0,FILE_WAS_OPENED);
p += 8;
-
+
p += 32;
SIVAL(p,0,FILE_ATTRIBUTE_NORMAL); /* File Attributes. */
p += 20;
@@ -1088,11 +1133,11 @@ static void do_nt_transact_create_pipe(connection_struct *conn,
/* Device state. */
SSVAL(p,2, 0x5FF); /* ? */
p += 4;
-
+
if (flags & EXTENDED_RESPONSE_REQUIRED) {
p += 25;
SIVAL(p,0,FILE_GENERIC_ALL);
- /*
+ /*
* For pipes W2K3 seems to return
* 0x12019B next.
* This is ((FILE_GENERIC_READ|FILE_GENERIC_WRITE) & ~FILE_APPEND_DATA)
@@ -1101,10 +1146,10 @@ static void do_nt_transact_create_pipe(connection_struct *conn,
}
DEBUG(5,("do_nt_transact_create_pipe: open name = %s\n", fname));
-
+
/* Send the required number of replies */
send_nt_replies(req, NT_STATUS_OK, params, param_len, *ppdata, 0);
-
+
return;
}
@@ -1118,7 +1163,7 @@ static NTSTATUS set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 secu
SEC_DESC *psd = NULL;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
-
+
if (sd_len == 0 || !lp_nt_acl_support(SNUM(fsp->conn))) {
return NT_STATUS_OK;
}
@@ -1138,7 +1183,7 @@ static NTSTATUS set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 secu
* Setup the prs_struct to point at the memory we just
* allocated.
*/
-
+
prs_give_memory( &pd, data, sd_len, False);
/*
@@ -1149,11 +1194,11 @@ static NTSTATUS set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 secu
DEBUG(0,("set_sd: Error in unmarshalling security descriptor.\n"));
/*
* Return access denied for want of a better error message..
- */
+ */
talloc_destroy(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
-
+
if (psd->owner_sid==0) {
security_info_sent &= ~OWNER_SECURITY_INFORMATION;
}
@@ -1166,9 +1211,9 @@ static NTSTATUS set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 secu
if (psd->dacl==0) {
security_info_sent &= ~DACL_SECURITY_INFORMATION;
}
-
+
status = SMB_VFS_FSET_NT_ACL( fsp, fsp->fh->fd, security_info_sent, psd);
-
+
talloc_destroy(mem_ctx);
return status;
}
@@ -1176,7 +1221,7 @@ static NTSTATUS set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 secu
/****************************************************************************
Read a list of EA names and data from an incoming data buffer. Create an ea_list with them.
****************************************************************************/
-
+
static struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata, size_t data_size)
{
struct ea_list *ea_list_head = NULL;
@@ -1200,7 +1245,7 @@ static struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata,
}
offset += next_offset;
}
-
+
return ea_list_head;
}
@@ -1215,7 +1260,7 @@ static void call_nt_transact_create(connection_struct *conn,
char **ppdata, uint32 data_count,
uint32 max_data_count)
{
- pstring fname;
+ char *fname = NULL;
char *params = *ppparams;
char *data = *ppdata;
/* Breakout the oplock request bits so we can set the reply bits separately. */
@@ -1240,11 +1285,11 @@ static void call_nt_transact_create(connection_struct *conn,
struct timespec a_timespec;
struct timespec m_timespec;
struct ea_list *ea_list = NULL;
- TALLOC_CTX *ctx = NULL;
char *pdata = NULL;
NTSTATUS status;
size_t param_len;
struct case_semantics_state *case_state = NULL;
+ TALLOC_CTX *ctx = talloc_tos();
DEBUG(5,("call_nt_transact_create\n"));
@@ -1325,8 +1370,8 @@ static void call_nt_transact_create(connection_struct *conn,
/*
* This filename is relative to a directory fid.
*/
+ char *tmpname = NULL;
files_struct *dir_fsp = file_fsp(SVAL(params,4));
- size_t dir_name_len;
if(!dir_fsp) {
reply_doserror(req, ERRDOS, ERRbadfid);
@@ -1334,8 +1379,8 @@ static void call_nt_transact_create(connection_struct *conn,
}
if(!dir_fsp->is_directory) {
- srvstr_get_path(params, req->flags2, fname,
- params+53, sizeof(fname),
+ srvstr_get_path(ctx, params, req->flags2, &fname,
+ params+53,
parameter_count-53, STR_TERMINATE,
&status);
if (!NT_STATUS_IS_OK(status)) {
@@ -1357,37 +1402,64 @@ static void call_nt_transact_create(connection_struct *conn,
return;
}
- /*
- * Copy in the base directory name.
- */
+ if (ISDOT(dir_fsp->fsp_name)) {
+ /*
+ * We're at the toplevel dir, the final file name
+ * must not contain ./, as this is filtered out
+ * normally by srvstr_get_path and unix_convert
+ * explicitly rejects paths containing ./.
+ */
+ fname = talloc_strdup(ctx,"");
+ if (!fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
+ } else {
+ size_t dir_name_len = strlen(dir_fsp->fsp_name);
- pstrcpy( fname, dir_fsp->fsp_name );
- dir_name_len = strlen(fname);
+ /*
+ * Copy in the base directory name.
+ */
- /*
- * Ensure it ends in a '\'.
- */
+ fname = TALLOC_ARRAY(ctx, char, dir_name_len+2);
+ if (!fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
+ memcpy(fname, dir_fsp->fsp_name, dir_name_len+1);
- if((fname[dir_name_len-1] != '\\') && (fname[dir_name_len-1] != '/')) {
- pstrcat(fname, "/");
- dir_name_len++;
- }
+ /*
+ * Ensure it ends in a '/'.
+ * We used TALLOC_SIZE +2 to add space for the '/'.
+ */
- {
- pstring tmpname;
- srvstr_get_path(params, req->flags2, tmpname,
- params+53, sizeof(tmpname),
- parameter_count-53, STR_TERMINATE,
- &status);
- if (!NT_STATUS_IS_OK(status)) {
- reply_nterror(req, status);
- return;
+ if(dir_name_len &&
+ (fname[dir_name_len-1] != '\\') &&
+ (fname[dir_name_len-1] != '/')) {
+ fname[dir_name_len] = '/';
+ fname[dir_name_len+1] = '\0';
}
- pstrcat(fname, tmpname);
+ }
+
+ srvstr_get_path(ctx, params, req->flags2, &tmpname,
+ params+53,
+ parameter_count-53, STR_TERMINATE,
+ &status);
+ if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
+ return;
+ }
+ fname = talloc_asprintf(ctx, "%s%s",
+ fname,
+ tmpname);
+ if (!fname) {
+ reply_nterror(
+ req, NT_STATUS_NO_MEMORY);
+ return;
}
} else {
- srvstr_get_path(params, req->flags2, fname, params+53,
- sizeof(fname), parameter_count-53,
+ srvstr_get_path(ctx, params, req->flags2, &fname, params+53,
+ parameter_count-53,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -1412,7 +1484,7 @@ static void call_nt_transact_create(connection_struct *conn,
/*
* Ordinary file or directory.
*/
-
+
/*
* Check if POSIX semantics are wanted.
*/
@@ -1421,9 +1493,11 @@ static void call_nt_transact_create(connection_struct *conn,
case_state = set_posix_case_semantics(NULL, conn);
file_attributes &= ~FILE_FLAG_POSIX_SEMANTICS;
}
-
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(case_state);
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@@ -1435,7 +1509,7 @@ static void call_nt_transact_create(connection_struct *conn,
return;
}
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(case_state);
reply_nterror(req, status);
@@ -1576,7 +1650,7 @@ static void call_nt_transact_create(connection_struct *conn,
* According to the MS documentation, the only time the security
* descriptor is applied to the opened file is iff we *created* the
* file; an existing file stays the same.
- *
+ *
* Also, it seems (from observation) that you can open the file with
* any access mask but you can still write the sd. We need to override
* the granted access before we call set_sd
@@ -1592,7 +1666,6 @@ static void call_nt_transact_create(connection_struct *conn,
status = set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(ctx);
close_file(fsp,ERROR_CLOSE);
TALLOC_FREE(case_state);
reply_nterror(req, status);
@@ -1600,7 +1673,7 @@ static void call_nt_transact_create(connection_struct *conn,
}
fsp->access_mask = saved_access_mask;
}
-
+
if (ea_len && (info == FILE_WAS_CREATED)) {
status = set_ea(conn, fsp, fname, ea_list);
if (!NT_STATUS_IS_OK(status)) {
@@ -1622,8 +1695,8 @@ static void call_nt_transact_create(connection_struct *conn,
close_file(fsp,ERROR_CLOSE);
reply_doserror(req, ERRDOS, ERRnoaccess);
return;
- }
-
+ }
+
/* Save the requested allocation size. */
if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) {
SMB_BIG_UINT allocation_size = (SMB_BIG_UINT)IVAL(params,12);
@@ -1648,7 +1721,7 @@ static void call_nt_transact_create(connection_struct *conn,
}
}
- /*
+ /*
* If the caller set the extended oplock request bit
* and we granted one (by whatever means) - set the
* correct bit for extended oplock reply.
@@ -1687,7 +1760,7 @@ static void call_nt_transact_create(connection_struct *conn,
} else {
SCVAL(p,0,NO_OPLOCK_RETURN);
}
-
+
p += 2;
SSVAL(p,0,fsp->fnum);
p += 2;
@@ -1758,12 +1831,12 @@ void reply_ntcancel(connection_struct *conn, struct smb_request *req)
/*
* Go through and cancel any pending change notifies.
*/
-
+
START_PROFILE(SMBntcancel);
remove_pending_change_notify_requests_by_mid(req->mid);
remove_pending_lock_requests_by_mid(req->mid);
srv_cancel_sign_response(req->mid);
-
+
DEBUG(3,("reply_ntcancel: cancel called on mid = %d.\n", req->mid));
END_PROFILE(SMBntcancel);
@@ -1774,13 +1847,18 @@ void reply_ntcancel(connection_struct *conn, struct smb_request *req)
Copy a file.
****************************************************************************/
-static NTSTATUS copy_internals(connection_struct *conn,
- struct smb_request *req,
- char *oldname, char *newname, uint32 attrs)
+static NTSTATUS copy_internals(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ struct smb_request *req,
+ const char *oldname_in,
+ const char *newname_in,
+ uint32 attrs)
{
SMB_STRUCT_STAT sbuf1, sbuf2;
- pstring last_component_oldname;
- pstring last_component_newname;
+ char *oldname = NULL;
+ char *newname = NULL;
+ char *last_component_oldname = NULL;
+ char *last_component_newname = NULL;
files_struct *fsp1,*fsp2;
uint32 fattr;
int info;
@@ -1794,7 +1872,8 @@ static NTSTATUS copy_internals(connection_struct *conn,
return NT_STATUS_MEDIA_WRITE_PROTECTED;
}
- status = unix_convert(conn, oldname, False, last_component_oldname, &sbuf1);
+ status = unix_convert(ctx, conn, oldname_in, False, &oldname,
+ &last_component_oldname, &sbuf1);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -1814,7 +1893,8 @@ static NTSTATUS copy_internals(connection_struct *conn,
return NT_STATUS_NO_SUCH_FILE;
}
- status = unix_convert(conn, newname, False, last_component_newname, &sbuf2);
+ status = unix_convert(ctx, conn, newname_in, False, &newname,
+ &last_component_newname, &sbuf2);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -1840,7 +1920,8 @@ static NTSTATUS copy_internals(connection_struct *conn,
return status;
}
- DEBUG(10,("copy_internals: doing file copy %s to %s\n", oldname, newname));
+ DEBUG(10,("copy_internals: doing file copy %s to %s\n",
+ oldname, newname));
status = open_file_ntcreate(conn, req, oldname, &sbuf1,
FILE_READ_DATA, /* Read-only. */
@@ -1909,14 +1990,15 @@ static NTSTATUS copy_internals(connection_struct *conn,
void reply_ntrename(connection_struct *conn, struct smb_request *req)
{
- pstring oldname;
- pstring newname;
+ char *oldname = NULL;
+ char *newname = NULL;
char *p;
NTSTATUS status;
BOOL src_has_wcard = False;
BOOL dest_has_wcard = False;
uint32 attrs;
uint16 rename_type;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBntrename);
@@ -1930,8 +2012,8 @@ void reply_ntrename(connection_struct *conn, struct smb_request *req)
rename_type = SVAL(req->inbuf,smb_vwv1);
p = smb_buf(req->inbuf) + 1;
- p += srvstr_get_path_wcard((char *)req->inbuf, req->flags2, oldname, p,
- sizeof(oldname), 0, STR_TERMINATE, &status,
+ p += srvstr_get_path_wcard(ctx, (char *)req->inbuf, req->flags2, &oldname, p,
+ 0, STR_TERMINATE, &status,
&src_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -1953,17 +2035,19 @@ void reply_ntrename(connection_struct *conn, struct smb_request *req)
}
p++;
- p += srvstr_get_path_wcard((char *)req->inbuf, req->flags2, newname, p,
- sizeof(newname), 0, STR_TERMINATE, &status,
+ p += srvstr_get_path_wcard(ctx, (char *)req->inbuf, req->flags2, &newname, p,
+ 0, STR_TERMINATE, &status,
&dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBntrename);
return;
}
-
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- oldname);
+
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ oldname,
+ &oldname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -1976,8 +2060,10 @@ void reply_ntrename(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- newname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ newname,
+ &newname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -1991,19 +2077,22 @@ void reply_ntrename(connection_struct *conn, struct smb_request *req)
}
DEBUG(3,("reply_ntrename : %s -> %s\n",oldname,newname));
-
+
switch(rename_type) {
case RENAME_FLAG_RENAME:
- status = rename_internals(conn, req, oldname, newname,
- attrs, False, src_has_wcard,
- dest_has_wcard);
+ status = rename_internals(ctx, conn, req, oldname,
+ newname, attrs, False, src_has_wcard,
+ dest_has_wcard);
break;
case RENAME_FLAG_HARD_LINK:
if (src_has_wcard || dest_has_wcard) {
/* No wildcards. */
status = NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
} else {
- status = hardlink_internals(conn, oldname, newname);
+ status = hardlink_internals(ctx,
+ conn,
+ oldname,
+ newname);
}
break;
case RENAME_FLAG_COPY:
@@ -2011,7 +2100,7 @@ void reply_ntrename(connection_struct *conn, struct smb_request *req)
/* No wildcards. */
status = NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
} else {
- status = copy_internals(conn, req, oldname,
+ status = copy_internals(ctx, conn, req, oldname,
newname, attrs);
}
break;
@@ -2036,13 +2125,13 @@ void reply_ntrename(connection_struct *conn, struct smb_request *req)
}
reply_outbuf(req, 0, 0);
-
+
END_PROFILE(SMBntrename);
return;
}
/****************************************************************************
- Reply to a notify change - queue the request and
+ Reply to a notify change - queue the request and
don't allow a directory to be opened.
****************************************************************************/
@@ -2154,11 +2243,12 @@ static void call_nt_transact_rename(connection_struct *conn,
uint32 max_data_count)
{
char *params = *ppparams;
- pstring new_name;
+ char *new_name = NULL;
files_struct *fsp = NULL;
BOOL replace_if_exists = False;
BOOL dest_has_wcard = False;
NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
if(parameter_count < 5) {
reply_doserror(req, ERRDOS, ERRbadfunc);
@@ -2170,16 +2260,23 @@ static void call_nt_transact_rename(connection_struct *conn,
if (!check_fsp(conn, req, fsp, &current_user)) {
return;
}
- srvstr_get_path_wcard(params, req->flags2, new_name, params+4,
- sizeof(new_name), parameter_count - 4,
+ srvstr_get_path_wcard(ctx, params, req->flags2, &new_name, params+4,
+ parameter_count - 4,
STR_TERMINATE, &status, &dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
}
- status = rename_internals(conn, req, fsp->fsp_name,
- new_name, 0, replace_if_exists, False, dest_has_wcard);
+ status = rename_internals(ctx,
+ conn,
+ req,
+ fsp->fsp_name,
+ new_name,
+ 0,
+ replace_if_exists,
+ False,
+ dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
if (open_was_deferred(req->mid)) {
@@ -2194,10 +2291,10 @@ static void call_nt_transact_rename(connection_struct *conn,
* Rename was successful.
*/
send_nt_replies(req, NT_STATUS_OK, NULL, 0, NULL, 0);
-
- DEBUG(3,("nt transact rename from = %s, to = %s succeeded.\n",
+
+ DEBUG(3,("nt transact rename from = %s, to = %s succeeded.\n",
fsp->fsp_name, new_name));
-
+
return;
}
@@ -2330,7 +2427,7 @@ static void call_nt_transact_query_security_desc(connection_struct *conn,
security descriptor.\n"));
/*
* Return access denied for want of a better error message..
- */
+ */
talloc_destroy(mem_ctx);
reply_unixerror(req, ERRDOS, ERRnoaccess);
return;
@@ -2400,7 +2497,7 @@ static void call_nt_transact_set_security_desc(connection_struct *conn,
send_nt_replies(req, NT_STATUS_OK, NULL, 0, NULL, 0);
return;
}
-
+
/****************************************************************************
Reply to NT IOCTL
****************************************************************************/
@@ -2448,7 +2545,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
DEBUG(10,("FSCTL_SET_SPARSE: called on FID[0x%04X](but not implemented)\n", fidnum));
send_nt_replies(req, NT_STATUS_OK, NULL, 0, NULL, 0);
return;
-
+
case FSCTL_CREATE_OR_GET_OBJECT_ID:
{
unsigned char objid[16];
@@ -2494,7 +2591,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
DEBUG(10,("FSCTL_SET_REPARSE_POINT: called on FID[0x%04X](but not implemented)\n",fidnum));
reply_nterror(req, NT_STATUS_NOT_A_REPARSE_POINT);
return;
-
+
case FSCTL_GET_SHADOW_COPY_DATA: /* don't know if this name is right...*/
{
/*
@@ -2543,9 +2640,9 @@ static void call_nt_transact_ioctl(connection_struct *conn,
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
-
+
shadow_data->mem_ctx = shadow_mem_ctx;
-
+
/*
* Call the VFS routine to actually do the work.
*/
@@ -2585,7 +2682,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
talloc_destroy(shadow_data->mem_ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
- }
+ }
cur_pdata = pdata;
@@ -2622,11 +2719,11 @@ static void call_nt_transact_ioctl(connection_struct *conn,
return;
}
-
+
case FSCTL_FIND_FILES_BY_SID: /* I hope this name is right */
{
- /* pretend this succeeded -
- *
+ /* pretend this succeeded -
+ *
* we have to send back a list with all files owned by this SID
*
* but I have to check that --metze
@@ -2634,7 +2731,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
DOM_SID sid;
uid_t uid;
size_t sid_len = MIN(data_count-4,SID_MAX_SIZE);
-
+
DEBUG(10,("FSCTL_FIND_FILES_BY_SID: called on FID[0x%04X]\n",fidnum));
if (!fsp_belongs_conn(conn, req, fsp, &current_user)) {
@@ -2643,7 +2740,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
/* unknown 4 bytes: this is not the length of the sid :-( */
/*unknown = IVAL(pdata,0);*/
-
+
sid_parse(pdata+4,sid_len,&sid);
DEBUGADD(10,("for SID: %s\n",sid_string_static(&sid)));
@@ -2652,7 +2749,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
sid_string_static(&sid),(unsigned long)sid_len));
uid = (-1);
}
-
+
/* we can take a look at the find source :-)
*
* find ./ -uid $uid -name '*' is what we need here
@@ -2665,16 +2762,16 @@ static void call_nt_transact_ioctl(connection_struct *conn,
* (maybe we can hang the result anywhere in the fsp struct)
*
* we don't send all files at once
- * and at the next we should *not* start from the beginning,
- * so we have to cache the result
+ * and at the next we should *not* start from the beginning,
+ * so we have to cache the result
*
* --metze
*/
-
+
/* this works for now... */
send_nt_replies(req, NT_STATUS_OK, NULL, 0, NULL, 0);
return;
- }
+ }
default:
if (!logged_message) {
logged_message = True; /* Only print this once... */
@@ -2689,7 +2786,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
#ifdef HAVE_SYS_QUOTAS
/****************************************************************************
- Reply to get user quota
+ Reply to get user quota
****************************************************************************/
static void call_nt_transact_get_user_quota(connection_struct *conn,
@@ -2737,7 +2834,7 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
reply_doserror(req, ERRDOS, ERRinvalidparam);
return;
}
-
+
/* maybe we can check the quota_fnum */
fsp = file_fsp(SVAL(params,0));
if (!CHECK_NTQUOTA_HANDLE_OK(fsp,conn)) {
@@ -2752,16 +2849,16 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
qt_handle = (SMB_NTQUOTA_HANDLE *)fsp->fake_file_handle->pd;
level = SVAL(params,2);
-
- /* unknown 12 bytes leading in params */
-
+
+ /* unknown 12 bytes leading in params */
+
switch (level) {
case TRANSACT_GET_USER_QUOTA_LIST_CONTINUE:
/* seems that we should continue with the enum here --metze */
- if (qt_handle->quota_list!=NULL &&
+ if (qt_handle->quota_list!=NULL &&
qt_handle->tmp_list==NULL) {
-
+
/* free the list */
free_ntquota_list(&(qt_handle->quota_list));
@@ -2803,7 +2900,7 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
/* we should not trust the value in max_data_count*/
max_data_count = MIN(max_data_count,2048);
-
+
pdata = nttrans_realloc(ppdata, max_data_count);/* should be max data count from client*/
if(pdata == NULL) {
reply_doserror(req, ERRDOS, ERRnomem);
@@ -2814,7 +2911,7 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
/* set params Size of returned Quota Data 4 bytes*/
/* but set it later when we know it */
-
+
/* for each entry push the data */
if (start_enum) {
@@ -2831,28 +2928,28 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
/* nextoffset entry 4 bytes */
SIVAL(entry,0,entry_len);
-
+
/* then the len of the SID 4 bytes */
SIVAL(entry,4,sid_len);
-
+
/* unknown data 8 bytes SMB_BIG_UINT */
SBIG_UINT(entry,8,(SMB_BIG_UINT)0); /* this is not 0 in windows...-metze*/
-
+
/* the used disk space 8 bytes SMB_BIG_UINT */
SBIG_UINT(entry,16,tmp_list->quotas->usedspace);
-
+
/* the soft quotas 8 bytes SMB_BIG_UINT */
SBIG_UINT(entry,24,tmp_list->quotas->softlim);
-
+
/* the hard quotas 8 bytes SMB_BIG_UINT */
SBIG_UINT(entry,32,tmp_list->quotas->hardlim);
-
+
/* and now the SID */
sid_linearize(entry+40, sid_len, &tmp_list->quotas->sid);
}
-
+
qt_handle->tmp_list = tmp_list;
-
+
/* overwrite the offset of the last entry */
SIVAL(entry-entry_len,0,0);
@@ -2863,9 +2960,9 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
break;
case TRANSACT_GET_USER_QUOTA_FOR_SID:
-
- /* unknown 4 bytes IVAL(pdata,0) */
-
+
+ /* unknown 4 bytes IVAL(pdata,0) */
+
if (data_count < 8) {
DEBUG(0,("TRANSACT_GET_USER_QUOTA_FOR_SID: requires %d >= %d bytes data\n",data_count,8));
reply_doserror(req, ERRDOS, ERRunknownlevel);
@@ -2898,11 +2995,11 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
}
sid_parse(pdata+8,sid_len,&sid);
-
+
if (vfs_get_ntquota(fsp, SMB_USER_QUOTA_TYPE, &sid, &qt)!=0) {
ZERO_STRUCT(qt);
- /*
- * we have to return zero's in all fields
+ /*
+ * we have to return zero's in all fields
* instead of returning an error here
* --metze
*/
@@ -2926,25 +3023,25 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
/* set params Size of returned Quota Data 4 bytes*/
SIVAL(params,0,data_len);
-
+
/* nextoffset entry 4 bytes */
SIVAL(entry,0,0);
-
+
/* then the len of the SID 4 bytes */
SIVAL(entry,4,sid_len);
-
+
/* unknown data 8 bytes SMB_BIG_UINT */
SBIG_UINT(entry,8,(SMB_BIG_UINT)0); /* this is not 0 in windows...-mezte*/
-
+
/* the used disk space 8 bytes SMB_BIG_UINT */
SBIG_UINT(entry,16,qt.usedspace);
-
+
/* the soft quotas 8 bytes SMB_BIG_UINT */
SBIG_UINT(entry,24,qt.softlim);
-
+
/* the hard quotas 8 bytes SMB_BIG_UINT */
SBIG_UINT(entry,32,qt.hardlim);
-
+
/* and now the SID */
sid_linearize(entry+40, sid_len, &sid);
@@ -3002,7 +3099,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
reply_doserror(req, ERRDOS, ERRinvalidparam);
return;
}
-
+
/* maybe we can check the quota_fnum */
fsp = file_fsp(SVAL(params,0));
if (!CHECK_NTQUOTA_HANDLE_OK(fsp,conn)) {
@@ -3031,7 +3128,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
return;
}
- /* unknown 8 bytes in pdata
+ /* unknown 8 bytes in pdata
* maybe its the change time in NTTIME
*/
@@ -3076,7 +3173,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
return;
}
#endif /* LARGE_SMB_OFF_T */
-
+
sid_parse(pdata+40,sid_len,&sid);
DEBUGADD(8,("SID: %s\n",sid_string_static(&sid)));
@@ -3206,7 +3303,7 @@ static void handle_nttrans(connection_struct *conn,
&state->data, state->total_data,
state->max_data_return);
END_PROFILE(NT_transact_set_user_quota);
- break;
+ break;
}
#endif /* HAVE_SYS_QUOTAS */
@@ -3286,7 +3383,7 @@ void reply_nttrans(connection_struct *conn, struct smb_request *req)
state->setup = NULL;
state->call = function_code;
- /*
+ /*
* All nttrans messages we handle have smb_wct == 19 +
* state->setup_count. Ensure this is so as a sanity check.
*/
@@ -3318,7 +3415,7 @@ void reply_nttrans(connection_struct *conn, struct smb_request *req)
reply_doserror(req, ERRDOS, ERRnomem);
END_PROFILE(SMBnttrans);
return;
- }
+ }
if ((dsoff+dscnt < dsoff) || (dsoff+dscnt < dscnt))
goto bad_param;
if ((smb_base(req->inbuf)+dsoff+dscnt
@@ -3340,7 +3437,7 @@ void reply_nttrans(connection_struct *conn, struct smb_request *req)
reply_doserror(req, ERRDOS, ERRnomem);
END_PROFILE(SMBnttrans);
return;
- }
+ }
if ((psoff+pscnt < psoff) || (psoff+pscnt < pscnt))
goto bad_param;
if ((smb_base(req->inbuf)+psoff+pscnt
@@ -3410,7 +3507,7 @@ void reply_nttrans(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBnttrans);
return;
}
-
+
/****************************************************************************
Reply to a SMBnttranss
****************************************************************************/
@@ -3468,7 +3565,7 @@ void reply_nttranss(connection_struct *conn, struct smb_request *req)
state->received_param += pcnt;
state->received_data += dcnt;
-
+
if ((state->received_data > state->total_data) ||
(state->received_param > state->total_param))
goto bad_param;
@@ -3508,7 +3605,7 @@ void reply_nttranss(connection_struct *conn, struct smb_request *req)
goto bad_param;
memcpy(state->data+ddisp, smb_base(req->inbuf)+doff,
- dcnt);
+ dcnt);
}
if ((state->received_param < state->total_param) ||
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 72b56301131..b6bb02fdad5 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -117,22 +117,26 @@ static void change_file_owner_to_parent(connection_struct *conn,
(unsigned int)parent_st.st_uid ));
}
-static void change_dir_owner_to_parent(connection_struct *conn,
+static NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
const char *inherit_from_dir,
const char *fname,
SMB_STRUCT_STAT *psbuf)
{
- pstring saved_dir;
+ char *saved_dir = NULL;
SMB_STRUCT_STAT sbuf;
SMB_STRUCT_STAT parent_st;
+ TALLOC_CTX *ctx = talloc_stackframe();
+ NTSTATUS status = NT_STATUS_OK;
int ret;
ret = SMB_VFS_STAT(conn, inherit_from_dir, &parent_st);
if (ret == -1) {
+ status = map_nt_error_from_unix(errno);
DEBUG(0,("change_dir_owner_to_parent: failed to stat parent "
"directory %s. Error was %s\n",
inherit_from_dir, strerror(errno) ));
- return;
+ TALLOC_FREE(ctx);
+ return status;
}
/* We've already done an lstat into psbuf, and we know it's a
@@ -142,14 +146,19 @@ static void change_dir_owner_to_parent(connection_struct *conn,
should work on any UNIX (thanks tridge :-). JRA.
*/
- if (!vfs_GetWd(conn,saved_dir)) {
+ saved_dir = vfs_GetWd(ctx,conn);
+ if (!saved_dir) {
+ status = map_nt_error_from_unix(errno);
DEBUG(0,("change_dir_owner_to_parent: failed to get "
- "current working directory\n"));
- return;
+ "current working directory. Error was %s\n",
+ strerror(errno)));
+ TALLOC_FREE(ctx);
+ return status;
}
/* Chdir into the new path. */
if (vfs_ChDir(conn, fname) == -1) {
+ status = map_nt_error_from_unix(errno);
DEBUG(0,("change_dir_owner_to_parent: failed to change "
"current working directory to %s. Error "
"was %s\n", fname, strerror(errno) ));
@@ -157,6 +166,7 @@ static void change_dir_owner_to_parent(connection_struct *conn,
}
if (SMB_VFS_STAT(conn,".",&sbuf) == -1) {
+ status = map_nt_error_from_unix(errno);
DEBUG(0,("change_dir_owner_to_parent: failed to stat "
"directory '.' (%s) Error was %s\n",
fname, strerror(errno)));
@@ -170,6 +180,7 @@ static void change_dir_owner_to_parent(connection_struct *conn,
DEBUG(0,("change_dir_owner_to_parent: "
"device/inode/mode on directory %s changed. "
"Refusing to chown !\n", fname ));
+ status = NT_STATUS_ACCESS_DENIED;
goto out;
}
@@ -177,6 +188,7 @@ static void change_dir_owner_to_parent(connection_struct *conn,
ret = SMB_VFS_CHOWN(conn, ".", parent_st.st_uid, (gid_t)-1);
unbecome_root();
if (ret == -1) {
+ status = map_nt_error_from_unix(errno);
DEBUG(10,("change_dir_owner_to_parent: failed to chown "
"directory %s to parent directory uid %u. "
"Error was %s\n", fname,
@@ -190,7 +202,9 @@ static void change_dir_owner_to_parent(connection_struct *conn,
out:
+ TALLOC_FREE(ctx);
vfs_ChDir(conn,saved_dir);
+ return status;
}
/****************************************************************************
@@ -504,9 +518,10 @@ static void validate_my_share_entries(int num,
if (is_deferred_open_entry(share_entry) &&
!open_was_deferred(share_entry->op_mid)) {
- pstring str;
- pstr_sprintf(str, "Got a deferred entry without a request: "
- "PANIC: %s\n", share_mode_str(num, share_entry));
+ char *str = talloc_asprintf(talloc_tos(),
+ "Got a deferred entry without a request: "
+ "PANIC: %s\n",
+ share_mode_str(num, share_entry));
smb_panic(str);
}
@@ -543,11 +558,12 @@ static void validate_my_share_entries(int num,
panic:
{
- pstring str;
+ char *str;
DEBUG(0,("validate_my_share_entries: PANIC : %s\n",
share_mode_str(num, share_entry) ));
- slprintf(str, sizeof(str)-1, "validate_my_share_entries: "
- "file %s, oplock_type = 0x%x, op_type = 0x%x\n",
+ str = talloc_asprintf(talloc_tos(),
+ "validate_my_share_entries: "
+ "file %s, oplock_type = 0x%x, op_type = 0x%x\n",
fsp->fsp_name, (unsigned int)fsp->oplock_type,
(unsigned int)share_entry->op_type );
smb_panic(str);
diff --git a/source/smbd/oplock_irix.c b/source/smbd/oplock_irix.c
index dde32fa2884..9f81a960f53 100644
--- a/source/smbd/oplock_irix.c
+++ b/source/smbd/oplock_irix.c
@@ -33,17 +33,25 @@ static BOOL irix_oplocks_available(void)
{
int fd;
int pfd[2];
- pstring tmpname;
+ TALLOC_CTX *ctx = talloc_stackframe();
+ char *tmpname = NULL;
set_effective_capability(KERNEL_OPLOCK_CAPABILITY);
- slprintf(tmpname,sizeof(tmpname)-1, "%s/koplock.%d", lp_lockdir(),
- (int)sys_getpid());
+ tmpname = talloc_asprintf(ctx,
+ "%s/koplock.%d",
+ lp_lockdir(),
+ (int)sys_getpid());
+ if (!tmpname) {
+ TALLOC_FREE(ctx);
+ return False;
+ }
if(pipe(pfd) != 0) {
DEBUG(0,("check_kernel_oplocks: Unable to create pipe. Error "
"was %s\n",
strerror(errno) ));
+ TALLOC_FREE(ctx);
return False;
}
@@ -54,11 +62,14 @@ static BOOL irix_oplocks_available(void)
unlink( tmpname );
close(pfd[0]);
close(pfd[1]);
+ TALLOC_FREE(ctx);
return False;
}
unlink(tmpname);
+ TALLOC_FREE(ctx);
+
if(sys_fcntl_long(fd, F_OPLKREG, pfd[1]) == -1) {
DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not "
"available on this machine. Disabling kernel oplock "
diff --git a/source/smbd/pipes.c b/source/smbd/pipes.c
index 15c0febe8e4..da43a297677 100644
--- a/source/smbd/pipes.c
+++ b/source/smbd/pipes.c
@@ -55,15 +55,21 @@ extern struct pipe_id_info pipe_names[];
void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
{
- pstring fname;
- pstring pipe_name;
+ const char *fname = NULL;
+ char *pipe_name = NULL;
smb_np_struct *p;
int size=0,fmode=0,mtime=0,rmode=0;
int i;
+ TALLOC_CTX *ctx = talloc_tos();
/* XXXX we need to handle passed times, sattr and flags */
- srvstr_pull_buf(req->inbuf, req->flags2, pipe_name,
- smb_buf(req->inbuf), sizeof(pipe_name), STR_TERMINATE);
+ srvstr_pull_buf_talloc(ctx, req->inbuf, req->flags2, &pipe_name,
+ smb_buf(req->inbuf), STR_TERMINATE);
+ if (!pipe_name) {
+ reply_botherror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND,
+ ERRDOS, ERRbadpipe);
+ return;
+ }
/* If the name doesn't start \PIPE\ then this is directed */
/* at a mailslot or something we really, really don't understand, */
@@ -89,7 +95,7 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
}
/* Strip \PIPE\ off the name. */
- pstrcpy(fname, pipe_name + PIPELEN);
+ fname = pipe_name + PIPELEN;
#if 0
/*
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index 64051d23b12..f7cadeec3eb 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -79,9 +79,9 @@ typedef struct canon_ace {
struct pai_entry {
struct pai_entry *next, *prev;
enum ace_owner owner_type;
- posix_id unix_ug;
+ posix_id unix_ug;
};
-
+
struct pai_val {
BOOL pai_protected;
unsigned int num_entries;
@@ -1001,7 +1001,7 @@ NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 security_i
Ensure the enforced permissions for this share apply.
****************************************************************************/
-static void apply_default_perms(files_struct *fsp, canon_ace *pace, mode_t type)
+static void apply_default_perms(const files_struct *fsp, canon_ace *pace, mode_t type)
{
int snum = SNUM(fsp->conn);
mode_t and_bits = (mode_t)0;
@@ -1047,7 +1047,7 @@ static void apply_default_perms(files_struct *fsp, canon_ace *pace, mode_t type)
static BOOL uid_entry_in_group( canon_ace *uid_ace, canon_ace *group_ace )
{
- fstring u_name;
+ const char *u_name = NULL;
/* "Everyone" always matches every uid. */
@@ -1059,7 +1059,11 @@ static BOOL uid_entry_in_group( canon_ace *uid_ace, canon_ace *group_ace )
if (uid_ace->unix_ug.uid == current_user.ut.uid && group_ace->unix_ug.gid == current_user.ut.gid)
return True;
- fstrcpy(u_name, uidtoname(uid_ace->unix_ug.uid));
+ /* u_name talloc'ed off tos. */
+ u_name = uidtoname(uid_ace->unix_ug.uid);
+ if (!u_name) {
+ return False;
+ }
return user_in_group_sid(u_name, &group_ace->trustee);
}
@@ -1074,7 +1078,7 @@ static BOOL uid_entry_in_group( canon_ace *uid_ace, canon_ace *group_ace )
****************************************************************************/
static BOOL ensure_canon_entry_valid(canon_ace **pp_ace,
- files_struct *fsp,
+ const files_struct *fsp,
const DOM_SID *pfile_owner_sid,
const DOM_SID *pfile_grp_sid,
SMB_STRUCT_STAT *pst,
@@ -2106,7 +2110,7 @@ static void arrange_posix_perms( char *filename, canon_ace **pp_list_head)
Create a linked list of canonical ACE entries.
****************************************************************************/
-static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_STRUCT_STAT *psbuf,
+static canon_ace *canonicalise_acl( const files_struct *fsp, SMB_ACL_T posix_acl, SMB_STRUCT_STAT *psbuf,
const DOM_SID *powner, const DOM_SID *pgroup, struct pai_val *pal, SMB_ACL_TYPE_T the_acl_type)
{
connection_struct *conn = fsp->conn;
@@ -4416,8 +4420,9 @@ static int check_posix_acl_group_access(connection_struct *conn, const char *fna
BOOL can_delete_file_in_directory(connection_struct *conn, const char *fname)
{
- SMB_STRUCT_STAT sbuf;
- pstring dname;
+ SMB_STRUCT_STAT sbuf;
+ TALLOC_CTX *ctx = talloc_tos();
+ char *dname = NULL;
int ret;
if (!CAN_WRITE(conn)) {
@@ -4425,7 +4430,12 @@ BOOL can_delete_file_in_directory(connection_struct *conn, const char *fname)
}
/* Get the parent directory permission mask and owners. */
- pstrcpy(dname, parent_dirname(fname));
+ if (!parent_dirname_talloc(ctx,
+ fname,
+ &dname,
+ NULL)) {
+ return False;
+ }
if(SMB_VFS_STAT(conn, dname, &sbuf) != 0) {
return False;
}
@@ -4445,7 +4455,7 @@ BOOL can_delete_file_in_directory(connection_struct *conn, const char *fname)
#ifdef S_ISVTX
/* sticky bit means delete only by owner or root. */
if (sbuf.st_mode & S_ISVTX) {
- SMB_STRUCT_STAT sbuf_file;
+ SMB_STRUCT_STAT sbuf_file;
if(SMB_VFS_STAT(conn, fname, &sbuf_file) != 0) {
if (errno == ENOENT) {
/* If the file doesn't already exist then
@@ -4563,21 +4573,19 @@ BOOL can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_ST
descriptor via TALLOC_FREE(). This is designed for dealing with
user space access checks in smbd outside of the VFS. For example,
checking access rights in OpenEventlog().
-
+
Assume we are dealing with files (for now)
********************************************************************/
-SEC_DESC* get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname)
+SEC_DESC *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname)
{
SEC_DESC *psd, *ret_sd;
connection_struct conn;
files_struct finfo;
struct fd_handle fh;
- pstring path;
- pstring filename;
-
+
ZERO_STRUCT( conn );
-
+
if ( !(conn.mem_ctx = talloc_init( "novfs_get_nt_acl" )) ) {
DEBUG(0,("get_nt_acl_no_snum: talloc() failed!\n"));
return NULL;
@@ -4590,35 +4598,33 @@ SEC_DESC* get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname)
}
conn.params->service = -1;
-
- pstrcpy( path, "/" );
- set_conn_connectpath(&conn, path);
-
+
+ set_conn_connectpath(&conn, "/");
+
if (!smbd_vfs_init(&conn)) {
DEBUG(0,("get_nt_acl_no_snum: Unable to create a fake connection struct!\n"));
conn_free_internal( &conn );
return NULL;
}
-
+
ZERO_STRUCT( finfo );
ZERO_STRUCT( fh );
-
+
finfo.fnum = -1;
finfo.conn = &conn;
finfo.fh = &fh;
finfo.fh->fd = -1;
- pstrcpy( filename, fname );
- finfo.fsp_name = filename;
-
+ finfo.fsp_name = CONST_DISCARD(char *,fname);
+
if (get_nt_acl( &finfo, DACL_SECURITY_INFORMATION, &psd ) == 0) {
DEBUG(0,("get_nt_acl_no_snum: get_nt_acl returned zero.\n"));
conn_free_internal( &conn );
return NULL;
}
-
+
ret_sd = dup_sec_desc( ctx, psd );
-
+
conn_free_internal( &conn );
-
+
return ret_sd;
}
diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c
index 1f30acef33c..cb31763a9ff 100644
--- a/source/smbd/quotas.c
+++ b/source/smbd/quotas.c
@@ -1236,6 +1236,9 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB
D.dqb_curblocks = user_quota.bused;
D.dqb_bsoftlimit = user_quota.bsoft;
D.dqb_bhardlimit = user_quota.bhard;
+ D.dqb_curfiles = user_quota.iused;
+ D.dqb_fsoftlimit = user_quota.isoft;
+ D.dqb_fhardlimit = user_quota.ihard;
}
else if(statbuf.f_vfstype == MNT_JFS)
{
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 9e317a50087..aff292a2337 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -1,4 +1,4 @@
-/*
+/*
Unix SMB/CIFS implementation.
Main SMB reply routines
Copyright (C) Andrew Tridgell 1992-1998
@@ -10,12 +10,12 @@
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/>.
*/
@@ -208,27 +208,46 @@ NTSTATUS check_path_syntax_posix(char *path)
Pull a string and check the path allowing a wilcard - provide for error return.
****************************************************************************/
-size_t srvstr_get_path_wcard(const char *inbuf, uint16 smb_flags2, char *dest,
- const char *src, size_t dest_len, size_t src_len,
- int flags, NTSTATUS *err, BOOL *contains_wcard)
+size_t srvstr_get_path_wcard(TALLOC_CTX *ctx,
+ const char *inbuf,
+ uint16 smb_flags2,
+ char **pp_dest,
+ const char *src,
+ size_t src_len,
+ int flags,
+ NTSTATUS *err,
+ BOOL *contains_wcard)
{
size_t ret;
-#ifdef DEVELOPER
- SMB_ASSERT(dest_len == sizeof(pstring));
-#endif
+
+ *pp_dest = NULL;
if (src_len == 0) {
- ret = srvstr_pull_buf(inbuf, smb_flags2, dest, src,
- dest_len, flags);
+ ret = srvstr_pull_buf_talloc(ctx,
+ inbuf,
+ smb_flags2,
+ pp_dest,
+ src,
+ flags);
} else {
- ret = srvstr_pull(inbuf, smb_flags2, dest, src,
- dest_len, src_len, flags);
+ ret = srvstr_pull_talloc(ctx,
+ inbuf,
+ smb_flags2,
+ pp_dest,
+ src,
+ src_len,
+ flags);
+ }
+
+ if (!*pp_dest) {
+ *err = NT_STATUS_INVALID_PARAMETER;
+ return ret;
}
*contains_wcard = False;
if (smb_flags2 & FLAGS2_DFS_PATHNAMES) {
- /*
+ /*
* For a DFS path the function parse_dfs_path()
* will do the path processing, just make a copy.
*/
@@ -237,9 +256,9 @@ size_t srvstr_get_path_wcard(const char *inbuf, uint16 smb_flags2, char *dest,
}
if (lp_posix_pathnames()) {
- *err = check_path_syntax_posix(dest);
+ *err = check_path_syntax_posix(*pp_dest);
} else {
- *err = check_path_syntax_wcard(dest, contains_wcard);
+ *err = check_path_syntax_wcard(*pp_dest, contains_wcard);
}
return ret;
@@ -249,25 +268,43 @@ size_t srvstr_get_path_wcard(const char *inbuf, uint16 smb_flags2, char *dest,
Pull a string and check the path - provide for error return.
****************************************************************************/
-size_t srvstr_get_path(const char *inbuf, uint16 smb_flags2, char *dest,
- const char *src, size_t dest_len, size_t src_len,
- int flags, NTSTATUS *err)
+size_t srvstr_get_path(TALLOC_CTX *ctx,
+ const char *inbuf,
+ uint16 smb_flags2,
+ char **pp_dest,
+ const char *src,
+ size_t src_len,
+ int flags,
+ NTSTATUS *err)
{
size_t ret;
-#ifdef DEVELOPER
- SMB_ASSERT(dest_len == sizeof(pstring));
-#endif
+
+ *pp_dest = NULL;
if (src_len == 0) {
- ret = srvstr_pull_buf(inbuf, smb_flags2, dest, src,
- dest_len, flags);
+ ret = srvstr_pull_buf_talloc(ctx,
+ inbuf,
+ smb_flags2,
+ pp_dest,
+ src,
+ flags);
} else {
- ret = srvstr_pull(inbuf, smb_flags2, dest, src,
- dest_len, src_len, flags);
+ ret = srvstr_pull_talloc(ctx,
+ inbuf,
+ smb_flags2,
+ pp_dest,
+ src,
+ src_len,
+ flags);
+ }
+
+ if (!*pp_dest) {
+ *err = NT_STATUS_INVALID_PARAMETER;
+ return ret;
}
if (smb_flags2 & FLAGS2_DFS_PATHNAMES) {
- /*
+ /*
* For a DFS path the function parse_dfs_path()
* will do the path processing, just make a copy.
*/
@@ -276,20 +313,19 @@ size_t srvstr_get_path(const char *inbuf, uint16 smb_flags2, char *dest,
}
if (lp_posix_pathnames()) {
- *err = check_path_syntax_posix(dest);
+ *err = check_path_syntax_posix(*pp_dest);
} else {
- *err = check_path_syntax(dest);
+ *err = check_path_syntax(*pp_dest);
}
return ret;
}
/****************************************************************************
- Check if we have a correct fsp pointing to a file. Replacement for the
- CHECK_FSP macro.
+ Check if we have a correct fsp pointing to a file. Basic check for open fsp.
****************************************************************************/
-BOOL check_fsp(connection_struct *conn, struct smb_request *req,
+BOOL check_fsp_open(connection_struct *conn, struct smb_request *req,
files_struct *fsp, struct current_user *user)
{
if (!(fsp) || !(conn)) {
@@ -300,6 +336,20 @@ BOOL check_fsp(connection_struct *conn, struct smb_request *req,
reply_nterror(req, NT_STATUS_INVALID_HANDLE);
return False;
}
+ return True;
+}
+
+/****************************************************************************
+ Check if we have a correct fsp pointing to a file. Replacement for the
+ CHECK_FSP macro.
+****************************************************************************/
+
+BOOL check_fsp(connection_struct *conn, struct smb_request *req,
+ files_struct *fsp, struct current_user *user)
+{
+ if (!check_fsp_open(conn, req, fsp, user)) {
+ return False;
+ }
if ((fsp)->is_directory) {
reply_nterror(req, NT_STATUS_INVALID_DEVICE_REQUEST);
return False;
@@ -439,6 +489,7 @@ void reply_tcon(connection_struct *conn, struct smb_request *req)
NTSTATUS nt_status;
char *p;
DATA_BLOB password_blob;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBtcon);
@@ -449,12 +500,12 @@ void reply_tcon(connection_struct *conn, struct smb_request *req)
}
p = smb_buf(req->inbuf)+1;
- p += srvstr_pull_buf_talloc(req, req->inbuf, req->flags2,
+ p += srvstr_pull_buf_talloc(ctx, req->inbuf, req->flags2,
&service_buf, p, STR_TERMINATE) + 1;
- pwlen = srvstr_pull_buf_talloc(req, req->inbuf, req->flags2,
+ pwlen = srvstr_pull_buf_talloc(ctx, req->inbuf, req->flags2,
&password, p, STR_TERMINATE) + 1;
p += pwlen;
- p += srvstr_pull_buf_talloc(req, req->inbuf, req->flags2,
+ p += srvstr_pull_buf_talloc(ctx, req->inbuf, req->flags2,
&dev, p, STR_TERMINATE) + 1;
if (service_buf == NULL || password == NULL || dev == NULL) {
@@ -502,8 +553,7 @@ void reply_tcon_and_X(connection_struct *conn, struct smb_request *req)
{
char *service = NULL;
DATA_BLOB password;
-
- TALLOC_CTX *ctx = NULL;
+ TALLOC_CTX *ctx = talloc_tos();
/* what the cleint thinks the device is */
char *client_devicetype = NULL;
/* what the server tells the client the share represents */
@@ -554,19 +604,11 @@ void reply_tcon_and_X(connection_struct *conn, struct smb_request *req)
p = smb_buf(req->inbuf) + passlen + 1;
}
- ctx = talloc_init("reply_tcon_and_X");
- if (!ctx) {
- data_blob_clear_free(&password);
- reply_nterror(req, NT_STATUS_NO_MEMORY);
- END_PROFILE(SMBtconX);
- return;
- }
p += srvstr_pull_buf_talloc(ctx, req->inbuf, req->flags2, &path, p,
STR_TERMINATE);
if (path == NULL) {
data_blob_clear_free(&password);
- TALLOC_FREE(ctx);
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBtconX);
return;
@@ -580,7 +622,6 @@ void reply_tcon_and_X(connection_struct *conn, struct smb_request *req)
q = strchr_m(path+2,'\\');
if (!q) {
data_blob_clear_free(&password);
- TALLOC_FREE(ctx);
reply_doserror(req, ERRDOS, ERRnosuchshare);
END_PROFILE(SMBtconX);
return;
@@ -596,7 +637,6 @@ void reply_tcon_and_X(connection_struct *conn, struct smb_request *req)
if (client_devicetype == NULL) {
data_blob_clear_free(&password);
- TALLOC_FREE(ctx);
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
END_PROFILE(SMBtconX);
return;
@@ -610,7 +650,6 @@ void reply_tcon_and_X(connection_struct *conn, struct smb_request *req)
data_blob_clear_free(&password);
if (!conn) {
- TALLOC_FREE(ctx);
reply_nterror(req, nt_status);
END_PROFILE(SMBtconX);
return;
@@ -627,7 +666,6 @@ void reply_tcon_and_X(connection_struct *conn, struct smb_request *req)
reply_outbuf(req, 2, 0);
if (message_push_string(&req->outbuf, server_devicetype,
STR_TERMINATE|STR_ASCII) == -1) {
- TALLOC_FREE(ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
END_PROFILE(SMBtconX);
return;
@@ -662,7 +700,6 @@ void reply_tcon_and_X(connection_struct *conn, struct smb_request *req)
STR_TERMINATE|STR_ASCII) == -1)
|| (message_push_string(&req->outbuf, fstype,
STR_TERMINATE) == -1)) {
- TALLOC_FREE(ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
END_PROFILE(SMBtconX);
return;
@@ -684,7 +721,6 @@ void reply_tcon_and_X(connection_struct *conn, struct smb_request *req)
SSVAL(req->inbuf,smb_tid,conn->cnum);
SSVAL(req->outbuf,smb_tid,conn->cnum);
- TALLOC_FREE(ctx);
END_PROFILE(SMBtconX);
chain_reply(req);
@@ -755,7 +791,9 @@ void reply_ioctl(connection_struct *conn, struct smb_request *req)
SSVAL(req->outbuf,smb_vwv1,replysize); /* Total data bytes returned */
SSVAL(req->outbuf,smb_vwv5,replysize); /* Data bytes this buffer */
SSVAL(req->outbuf,smb_vwv6,52); /* Offset to data */
- p = smb_buf(req->outbuf) + 1; /* Allow for alignment */
+ p = smb_buf(req->outbuf);
+ memset(p, '\0', replysize+1); /* valgrind-safe. */
+ p += 1; /* Allow for alignment */
switch (ioctl_code) {
case IOCTL_QUERY_JOB_INFO:
@@ -775,8 +813,7 @@ void reply_ioctl(connection_struct *conn, struct smb_request *req)
srvstr_push((char *)req->outbuf, req->flags2,
p+18, lp_servicename(SNUM(conn)),
13, STR_TERMINATE|STR_ASCII);
- }
- else {
+ } else {
memset(p+18, 0, 13);
}
break;
@@ -802,21 +839,22 @@ static NTSTATUS map_checkpath_error(const char *inbuf, NTSTATUS status)
}
return status;
}
-
+
/****************************************************************************
Reply to a checkpath.
****************************************************************************/
void reply_checkpath(connection_struct *conn, struct smb_request *req)
{
- pstring name;
+ char *name = NULL;
SMB_STRUCT_STAT sbuf;
NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBcheckpath);
- srvstr_get_path((char *)req->inbuf, req->flags2, name,
- smb_buf(req->inbuf) + 1, sizeof(name), 0,
+ srvstr_get_path(ctx,(char *)req->inbuf, req->flags2, &name,
+ smb_buf(req->inbuf) + 1, 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
status = map_checkpath_error((char *)req->inbuf, status);
@@ -825,7 +863,10 @@ void reply_checkpath(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES, name);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ name,
+ &name);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -838,7 +879,7 @@ void reply_checkpath(connection_struct *conn, struct smb_request *req)
DEBUG(3,("reply_checkpath %s mode=%d\n", name, (int)SVAL(req->inbuf,smb_vwv0)));
- status = unix_convert(conn, name, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, name, False, &name, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
goto path_err;
}
@@ -899,27 +940,30 @@ void reply_checkpath(connection_struct *conn, struct smb_request *req)
void reply_getatr(connection_struct *conn, struct smb_request *req)
{
- pstring fname;
+ char *fname = NULL;
SMB_STRUCT_STAT sbuf;
int mode=0;
SMB_OFF_T size=0;
time_t mtime=0;
char *p;
NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBgetatr);
p = smb_buf(req->inbuf) + 1;
- p += srvstr_get_path((char *)req->inbuf, req->flags2, fname, p,
- sizeof(fname), 0, STR_TERMINATE, &status);
+ p += srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &fname, p,
+ 0, STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBgetatr);
return;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -931,7 +975,7 @@ void reply_getatr(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBgetatr);
return;
}
-
+
/* dos smetimes asks for a stat of "" - it returns a "hidden directory"
under WfWg - weird! */
if (*fname == '\0') {
@@ -942,7 +986,7 @@ void reply_getatr(connection_struct *conn, struct smb_request *req)
size = 0;
mtime = 0;
} else {
- status = unix_convert(conn, fname, False, NULL,&sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL,&sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBgetatr);
@@ -986,7 +1030,7 @@ void reply_getatr(connection_struct *conn, struct smb_request *req)
}
DEBUG(3,("reply_getatr: name=%s mode=%d size=%u\n", fname, mode, (unsigned int)size ) );
-
+
END_PROFILE(SMBgetatr);
return;
}
@@ -997,12 +1041,13 @@ void reply_getatr(connection_struct *conn, struct smb_request *req)
void reply_setatr(connection_struct *conn, struct smb_request *req)
{
- pstring fname;
+ char *fname = NULL;
int mode;
time_t mtime;
SMB_STRUCT_STAT sbuf;
char *p;
NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBsetatr);
@@ -1012,16 +1057,18 @@ void reply_setatr(connection_struct *conn, struct smb_request *req)
}
p = smb_buf(req->inbuf) + 1;
- p += srvstr_get_path((char *)req->inbuf, req->flags2, fname, p,
- sizeof(fname), 0, STR_TERMINATE, &status);
+ p += srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &fname, p,
+ 0, STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBsetatr);
return;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -1033,8 +1080,8 @@ void reply_setatr(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBsetatr);
return;
}
-
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBsetatr);
@@ -1060,7 +1107,7 @@ void reply_setatr(connection_struct *conn, struct smb_request *req)
mode = SVAL(req->inbuf,smb_vwv0);
mtime = srv_make_unix_date3(req->inbuf+smb_vwv1);
-
+
if (mode != FILE_ATTRIBUTE_NORMAL) {
if (VALID_STAT_OF_DIR(sbuf))
mode |= aDIR;
@@ -1146,9 +1193,9 @@ void reply_dskattr(connection_struct *conn, struct smb_request *req)
void reply_search(connection_struct *conn, struct smb_request *req)
{
- pstring mask;
- pstring directory;
- pstring fname;
+ char *mask = NULL;
+ char *directory = NULL;
+ char *fname = NULL;
SMB_OFF_T size;
uint32 mode;
time_t date;
@@ -1158,7 +1205,7 @@ void reply_search(connection_struct *conn, struct smb_request *req)
BOOL finished = False;
char *p;
int status_len;
- pstring path;
+ char *path = NULL;
char status[21];
int dptr_num= -1;
BOOL check_descend = False;
@@ -1166,6 +1213,7 @@ void reply_search(connection_struct *conn, struct smb_request *req)
NTSTATUS nt_status;
BOOL mask_contains_wcard = False;
BOOL allow_long_path_components = (req->flags2 & FLAGS2_LONG_PATH_COMPONENTS) ? True : False;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBsearch);
@@ -1181,8 +1229,6 @@ void reply_search(connection_struct *conn, struct smb_request *req)
return;
}
- *mask = *directory = *fname = 0;
-
/* If we were called as SMBffirst then we must expect close. */
if(CVAL(req->inbuf,smb_com) == SMBffirst) {
expect_close = True;
@@ -1192,18 +1238,26 @@ void reply_search(connection_struct *conn, struct smb_request *req)
maxentries = SVAL(req->inbuf,smb_vwv0);
dirtype = SVAL(req->inbuf,smb_vwv1);
p = smb_buf(req->inbuf) + 1;
- p += srvstr_get_path_wcard((char *)req->inbuf, req->flags2, path, p,
- sizeof(path), 0, STR_TERMINATE, &nt_status,
- &mask_contains_wcard);
+ p += srvstr_get_path_wcard(ctx,
+ (char *)req->inbuf,
+ req->flags2,
+ &path,
+ p,
+ 0,
+ STR_TERMINATE,
+ &nt_status,
+ &mask_contains_wcard);
if (!NT_STATUS_IS_OK(nt_status)) {
reply_nterror(req, nt_status);
END_PROFILE(SMBsearch);
return;
}
- nt_status = resolve_dfspath_wcard(conn,
+ nt_status = resolve_dfspath_wcard(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- path, &mask_contains_wcard);
+ path,
+ &path,
+ &mask_contains_wcard);
if (!NT_STATUS_IS_OK(nt_status)) {
if (NT_STATUS_EQUAL(nt_status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -1215,18 +1269,18 @@ void reply_search(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBsearch);
return;
}
-
+
p++;
status_len = SVAL(p, 0);
p += 2;
-
+
/* dirtype &= ~aDIR; */
if (status_len == 0) {
SMB_STRUCT_STAT sbuf;
- pstrcpy(directory,path);
- nt_status = unix_convert(conn, directory, True, NULL, &sbuf);
+ nt_status = unix_convert(ctx, conn, path, True,
+ &directory, NULL, &sbuf);
if (!NT_STATUS_IS_OK(nt_status)) {
reply_nterror(req, nt_status);
END_PROFILE(SMBsearch);
@@ -1242,18 +1296,44 @@ void reply_search(connection_struct *conn, struct smb_request *req)
p = strrchr_m(directory,'/');
if (!p) {
- pstrcpy(mask,directory);
- pstrcpy(directory,".");
+ mask = directory;
+ directory = talloc_strdup(ctx,".");
+ if (!directory) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBsearch);
+ return;
+ }
} else {
*p = 0;
- pstrcpy(mask,p+1);
+ mask = p+1;
}
if (*directory == '\0') {
- pstrcpy(directory,".");
+ directory = talloc_strdup(ctx,".");
+ if (!directory) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBsearch);
+ return;
+ }
}
memset((char *)status,'\0',21);
SCVAL(status,0,(dirtype & 0x1F));
+
+ nt_status = dptr_create(conn,
+ directory,
+ True,
+ expect_close,
+ req->smbpid,
+ mask,
+ mask_contains_wcard,
+ dirtype,
+ &conn->dirptr);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ reply_nterror(req, nt_status);
+ END_PROFILE(SMBsearch);
+ return;
+ }
+ dptr_num = dptr_dnum(conn->dirptr);
} else {
int status_dirtype;
@@ -1263,36 +1343,20 @@ void reply_search(connection_struct *conn, struct smb_request *req)
dirtype = status_dirtype;
}
- conn->dirptr = dptr_fetch(status+12,&dptr_num);
+ conn->dirptr = dptr_fetch(status+12,&dptr_num);
if (!conn->dirptr) {
goto SearchEmpty;
}
string_set(&conn->dirpath,dptr_path(dptr_num));
- pstrcpy(mask, dptr_wcard(dptr_num));
+ mask = dptr_wcard(dptr_num);
+ if (!mask) {
+ goto SearchEmpty;
+ }
/*
* For a 'continue' search we have no string. So
* check from the initial saved string.
*/
mask_contains_wcard = ms_has_wild(mask);
- }
-
- if (status_len == 0) {
- nt_status = dptr_create(conn,
- directory,
- True,
- expect_close,
- req->smbpid,
- mask,
- mask_contains_wcard,
- dirtype,
- &conn->dirptr);
- if (!NT_STATUS_IS_OK(nt_status)) {
- reply_nterror(req, nt_status);
- END_PROFILE(SMBsearch);
- return;
- }
- dptr_num = dptr_dnum(conn->dirptr);
- } else {
dirtype = dptr_attr(dptr_num);
}
@@ -1301,8 +1365,12 @@ void reply_search(connection_struct *conn, struct smb_request *req)
if ((dirtype&0x1F) == aVOLID) {
char buf[DIR_STRUCT_SIZE];
memcpy(buf,status,21);
- make_dir_struct(buf,"???????????",volume_label(SNUM(conn)),
- 0,aVOLID,0,!allow_long_path_components);
+ if (!make_dir_struct(ctx,buf,"???????????",volume_label(SNUM(conn)),
+ 0,aVOLID,0,!allow_long_path_components)) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBsearch);
+ return;
+ }
dptr_fill(buf+12,dptr_num);
if (dptr_zero(buf+12) && (status_len==0)) {
numentries = 1;
@@ -1331,12 +1399,23 @@ void reply_search(connection_struct *conn, struct smb_request *req)
}
for (i=numentries;(i<maxentries) && !finished;i++) {
- finished = !get_dir_entry(conn,mask,dirtype,fname,&size,&mode,&date,check_descend);
+ finished = !get_dir_entry(ctx,conn,mask,dirtype,&fname,
+ &size,&mode,&date,check_descend);
if (!finished) {
char buf[DIR_STRUCT_SIZE];
memcpy(buf,status,21);
- make_dir_struct(buf,mask,fname,size, mode,date,
- !allow_long_path_components);
+ if (!make_dir_struct(ctx,
+ buf,
+ mask,
+ fname,
+ size,
+ mode,
+ date,
+ !allow_long_path_components)) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBsearch);
+ return;
+ }
if (!dptr_fill(buf+12,dptr_num)) {
break;
}
@@ -1393,13 +1472,18 @@ void reply_search(connection_struct *conn, struct smb_request *req)
/* This SMB *always* returns ASCII names. Remove the unicode bit in flags2. */
SSVAL(req->outbuf, smb_flg2,
(SVAL(req->outbuf, smb_flg2) & (~FLAGS2_UNICODE_STRINGS)));
-
- if ((! *directory) && dptr_path(dptr_num))
- slprintf(directory, sizeof(directory)-1, "(%s)",dptr_path(dptr_num));
- DEBUG( 4, ( "%s mask=%s path=%s dtype=%d nument=%u of %u\n",
+ if (!directory) {
+ directory = dptr_path(dptr_num);
+ }
+
+ DEBUG(4,("%s mask=%s path=%s dtype=%d nument=%u of %u\n",
smb_fn_name(CVAL(req->inbuf,smb_com)),
- mask, directory, dirtype, numentries, maxentries ) );
+ mask,
+ directory ? directory : "./",
+ dirtype,
+ numentries,
+ maxentries ));
END_PROFILE(SMBsearch);
return;
@@ -1412,12 +1496,13 @@ void reply_search(connection_struct *conn, struct smb_request *req)
void reply_fclose(connection_struct *conn, struct smb_request *req)
{
int status_len;
- pstring path;
char status[21];
int dptr_num= -2;
char *p;
+ char *path = NULL;
NTSTATUS err;
BOOL path_contains_wcard = False;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBfclose);
@@ -1428,9 +1513,15 @@ void reply_fclose(connection_struct *conn, struct smb_request *req)
}
p = smb_buf(req->inbuf) + 1;
- p += srvstr_get_path_wcard((char *)req->inbuf, req->flags2, path, p,
- sizeof(path), 0, STR_TERMINATE, &err,
- &path_contains_wcard);
+ p += srvstr_get_path_wcard(ctx,
+ (char *)req->inbuf,
+ req->flags2,
+ &path,
+ p,
+ 0,
+ STR_TERMINATE,
+ &err,
+ &path_contains_wcard);
if (!NT_STATUS_IS_OK(err)) {
reply_nterror(req, err);
END_PROFILE(SMBfclose);
@@ -1468,7 +1559,7 @@ void reply_fclose(connection_struct *conn, struct smb_request *req)
void reply_open(connection_struct *conn, struct smb_request *req)
{
- pstring fname;
+ char *fname = NULL;
uint32 fattr=0;
SMB_OFF_T size = 0;
time_t mtime=0;
@@ -1483,6 +1574,7 @@ void reply_open(connection_struct *conn, struct smb_request *req)
uint32 create_disposition;
uint32 create_options = 0;
NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBopen);
@@ -1491,13 +1583,13 @@ void reply_open(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBopen);
return;
}
-
+
oplock_request = CORE_OPLOCK_REQUEST(req->inbuf);
deny_mode = SVAL(req->inbuf,smb_vwv0);
dos_attr = SVAL(req->inbuf,smb_vwv1);
- srvstr_get_path((char *)req->inbuf, req->flags2, fname,
- smb_buf(req->inbuf)+1, sizeof(fname), 0,
+ srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &fname,
+ smb_buf(req->inbuf)+1, 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -1505,8 +1597,10 @@ void reply_open(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -1519,13 +1613,13 @@ void reply_open(connection_struct *conn, struct smb_request *req)
return;
}
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBopen);
return;
}
-
+
status = check_name(conn, fname);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -1602,7 +1696,7 @@ void reply_open(connection_struct *conn, struct smb_request *req)
void reply_open_and_X(connection_struct *conn, struct smb_request *req)
{
- pstring fname;
+ char *fname = NULL;
uint16 open_flags;
int deny_mode;
uint32 smb_attr;
@@ -1628,6 +1722,7 @@ void reply_open_and_X(connection_struct *conn, struct smb_request *req)
uint32 share_mode;
uint32 create_disposition;
uint32 create_options = 0;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBopenX);
@@ -1658,8 +1753,8 @@ void reply_open_and_X(connection_struct *conn, struct smb_request *req)
}
/* XXXX we need to handle passed times, sattr and flags */
- srvstr_get_path((char *)req->inbuf, req->flags2, fname,
- smb_buf(req->inbuf), sizeof(fname), 0, STR_TERMINATE,
+ srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &fname,
+ smb_buf(req->inbuf), 0, STR_TERMINATE,
&status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -1667,8 +1762,10 @@ void reply_open_and_X(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBopenX);
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@@ -1680,7 +1777,7 @@ void reply_open_and_X(connection_struct *conn, struct smb_request *req)
return;
}
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBopenX);
@@ -1846,7 +1943,7 @@ void reply_ulogoffX(connection_struct *conn, struct smb_request *req)
void reply_mknew(connection_struct *conn, struct smb_request *req)
{
- pstring fname;
+ char *fname = NULL;
int com;
uint32 fattr = 0;
struct timespec ts[2];
@@ -1858,6 +1955,7 @@ void reply_mknew(connection_struct *conn, struct smb_request *req)
uint32 share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE;
uint32 create_disposition;
uint32 create_options = 0;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBcreate);
@@ -1875,8 +1973,8 @@ void reply_mknew(connection_struct *conn, struct smb_request *req)
srv_make_unix_date3(req->inbuf + smb_vwv1));
/* mtime. */
- srvstr_get_path((char *)req->inbuf, req->flags2, fname,
- smb_buf(req->inbuf) + 1, sizeof(fname), 0,
+ srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &fname,
+ smb_buf(req->inbuf) + 1, 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -1884,8 +1982,10 @@ void reply_mknew(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBcreate);
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@@ -1897,7 +1997,7 @@ void reply_mknew(connection_struct *conn, struct smb_request *req)
return;
}
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBcreate);
@@ -1974,7 +2074,7 @@ void reply_mknew(connection_struct *conn, struct smb_request *req)
void reply_ctemp(connection_struct *conn, struct smb_request *req)
{
- pstring fname;
+ char *fname = NULL;
uint32 fattr;
files_struct *fsp;
int oplock_request;
@@ -1982,6 +2082,7 @@ void reply_ctemp(connection_struct *conn, struct smb_request *req)
SMB_STRUCT_STAT sbuf;
char *s;
NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBctemp);
@@ -1994,8 +2095,8 @@ void reply_ctemp(connection_struct *conn, struct smb_request *req)
fattr = SVAL(req->inbuf,smb_vwv0);
oplock_request = CORE_OPLOCK_REQUEST(req->inbuf);
- srvstr_get_path((char *)req->inbuf, req->flags2, fname,
- smb_buf(req->inbuf)+1, sizeof(fname), 0, STR_TERMINATE,
+ srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &fname,
+ smb_buf(req->inbuf)+1, 0, STR_TERMINATE,
&status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -2003,13 +2104,23 @@ void reply_ctemp(connection_struct *conn, struct smb_request *req)
return;
}
if (*fname) {
- pstrcat(fname,"/TMXXXXXX");
+ fname = talloc_asprintf(ctx,
+ "%s/TMXXXXXX",
+ fname);
} else {
- pstrcat(fname,"TMXXXXXX");
+ fname = talloc_strdup(ctx, "TMXXXXXX");
+ }
+
+ if (!fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBctemp);
+ return;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -2022,20 +2133,20 @@ void reply_ctemp(connection_struct *conn, struct smb_request *req)
return;
}
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBctemp);
return;
}
- status = check_name(conn, fname);
+ status = check_name(conn, CONST_DISCARD(char *,fname));
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBctemp);
return;
}
-
+
tmpfd = smb_mkstemp(fname);
if (tmpfd == -1) {
reply_unixerror(req, ERRDOS, ERRnoaccess);
@@ -2143,8 +2254,10 @@ static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp,
* unlink a file with all relevant access checks
*******************************************************************/
-static NTSTATUS do_unlink(connection_struct *conn, struct smb_request *req,
- char *fname, uint32 dirtype)
+static NTSTATUS do_unlink(connection_struct *conn,
+ struct smb_request *req,
+ const char *fname,
+ uint32 dirtype)
{
SMB_STRUCT_STAT sbuf;
uint32 fattr;
@@ -2266,32 +2379,35 @@ static NTSTATUS do_unlink(connection_struct *conn, struct smb_request *req,
****************************************************************************/
NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
- uint32 dirtype, char *name, BOOL has_wild)
+ uint32 dirtype, const char *name_in, BOOL has_wild)
{
- pstring directory;
- pstring mask;
- char *p;
+ const char *directory = NULL;
+ char *mask = NULL;
+ char *name = NULL;
+ char *p = NULL;
int count=0;
NTSTATUS status = NT_STATUS_OK;
SMB_STRUCT_STAT sbuf;
-
- *directory = *mask = 0;
-
- status = unix_convert(conn, name, has_wild, NULL, &sbuf);
+ TALLOC_CTX *ctx = talloc_tos();
+
+ status = unix_convert(ctx, conn, name_in, has_wild, &name, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
-
+
p = strrchr_m(name,'/');
if (!p) {
- pstrcpy(directory,".");
- pstrcpy(mask,name);
+ directory = talloc_strdup(ctx, ".");
+ if (!directory) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ mask = name;
} else {
*p = 0;
- pstrcpy(directory,name);
- pstrcpy(mask,p+1);
+ directory = name;
+ mask = p+1;
}
-
+
/*
* We should only check the mangled cache
* here if unix_convert failed. This means
@@ -2300,13 +2416,26 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
* for a possible mangle. This patch from
* Tine Smukavec <valentin.smukavec@hermes.si>.
*/
-
- if (!VALID_STAT(sbuf) && mangle_is_mangled(mask,conn->params))
- mangle_check_cache( mask, sizeof(pstring)-1, conn->params );
-
+
+ if (!VALID_STAT(sbuf) && mangle_is_mangled(mask,conn->params)) {
+ char *new_mask = NULL;
+ mangle_lookup_name_from_8_3(ctx,
+ mask,
+ &new_mask,
+ conn->params );
+ if (new_mask) {
+ mask = new_mask;
+ }
+ }
+
if (!has_wild) {
- pstrcat(directory,"/");
- pstrcat(directory,mask);
+ directory = talloc_asprintf(ctx,
+ "%s/%s",
+ directory,
+ mask);
+ if (!directory) {
+ return NT_STATUS_NO_MEMORY;
+ }
if (dirtype == 0) {
dirtype = FILE_ATTRIBUTE_NORMAL;
}
@@ -2326,13 +2455,14 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
struct smb_Dir *dir_hnd = NULL;
long offset = 0;
const char *dname;
-
+
if ((dirtype & SAMBA_ATTRIBUTES_MASK) == aDIR) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
if (strequal(mask,"????????.???")) {
- pstrcpy(mask,"*");
+ mask[0] = '*';
+ mask[1] = '\0';
}
status = check_name(conn, directory);
@@ -2344,35 +2474,37 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
if (dir_hnd == NULL) {
return map_nt_error_from_unix(errno);
}
-
+
/* XXXX the CIFS spec says that if bit0 of the flags2 field is set then
the pattern matches against the long name, otherwise the short name
We don't implement this yet XXXX
*/
-
+
status = NT_STATUS_NO_SUCH_FILE;
while ((dname = ReadDirName(dir_hnd, &offset))) {
SMB_STRUCT_STAT st;
- pstring fname;
- pstrcpy(fname,dname);
+ char *fname = NULL;
if (!is_visible_file(conn, directory, dname, &st, True)) {
continue;
}
/* Quick check for "." and ".." */
- if (fname[0] == '.') {
- if (!fname[1] || (fname[1] == '.' && !fname[2])) {
- continue;
- }
+ if (ISDOT(dname) || ISDOTDOT(dname)) {
+ continue;
}
- if(!mask_match(fname, mask, conn->case_sensitive)) {
+ if(!mask_match(dname, mask, conn->case_sensitive)) {
continue;
}
-
- slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname);
+
+ fname = talloc_asprintf(ctx, "%s/%s",
+ directory,
+ dname);
+ if (!fname) {
+ return NT_STATUS_NO_MEMORY;
+ }
status = check_name(conn, fname);
if (!NT_STATUS_IS_OK(status)) {
@@ -2382,16 +2514,19 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
status = do_unlink(conn, req, fname, dirtype);
if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(fname);
continue;
}
count++;
DEBUG(3,("unlink_internals: succesful unlink [%s]\n",
fname));
+
+ TALLOC_FREE(fname);
}
CloseDir(dir_hnd);
}
-
+
if (count == 0 && NT_STATUS_IS_OK(status)) {
status = map_nt_error_from_unix(errno);
}
@@ -2405,10 +2540,11 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
void reply_unlink(connection_struct *conn, struct smb_request *req)
{
- pstring name;
+ char *name = NULL;
uint32 dirtype;
NTSTATUS status;
BOOL path_contains_wcard = False;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBunlink);
@@ -2419,9 +2555,9 @@ void reply_unlink(connection_struct *conn, struct smb_request *req)
}
dirtype = SVAL(req->inbuf,smb_vwv0);
-
- srvstr_get_path_wcard((char *)req->inbuf, req->flags2, name,
- smb_buf(req->inbuf) + 1, sizeof(name), 0,
+
+ srvstr_get_path_wcard(ctx, (char *)req->inbuf, req->flags2, &name,
+ smb_buf(req->inbuf) + 1, 0,
STR_TERMINATE, &status, &path_contains_wcard);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -2429,9 +2565,11 @@ void reply_unlink(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath_wcard(conn,
+ status = resolve_dfspath_wcard(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- name, &path_contains_wcard);
+ name,
+ &name,
+ &path_contains_wcard);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -2443,9 +2581,9 @@ void reply_unlink(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBunlink);
return;
}
-
+
DEBUG(3,("reply_unlink : %s\n",name));
-
+
status = unlink_internals(conn, req, dirtype, name,
path_contains_wcard);
if (!NT_STATUS_IS_OK(status)) {
@@ -2471,9 +2609,12 @@ void reply_unlink(connection_struct *conn, struct smb_request *req)
static void fail_readraw(void)
{
- pstring errstr;
- slprintf(errstr, sizeof(errstr)-1, "FAIL ! reply_readbraw: socket write fail (%s)",
- strerror(errno) );
+ const char *errstr = talloc_asprintf(talloc_tos(),
+ "FAIL ! reply_readbraw: socket write fail (%s)",
+ strerror(errno));
+ if (!errstr) {
+ errstr = "";
+ }
exit_server_cleanly(errstr);
}
@@ -2798,6 +2939,7 @@ void reply_lockread(connection_struct *conn, struct smb_request *req)
NTSTATUS status;
files_struct *fsp;
struct byte_range_lock *br_lck = NULL;
+ char *p = NULL;
START_PROFILE(SMBlockread);
@@ -2879,7 +3021,9 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n",
SSVAL(req->outbuf,smb_vwv0,nread);
SSVAL(req->outbuf,smb_vwv5,nread+3);
- SSVAL(smb_buf(req->outbuf),1,nread);
+ p = smb_buf(req->outbuf);
+ SCVAL(p,0,0); /* pad byte. */
+ SSVAL(p,1,nread);
DEBUG(3,("lockread fnum=%d num=%d nread=%d\n",
fsp->fnum, (int)numtoread, (int)nread));
@@ -2986,12 +3130,14 @@ static int setup_readX_header(char *outbuf, size_t smb_maxcnt)
outsize = set_message(outbuf,12,smb_maxcnt,False);
data = smb_buf(outbuf);
+ memset(outbuf+smb_vwv0,'\0',24); /* valgrind init. */
+
+ SCVAL(outbuf,smb_vwv0,0xFF);
SSVAL(outbuf,smb_vwv2,0xFFFF); /* Remaining - must be -1. */
SSVAL(outbuf,smb_vwv5,smb_maxcnt);
SSVAL(outbuf,smb_vwv6,smb_offset(data,outbuf));
SSVAL(outbuf,smb_vwv7,(smb_maxcnt >> 16));
SSVAL(smb_buf(outbuf),-2,smb_maxcnt);
- SCVAL(outbuf,smb_vwv0,0xFF);
/* Reset the outgoing length, set_message truncates at 0x1FFFF. */
_smb_setlen_large(outbuf,(smb_size + 12*2 + smb_maxcnt - 4));
return outsize;
@@ -3025,7 +3171,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
#if defined(WITH_SENDFILE)
/*
- * We can only use sendfile on a non-chained packet
+ * We can only use sendfile on a non-chained packet
* but we can use on a non-oplocked file. tridge proved this
* on a train in Germany :-). JRA.
*/
@@ -3035,7 +3181,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
uint8 headerbuf[smb_size + 12 * 2];
DATA_BLOB header;
- /*
+ /*
* Set up the packet header before send. We
* assume here the sendfile will work (get the
* correct amount of data).
@@ -4587,7 +4733,7 @@ void reply_printwrite(connection_struct *conn, struct smb_request *req)
}
DEBUG( 3, ( "printwrite fnum=%d num=%d\n", fsp->fnum, numtowrite ) );
-
+
END_PROFILE(SMBsplwr);
return;
}
@@ -4598,14 +4744,15 @@ void reply_printwrite(connection_struct *conn, struct smb_request *req)
void reply_mkdir(connection_struct *conn, struct smb_request *req)
{
- pstring directory;
+ char *directory = NULL;
NTSTATUS status;
SMB_STRUCT_STAT sbuf;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBmkdir);
-
- srvstr_get_path((char *)req->inbuf, req->flags2, directory,
- smb_buf(req->inbuf) + 1, sizeof(directory), 0,
+
+ srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &directory,
+ smb_buf(req->inbuf) + 1, 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -4613,9 +4760,10 @@ void reply_mkdir(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath(conn,
+ status = resolve_dfspath(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- directory);
+ directory,
+ &directory);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -4628,7 +4776,7 @@ void reply_mkdir(connection_struct *conn, struct smb_request *req)
return;
}
- status = unix_convert(conn, directory, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBmkdir);
@@ -4677,7 +4825,9 @@ void reply_mkdir(connection_struct *conn, struct smb_request *req)
tree recursively. Return True on ok, False on fail.
****************************************************************************/
-static BOOL recursive_rmdir(connection_struct *conn, char *directory)
+static BOOL recursive_rmdir(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ char *directory)
{
const char *dname = NULL;
BOOL ret = True;
@@ -4688,33 +4838,35 @@ static BOOL recursive_rmdir(connection_struct *conn, char *directory)
return False;
while((dname = ReadDirName(dir_hnd, &offset))) {
- pstring fullname;
+ char *fullname = NULL;
SMB_STRUCT_STAT st;
- if((strcmp(dname, ".") == 0) || (strcmp(dname, "..")==0))
+ if (ISDOT(dname) || ISDOTDOT(dname)) {
continue;
+ }
- if (!is_visible_file(conn, directory, dname, &st, False))
+ if (!is_visible_file(conn, directory, dname, &st, False)) {
continue;
+ }
/* Construct the full name. */
- if(strlen(directory) + strlen(dname) + 1 >= sizeof(fullname)) {
+ fullname = talloc_asprintf(ctx,
+ "%s/%s",
+ directory,
+ dname);
+ if (!fullname) {
errno = ENOMEM;
ret = False;
break;
}
- pstrcpy(fullname, directory);
- pstrcat(fullname, "/");
- pstrcat(fullname, dname);
-
if(SMB_VFS_LSTAT(conn,fullname, &st) != 0) {
ret = False;
break;
}
if(st.st_mode & S_IFDIR) {
- if(!recursive_rmdir(conn, fullname)) {
+ if(!recursive_rmdir(ctx, conn, fullname)) {
ret = False;
break;
}
@@ -4726,6 +4878,7 @@ static BOOL recursive_rmdir(connection_struct *conn, char *directory)
ret = False;
break;
}
+ TALLOC_FREE(fullname);
}
CloseDir(dir_hnd);
return ret;
@@ -4735,7 +4888,9 @@ static BOOL recursive_rmdir(connection_struct *conn, char *directory)
The internals of the rmdir code - called elsewhere.
****************************************************************************/
-NTSTATUS rmdir_internals(connection_struct *conn, const char *directory)
+NTSTATUS rmdir_internals(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ const char *directory)
{
int ret;
SMB_STRUCT_STAT st;
@@ -4765,7 +4920,7 @@ NTSTATUS rmdir_internals(connection_struct *conn, const char *directory)
}
if(((errno == ENOTEMPTY)||(errno == EEXIST)) && lp_veto_files(SNUM(conn))) {
- /*
+ /*
* Check to see if the only thing in this directory are
* vetoed files/directories. If so then delete them and
* retry. If we fail to delete any of them (and we *don't*
@@ -4796,34 +4951,40 @@ NTSTATUS rmdir_internals(connection_struct *conn, const char *directory)
RewindDir(dir_hnd,&dirpos);
while ((dname = ReadDirName(dir_hnd,&dirpos))) {
- pstring fullname;
+ char *fullname = NULL;
- if((strcmp(dname, ".") == 0) || (strcmp(dname, "..")==0))
+ if (ISDOT(dname) || ISDOTDOT(dname)) {
continue;
- if (!is_visible_file(conn, directory, dname, &st, False))
+ }
+ if (!is_visible_file(conn, directory, dname, &st, False)) {
continue;
+ }
- /* Construct the full name. */
- if(strlen(directory) + strlen(dname) + 1 >= sizeof(fullname)) {
+ fullname = talloc_asprintf(ctx,
+ "%s/%s",
+ directory,
+ dname);
+
+ if(!fullname) {
errno = ENOMEM;
break;
}
- pstrcpy(fullname, directory);
- pstrcat(fullname, "/");
- pstrcat(fullname, dname);
-
- if(SMB_VFS_LSTAT(conn,fullname, &st) != 0)
+ if(SMB_VFS_LSTAT(conn,fullname, &st) != 0) {
break;
+ }
if(st.st_mode & S_IFDIR) {
if(lp_recursive_veto_delete(SNUM(conn))) {
- if(!recursive_rmdir(conn, fullname))
+ if(!recursive_rmdir(ctx, conn, fullname))
break;
}
- if(SMB_VFS_RMDIR(conn,fullname) != 0)
+ if(SMB_VFS_RMDIR(conn,fullname) != 0) {
break;
- } else if(SMB_VFS_UNLINK(conn,fullname) != 0)
+ }
+ } else if(SMB_VFS_UNLINK(conn,fullname) != 0) {
break;
+ }
+ TALLOC_FREE(fullname);
}
CloseDir(dir_hnd);
/* Retry the rmdir */
@@ -4851,13 +5012,15 @@ NTSTATUS rmdir_internals(connection_struct *conn, const char *directory)
void reply_rmdir(connection_struct *conn, struct smb_request *req)
{
- pstring directory;
+ char *directory = NULL;
SMB_STRUCT_STAT sbuf;
NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
+
START_PROFILE(SMBrmdir);
- srvstr_get_path((char *)req->inbuf, req->flags2, directory,
- smb_buf(req->inbuf) + 1, sizeof(directory), 0,
+ srvstr_get_path(ctx, (char *)req->inbuf, req->flags2, &directory,
+ smb_buf(req->inbuf) + 1, 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -4865,9 +5028,10 @@ void reply_rmdir(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath(conn,
+ status = resolve_dfspath(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- directory);
+ directory,
+ &directory);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -4880,13 +5044,14 @@ void reply_rmdir(connection_struct *conn, struct smb_request *req)
return;
}
- status = unix_convert(conn, directory, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, directory, False, &directory,
+ NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBrmdir);
return;
}
-
+
status = check_name(conn, directory);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -4895,104 +5060,146 @@ void reply_rmdir(connection_struct *conn, struct smb_request *req)
}
dptr_closepath(directory, req->smbpid);
- status = rmdir_internals(conn, directory);
+ status = rmdir_internals(ctx, conn, directory);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBrmdir);
return;
}
-
+
reply_outbuf(req, 0, 0);
-
+
DEBUG( 3, ( "rmdir %s\n", directory ) );
-
+
END_PROFILE(SMBrmdir);
return;
}
/*******************************************************************
Resolve wildcards in a filename rename.
- Note that name is in UNIX charset and thus potentially can be more
- than fstring buffer (255 bytes) especially in default UTF-8 case.
- Therefore, we use pstring inside and all calls should ensure that
- name2 is at least pstring-long (they do already)
********************************************************************/
-static BOOL resolve_wildcards(const char *name1, char *name2)
+static BOOL resolve_wildcards(TALLOC_CTX *ctx,
+ const char *name1,
+ const char *name2,
+ char **pp_newname)
{
- pstring root1,root2;
- pstring ext1,ext2;
+ char *name2_copy = NULL;
+ char *root1 = NULL;
+ char *root2 = NULL;
+ char *ext1 = NULL;
+ char *ext2 = NULL;
char *p,*p2, *pname1, *pname2;
- int available_space, actual_space;
+ name2_copy = talloc_strdup(ctx, name2);
+ if (!name2_copy) {
+ return False;
+ }
+
pname1 = strrchr_m(name1,'/');
- pname2 = strrchr_m(name2,'/');
+ pname2 = strrchr_m(name2_copy,'/');
- if (!pname1 || !pname2)
- return(False);
+ if (!pname1 || !pname2) {
+ return False;
+ }
- pstrcpy(root1,pname1);
- pstrcpy(root2,pname2);
+ /* Truncate the copy of name2 at the last '/' */
+ *pname2 = '\0';
+
+ /* Now go past the '/' */
+ pname1++;
+ pname2++;
+
+ root1 = talloc_strdup(ctx, pname1);
+ root2 = talloc_strdup(ctx, pname2);
+
+ if (!root1 || !root2) {
+ return False;
+ }
+
p = strrchr_m(root1,'.');
if (p) {
*p = 0;
- pstrcpy(ext1,p+1);
+ ext1 = talloc_strdup(ctx, p+1);
} else {
- pstrcpy(ext1,"");
+ ext1 = talloc_strdup(ctx, "");
}
p = strrchr_m(root2,'.');
if (p) {
*p = 0;
- pstrcpy(ext2,p+1);
+ ext2 = talloc_strdup(ctx, p+1);
} else {
- pstrcpy(ext2,"");
+ ext2 = talloc_strdup(ctx, "");
+ }
+
+ if (!ext1 || !ext2) {
+ return False;
}
p = root1;
p2 = root2;
while (*p2) {
if (*p2 == '?') {
+ /* Hmmm. Should this be mb-aware ? */
*p2 = *p;
p2++;
} else if (*p2 == '*') {
- pstrcpy(p2, p);
+ *p2 = '\0';
+ root2 = talloc_asprintf(ctx, "%s%s",
+ root2,
+ p);
+ if (!root2) {
+ return False;
+ }
break;
} else {
p2++;
}
- if (*p)
+ if (*p) {
p++;
+ }
}
p = ext1;
p2 = ext2;
while (*p2) {
if (*p2 == '?') {
+ /* Hmmm. Should this be mb-aware ? */
*p2 = *p;
p2++;
} else if (*p2 == '*') {
- pstrcpy(p2, p);
+ *p2 = '\0';
+ ext2 = talloc_asprintf(ctx, "%s%s",
+ ext2,
+ p);
+ if (!ext2) {
+ return False;
+ }
break;
} else {
p2++;
}
- if (*p)
+ if (*p) {
p++;
+ }
}
- available_space = sizeof(pstring) - PTR_DIFF(pname2, name2);
-
- if (ext2[0]) {
- actual_space = snprintf(pname2, available_space - 1, "%s.%s", root2, ext2);
- if (actual_space >= available_space - 1) {
- DEBUG(1,("resolve_wildcards: can't fit resolved name into specified buffer (overrun by %d bytes)\n",
- actual_space - available_space));
- }
+ if (*ext2) {
+ *pp_newname = talloc_asprintf(ctx, "%s/%s.%s",
+ name2_copy,
+ root2,
+ ext2);
} else {
- pstrcpy_base(pname2, root2, name2);
+ *pp_newname = talloc_asprintf(ctx, "%s/%s",
+ name2_copy,
+ root2);
}
- return(True);
+ if (!*pp_newname) {
+ return False;
+ }
+
+ return True;
}
/****************************************************************************
@@ -5108,11 +5315,14 @@ static void notify_rename(connection_struct *conn, BOOL is_dir,
Rename an open file - given an fsp.
****************************************************************************/
-NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp,
- pstring newname,
- const char *newname_last_component,
- uint32 attrs, BOOL replace_if_exists)
+NTSTATUS rename_internals_fsp(connection_struct *conn,
+ files_struct *fsp,
+ char *newname,
+ const char *newname_last_component,
+ uint32 attrs,
+ BOOL replace_if_exists)
{
+ TALLOC_CTX *ctx = talloc_tos();
SMB_STRUCT_STAT sbuf, sbuf1;
NTSTATUS status = NT_STATUS_OK;
struct share_mode_lock *lck = NULL;
@@ -5124,14 +5334,15 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp,
if (!NT_STATUS_IS_OK(status)) {
return status;
}
-
+
/* Ensure newname contains a '/' */
if(strrchr_m(newname,'/') == 0) {
- pstring tmpstr;
-
- pstrcpy(tmpstr, "./");
- pstrcat(tmpstr, newname);
- pstrcpy(newname, tmpstr);
+ newname = talloc_asprintf(ctx,
+ "./%s",
+ newname);
+ if (!newname) {
+ return NT_STATUS_NO_MEMORY;
+ }
}
/*
@@ -5145,7 +5356,7 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp,
if((conn->case_sensitive == False) && (conn->case_preserve == True) &&
strequal(newname, fsp->fsp_name)) {
char *p;
- pstring newname_modified_last_component;
+ char *newname_modified_last_component = NULL;
/*
* Get the last component of the modified name.
@@ -5153,15 +5364,23 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp,
* character above.
*/
p = strrchr_m(newname,'/');
- pstrcpy(newname_modified_last_component,p+1);
-
- if(strcsequal(newname_modified_last_component,
+ newname_modified_last_component = talloc_strdup(ctx,
+ p+1);
+ if (!newname_modified_last_component) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ if(strcsequal(newname_modified_last_component,
newname_last_component) == False) {
/*
* Replace the modified last component with
* the original.
*/
- pstrcpy(p+1, newname_last_component);
+ *p = '\0'; /* Truncate at the '/' */
+ newname = talloc_asprintf(ctx,
+ "%s/%s",
+ newname,
+ newname_last_component);
}
}
@@ -5261,7 +5480,7 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp,
}
}
TALLOC_FREE(lck);
- return NT_STATUS_OK;
+ return NT_STATUS_OK;
}
TALLOC_FREE(lck);
@@ -5271,7 +5490,7 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp,
} else {
status = map_nt_error_from_unix(errno);
}
-
+
DEBUG(3,("rename_internals_fsp: Error %s rename %s -> %s\n",
nt_errstr(status), fsp->fsp_name,newname));
@@ -5280,21 +5499,25 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp,
/****************************************************************************
The guts of the rename command, split out so it may be called by the NT SMB
- code.
+ code.
****************************************************************************/
-NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
- pstring name,
- pstring newname,
- uint32 attrs,
- BOOL replace_if_exists,
- BOOL src_has_wild,
- BOOL dest_has_wild)
+NTSTATUS rename_internals(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ struct smb_request *req,
+ const char *name_in,
+ const char *newname_in,
+ uint32 attrs,
+ BOOL replace_if_exists,
+ BOOL src_has_wild,
+ BOOL dest_has_wild)
{
- pstring directory;
- pstring mask;
- pstring last_component_src;
- pstring last_component_dest;
+ char *directory = NULL;
+ char *mask = NULL;
+ char *last_component_src = NULL;
+ char *last_component_dest = NULL;
+ char *name = NULL;
+ char *newname = NULL;
char *p;
int count=0;
NTSTATUS status = NT_STATUS_OK;
@@ -5302,27 +5525,26 @@ NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
struct smb_Dir *dir_hnd = NULL;
const char *dname;
long offset = 0;
- pstring destname;
-
- *directory = *mask = 0;
ZERO_STRUCT(sbuf1);
ZERO_STRUCT(sbuf2);
- status = unix_convert(conn, name, src_has_wild, last_component_src, &sbuf1);
+ status = unix_convert(ctx, conn, name_in, src_has_wild, &name,
+ &last_component_src, &sbuf1);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- status = unix_convert(conn, newname, dest_has_wild, last_component_dest, &sbuf2);
+ status = unix_convert(ctx, conn, newname_in, dest_has_wild, &newname,
+ &last_component_dest, &sbuf2);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
/*
* Split the old name into directory and last component
- * strings. Note that unix_convert may have stripped off a
- * leading ./ from both name and newname if the rename is
+ * strings. Note that unix_convert may have stripped off a
+ * leading ./ from both name and newname if the rename is
* at the root of the share. We need to make sure either both
* name and newname contain a / character or neither of them do
* as this is checked in resolve_wildcards().
@@ -5330,12 +5552,18 @@ NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
p = strrchr_m(name,'/');
if (!p) {
- pstrcpy(directory,".");
- pstrcpy(mask,name);
+ directory = talloc_strdup(ctx, ".");
+ if (!directory) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ mask = name;
} else {
*p = 0;
- pstrcpy(directory,name);
- pstrcpy(mask,p+1);
+ directory = talloc_strdup(ctx, name);
+ if (!directory) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ mask = p+1;
*p = '/'; /* Replace needed for exceptional test below. */
}
@@ -5349,7 +5577,14 @@ NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
*/
if (!VALID_STAT(sbuf1) && mangle_is_mangled(mask, conn->params)) {
- mangle_check_cache( mask, sizeof(pstring)-1, conn->params );
+ char *new_mask = NULL;
+ mangle_lookup_name_from_8_3(ctx,
+ mask,
+ &new_mask,
+ conn->params );
+ if (new_mask) {
+ mask = new_mask;
+ }
}
if (!src_has_wild) {
@@ -5361,35 +5596,45 @@ NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
BOOL is_short_name = mangle_is_8_3(name, True, conn->params);
/* Add a terminating '/' to the directory name. */
- pstrcat(directory,"/");
- pstrcat(directory,mask);
-
+ directory = talloc_asprintf_append(directory,
+ "/%s",
+ mask);
+ if (!directory) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
/* Ensure newname contains a '/' also */
if(strrchr_m(newname,'/') == 0) {
- pstring tmpstr;
-
- pstrcpy(tmpstr, "./");
- pstrcat(tmpstr, newname);
- pstrcpy(newname, tmpstr);
+ newname = talloc_asprintf(ctx,
+ "./%s",
+ newname);
+ if (!newname) {
+ return NT_STATUS_NO_MEMORY;
+ }
}
-
+
DEBUG(3, ("rename_internals: case_sensitive = %d, "
"case_preserve = %d, short case preserve = %d, "
"directory = %s, newname = %s, "
- "last_component_dest = %s, is_8_3 = %d\n",
+ "last_component_dest = %s, is_8_3 = %d\n",
conn->case_sensitive, conn->case_preserve,
- conn->short_case_preserve, directory,
+ conn->short_case_preserve, directory,
newname, last_component_dest, is_short_name));
/* The dest name still may have wildcards. */
if (dest_has_wild) {
- if (!resolve_wildcards(directory,newname)) {
- DEBUG(6, ("rename_internals: resolve_wildcards %s %s failed\n",
- directory,newname));
+ char *mod_newname = NULL;
+ if (!resolve_wildcards(ctx,
+ directory,newname,&mod_newname)) {
+ DEBUG(6, ("rename_internals: resolve_wildcards "
+ "%s %s failed\n",
+ directory,
+ newname));
return NT_STATUS_NO_MEMORY;
}
+ newname = mod_newname;
}
-
+
ZERO_STRUCT(sbuf1);
SMB_VFS_STAT(conn, directory, &sbuf1);
@@ -5427,40 +5672,38 @@ NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
* Wildcards - process each file that matches.
*/
if (strequal(mask,"????????.???")) {
- pstrcpy(mask,"*");
+ mask[0] = '*';
+ mask[1] = '\0';
}
-
+
status = check_name(conn, directory);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
-
+
dir_hnd = OpenDir(conn, directory, mask, attrs);
if (dir_hnd == NULL) {
return map_nt_error_from_unix(errno);
}
-
+
status = NT_STATUS_NO_SUCH_FILE;
/*
* Was status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
* - gentest fix. JRA
*/
-
+
while ((dname = ReadDirName(dir_hnd, &offset))) {
- files_struct *fsp;
- pstring fname;
+ files_struct *fsp = NULL;
+ char *fname = NULL;
+ char *destname = NULL;
BOOL sysdir_entry = False;
- pstrcpy(fname,dname);
-
/* Quick check for "." and ".." */
- if (fname[0] == '.') {
- if (!fname[1] || (fname[1] == '.' && !fname[2])) {
- if (attrs & aDIR) {
- sysdir_entry = True;
- } else {
- continue;
- }
+ if (ISDOT(dname) || ISDOTDOT(dname)) {
+ if (attrs & aDIR) {
+ sysdir_entry = True;
+ } else {
+ continue;
}
}
@@ -5468,25 +5711,34 @@ NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
continue;
}
- if(!mask_match(fname, mask, conn->case_sensitive)) {
+ if(!mask_match(dname, mask, conn->case_sensitive)) {
continue;
}
-
+
if (sysdir_entry) {
status = NT_STATUS_OBJECT_NAME_INVALID;
break;
}
- slprintf(fname, sizeof(fname)-1, "%s/%s", directory, dname);
+ fname = talloc_asprintf(ctx,
+ "%s/%s",
+ directory,
+ dname);
+ if (!fname) {
+ return NT_STATUS_NO_MEMORY;
+ }
- pstrcpy(destname,newname);
-
- if (!resolve_wildcards(fname,destname)) {
- DEBUG(6, ("resolve_wildcards %s %s failed\n",
+ if (!resolve_wildcards(ctx,
+ fname,newname,&destname)) {
+ DEBUG(6, ("resolve_wildcards %s %s failed\n",
fname, destname));
+ TALLOC_FREE(fname);
continue;
}
-
+ if (!destname) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
ZERO_STRUCT(sbuf1);
SMB_VFS_STAT(conn, fname, &sbuf1);
@@ -5525,13 +5777,16 @@ NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
DEBUG(3,("rename_internals: doing rename on %s -> "
"%s\n",fname,destname));
+
+ TALLOC_FREE(fname);
+ TALLOC_FREE(destname);
}
CloseDir(dir_hnd);
if (count == 0 && NT_STATUS_IS_OK(status)) {
status = map_nt_error_from_unix(errno);
}
-
+
return status;
}
@@ -5541,13 +5796,14 @@ NTSTATUS rename_internals(connection_struct *conn, struct smb_request *req,
void reply_mv(connection_struct *conn, struct smb_request *req)
{
- pstring name;
- pstring newname;
+ char *name = NULL;
+ char *newname = NULL;
char *p;
uint32 attrs;
NTSTATUS status;
BOOL src_has_wcard = False;
BOOL dest_has_wcard = False;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBmv);
@@ -5560,8 +5816,8 @@ void reply_mv(connection_struct *conn, struct smb_request *req)
attrs = SVAL(req->inbuf,smb_vwv0);
p = smb_buf(req->inbuf) + 1;
- p += srvstr_get_path_wcard((char *)req->inbuf, req->flags2, name, p,
- sizeof(name), 0, STR_TERMINATE, &status,
+ p += srvstr_get_path_wcard(ctx, (char *)req->inbuf, req->flags2, &name, p,
+ 0, STR_TERMINATE, &status,
&src_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -5569,18 +5825,20 @@ void reply_mv(connection_struct *conn, struct smb_request *req)
return;
}
p++;
- p += srvstr_get_path_wcard((char *)req->inbuf, req->flags2, newname, p,
- sizeof(newname), 0, STR_TERMINATE, &status,
+ p += srvstr_get_path_wcard(ctx, (char *)req->inbuf, req->flags2, &newname, p,
+ 0, STR_TERMINATE, &status,
&dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBmv);
return;
}
-
- status = resolve_dfspath_wcard(conn,
+
+ status = resolve_dfspath_wcard(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- name, &src_has_wcard);
+ name,
+ &name,
+ &src_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -5593,9 +5851,11 @@ void reply_mv(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath_wcard(conn,
+ status = resolve_dfspath_wcard(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- newname, &dest_has_wcard);
+ newname,
+ &newname,
+ &dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -5607,10 +5867,10 @@ void reply_mv(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBmv);
return;
}
-
+
DEBUG(3,("reply_mv : %s -> %s\n",name,newname));
-
- status = rename_internals(conn, req, name, newname, attrs, False,
+
+ status = rename_internals(ctx, conn, req, name, newname, attrs, False,
src_has_wcard, dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
if (open_was_deferred(req->mid)) {
@@ -5624,7 +5884,7 @@ void reply_mv(connection_struct *conn, struct smb_request *req)
}
reply_outbuf(req, 0, 0);
-
+
END_PROFILE(SMBmv);
return;
}
@@ -5637,9 +5897,10 @@ void reply_mv(connection_struct *conn, struct smb_request *req)
* TODO: check error codes on all callers
*/
-NTSTATUS copy_file(connection_struct *conn,
- char *src,
- char *dest1,
+NTSTATUS copy_file(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ const char *src,
+ const char *dest1,
int ofun,
int count,
BOOL target_is_directory)
@@ -5647,24 +5908,32 @@ NTSTATUS copy_file(connection_struct *conn,
SMB_STRUCT_STAT src_sbuf, sbuf2;
SMB_OFF_T ret=-1;
files_struct *fsp1,*fsp2;
- pstring dest;
+ char *dest = NULL;
uint32 dosattrs;
uint32 new_create_disposition;
NTSTATUS status;
-
- pstrcpy(dest,dest1);
+
+ dest = talloc_strdup(ctx, dest1);
+ if (!dest) {
+ return NT_STATUS_NO_MEMORY;
+ }
if (target_is_directory) {
- char *p = strrchr_m(src,'/');
+ const char *p = strrchr_m(src,'/');
if (p) {
p++;
} else {
p = src;
}
- pstrcat(dest,"/");
- pstrcat(dest,p);
+ dest = talloc_asprintf_append(dest,
+ "/%s",
+ p);
+ if (!dest) {
+ return NT_STATUS_NO_MEMORY;
+ }
}
if (!vfs_file_exist(conn,src,&src_sbuf)) {
+ TALLOC_FREE(dest);
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
@@ -5673,6 +5942,7 @@ NTSTATUS copy_file(connection_struct *conn,
} else {
if (!map_open_params_to_ntcreate(dest1,0,ofun,
NULL, NULL, &new_create_disposition, NULL)) {
+ TALLOC_FREE(dest);
return NT_STATUS_INVALID_PARAMETER;
}
}
@@ -5687,6 +5957,7 @@ NTSTATUS copy_file(connection_struct *conn,
NULL, &fsp1);
if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(dest);
return status;
}
@@ -5704,6 +5975,8 @@ NTSTATUS copy_file(connection_struct *conn,
INTERNAL_OPEN_ONLY,
NULL, &fsp2);
+ TALLOC_FREE(dest);
+
if (!NT_STATUS_IS_OK(status)) {
close_file(fsp1,ERROR_CLOSE);
return status;
@@ -5719,7 +5992,7 @@ NTSTATUS copy_file(connection_struct *conn,
src_sbuf.st_size = 0;
}
}
-
+
if (src_sbuf.st_size) {
ret = vfs_transfer_file(fsp1, fsp2, src_sbuf.st_size);
}
@@ -5754,9 +6027,10 @@ NTSTATUS copy_file(connection_struct *conn,
void reply_copy(connection_struct *conn, struct smb_request *req)
{
- pstring name;
- pstring directory;
- pstring mask,newname;
+ char *name = NULL;
+ char *newname = NULL;
+ char *directory = NULL;
+ char *mask = NULL;
char *p;
int count=0;
int error = ERRnoaccess;
@@ -5769,6 +6043,7 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
BOOL dest_has_wild = False;
SMB_STRUCT_STAT sbuf1, sbuf2;
NTSTATUS status;
+ TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBcopy);
@@ -5782,28 +6057,26 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
ofun = SVAL(req->inbuf,smb_vwv1);
flags = SVAL(req->inbuf,smb_vwv2);
- *directory = *mask = 0;
-
p = smb_buf(req->inbuf);
- p += srvstr_get_path_wcard((char *)req->inbuf, req->flags2, name, p,
- sizeof(name), 0, STR_TERMINATE, &status,
+ p += srvstr_get_path_wcard(ctx, (char *)req->inbuf, req->flags2, &name, p,
+ 0, STR_TERMINATE, &status,
&source_has_wild);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBcopy);
return;
}
- p += srvstr_get_path_wcard((char *)req->inbuf, req->flags2, newname, p,
- sizeof(newname), 0, STR_TERMINATE, &status,
+ p += srvstr_get_path_wcard(ctx, (char *)req->inbuf, req->flags2, &newname, p,
+ 0, STR_TERMINATE, &status,
&dest_has_wild);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBcopy);
return;
}
-
+
DEBUG(3,("reply_copy : %s -> %s\n",name,newname));
-
+
if (tid2 != conn->cnum) {
/* can't currently handle inter share copies XXXX */
DEBUG(3,("Rejecting inter-share copy\n"));
@@ -5812,9 +6085,11 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath_wcard(conn,
+ status = resolve_dfspath_wcard(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- name, &source_has_wild);
+ name,
+ &name,
+ &source_has_wild);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -5827,9 +6102,11 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath_wcard(conn,
+ status = resolve_dfspath_wcard(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- newname, &dest_has_wild);
+ newname,
+ &newname,
+ &dest_has_wild);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -5842,14 +6119,16 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
return;
}
- status = unix_convert(conn, name, source_has_wild, NULL, &sbuf1);
+ status = unix_convert(ctx, conn, name, source_has_wild,
+ &name, NULL, &sbuf1);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBcopy);
return;
}
- status = unix_convert(conn, newname, dest_has_wild, NULL, &sbuf2);
+ status = unix_convert(ctx, conn, newname, dest_has_wild,
+ &newname, NULL, &sbuf2);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBcopy);
@@ -5880,12 +6159,22 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
p = strrchr_m(name,'/');
if (!p) {
- pstrcpy(directory,"./");
- pstrcpy(mask,name);
+ directory = talloc_strdup(ctx, "./");
+ if (!directory) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBcopy);
+ return;
+ }
+ mask = name;
} else {
*p = 0;
- pstrcpy(directory,name);
- pstrcpy(mask,p+1);
+ directory = talloc_strdup(ctx, name);
+ if (!directory) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBcopy);
+ return;
+ }
+ mask = p+1;
}
/*
@@ -5898,18 +6187,29 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
*/
if (!VALID_STAT(sbuf1) && mangle_is_mangled(mask, conn->params)) {
- mangle_check_cache( mask, sizeof(pstring)-1, conn->params );
+ char *new_mask = NULL;
+ mangle_lookup_name_from_8_3(ctx,
+ mask,
+ &new_mask,
+ conn->params );
+ if (new_mask) {
+ mask = new_mask;
+ }
}
if (!source_has_wild) {
- pstrcat(directory,"/");
- pstrcat(directory,mask);
+ directory = talloc_asprintf_append(directory,
+ "/%s",
+ mask);
if (dest_has_wild) {
- if (!resolve_wildcards(directory,newname)) {
+ char *mod_newname = NULL;
+ if (!resolve_wildcards(ctx,
+ directory,newname,&mod_newname)) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
END_PROFILE(SMBcopy);
return;
}
+ newname = mod_newname;
}
status = check_name(conn, directory);
@@ -5918,16 +6218,16 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBcopy);
return;
}
-
+
status = check_name(conn, newname);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBcopy);
return;
}
-
- status = copy_file(conn,directory,newname,ofun,
- count,target_is_directory);
+
+ status = copy_file(ctx,conn,directory,newname,ofun,
+ count,target_is_directory);
if(!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -5938,12 +6238,13 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
}
} else {
struct smb_Dir *dir_hnd = NULL;
- const char *dname;
+ const char *dname = NULL;
long offset = 0;
- pstring destname;
- if (strequal(mask,"????????.???"))
- pstrcpy(mask,"*");
+ if (strequal(mask,"????????.???")) {
+ mask[0] = '*';
+ mask[1] = '\0';
+ }
status = check_name(conn, directory);
if (!NT_STATUS_IS_OK(status)) {
@@ -5951,7 +6252,7 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBcopy);
return;
}
-
+
dir_hnd = OpenDir(conn, directory, mask, 0);
if (dir_hnd == NULL) {
status = map_nt_error_from_unix(errno);
@@ -5963,23 +6264,41 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
error = ERRbadfile;
while ((dname = ReadDirName(dir_hnd, &offset))) {
- pstring fname;
- pstrcpy(fname,dname);
-
+ char *destname = NULL;
+ char *fname = NULL;
+
+ if (ISDOT(dname) || ISDOTDOT(dname)) {
+ continue;
+ }
+
if (!is_visible_file(conn, directory, dname, &sbuf1, False)) {
continue;
}
- if(!mask_match(fname, mask, conn->case_sensitive)) {
+ if(!mask_match(dname, mask, conn->case_sensitive)) {
continue;
}
error = ERRnoaccess;
- slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname);
- pstrcpy(destname,newname);
- if (!resolve_wildcards(fname,destname)) {
+ fname = talloc_asprintf(ctx,
+ "%s/%s",
+ directory,
+ dname);
+ if (!fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBcopy);
+ return;
+ }
+
+ if (!resolve_wildcards(ctx,
+ fname,newname,&destname)) {
continue;
}
+ if (!destname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ END_PROFILE(SMBcopy);
+ return;
+ }
status = check_name(conn, fname);
if (!NT_STATUS_IS_OK(status)) {
@@ -5987,25 +6306,27 @@ void reply_copy(connection_struct *conn, struct smb_request *req)
END_PROFILE(SMBcopy);
return;
}
-
+
status = check_name(conn, destname);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
END_PROFILE(SMBcopy);
return;
}
-
+
DEBUG(3,("reply_copy : doing copy on %s -> %s\n",fname, destname));
- status = copy_file(conn,fname,destname,ofun,
+ status = copy_file(ctx,conn,fname,destname,ofun,
count,target_is_directory);
if (NT_STATUS_IS_OK(status)) {
count++;
}
+ TALLOC_FREE(fname);
+ TALLOC_FREE(destname);
}
CloseDir(dir_hnd);
}
-
+
if (count == 0) {
if(err) {
/* Error on close... */
diff --git a/source/smbd/sec_ctx.c b/source/smbd/sec_ctx.c
index 67b15dc014c..08d522cdd7a 100644
--- a/source/smbd/sec_ctx.c
+++ b/source/smbd/sec_ctx.c
@@ -239,7 +239,9 @@ static void set_unix_security_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *grou
/* Start context switch */
gain_root();
#ifdef HAVE_SETGROUPS
- sys_setgroups(gid, ngroups, groups);
+ if (sys_setgroups(gid, ngroups, groups) != 0 && !non_root_mode()) {
+ smb_panic("sys_setgroups failed");
+ }
#endif
become_id(uid, gid);
/* end context switch */
@@ -278,10 +280,11 @@ static void set_unix_security_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *grou
if (syscall(SYS_initgroups, (ngroups > max) ? max : ngroups,
- groups, uid) == 1) {
+ groups, uid) == -1 && !non_root_mode()) {
DEBUG(0, ("WARNING: failed to set group list "
"(%d groups) for UID %ld: %s\n",
ngroups, uid, strerror(errno)));
+ smb_panic("sys_setgroups failed");
}
become_uid(uid);
diff --git a/source/smbd/service.c b/source/smbd/service.c
index e9f6924aa22..1c46e3776c2 100644
--- a/source/smbd/service.c
+++ b/source/smbd/service.c
@@ -52,7 +52,7 @@ static BOOL canonicalize_path(connection_struct *conn, pstring path)
Observent people will notice a similarity between this and check_path_syntax :-).
****************************************************************************/
-void set_conn_connectpath(connection_struct *conn, const pstring connectpath)
+void set_conn_connectpath(connection_struct *conn, const char *connectpath)
{
pstring destname;
char *d = destname;
@@ -1111,27 +1111,31 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
strerror(errno) ));
}
change_to_root_user();
- /* Call VFS disconnect hook */
+ /* Call VFS disconnect hook */
SMB_VFS_DISCONNECT(conn);
yield_connection(conn, lp_servicename(snum));
conn_free(conn);
*status = NT_STATUS_BAD_NETWORK_NAME;
return NULL;
}
-
+
string_set(&conn->origpath,conn->connectpath);
-
+
#if SOFTLINK_OPTIMISATION
/* resolve any soft links early if possible */
if (vfs_ChDir(conn,conn->connectpath) == 0) {
- pstring s;
- pstrcpy(s,conn->connectpath);
- vfs_GetWd(conn,s);
+ TALLOC_CTX *ctx = talloc_stackframe();
+ char *s = vfs_GetWd(ctx,s);
+ if (!s) {
+ *status = map_nt_error_from_unix(errno);
+ return NULL;
+ }
set_conn_connectpath(conn,s);
vfs_ChDir(conn,conn->connectpath);
+ TALLOC_FREE(ctx);
}
#endif
-
+
/*
* Print out the 'connected as' stuff here as we need
* to know the effective uid and gid we will be using
@@ -1147,7 +1151,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
dbgtext( "(uid=%d, gid=%d) ", (int)geteuid(), (int)getegid() );
dbgtext( "(pid %d)\n", (int)sys_getpid() );
}
-
+
/* we've finished with the user stuff - go back to root */
change_to_root_user();
return(conn);
diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c
index 520835bef70..20021ec7f78 100644
--- a/source/smbd/sesssetup.c
+++ b/source/smbd/sesssetup.c
@@ -400,7 +400,7 @@ static void reply_spnego_kerberos(connection_struct *conn,
if (logon_info && logon_info->info3.hdr_logon_dom.uni_str_len) {
unistr2_to_ascii(netbios_domain_name,
&logon_info->info3.uni_logon_dom,
- -1);
+ sizeof(netbios_domain_name));
domain = netbios_domain_name;
DEBUG(10, ("Mapped to [%s] (using PAC)\n", domain));
diff --git a/source/smbd/statcache.c b/source/smbd/statcache.c
index d2f09930a0b..a066091b527 100644
--- a/source/smbd/statcache.c
+++ b/source/smbd/statcache.c
@@ -2,7 +2,7 @@
Unix SMB/CIFS implementation.
stat cache code
Copyright (C) Andrew Tridgell 1992-2000
- Copyright (C) Jeremy Allison 1999-2004
+ Copyright (C) Jeremy Allison 1999-2007
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2003
Copyright (C) Volker Lendecke 2007
@@ -40,7 +40,8 @@ static TDB_CONTEXT *tdb_stat_cache;
*
*/
-void stat_cache_add( const char *full_orig_name, const char *translated_path,
+void stat_cache_add( const char *full_orig_name,
+ char *translated_path,
BOOL case_sensitive)
{
size_t translated_path_length;
@@ -48,9 +49,12 @@ void stat_cache_add( const char *full_orig_name, const char *translated_path,
char *original_path;
size_t original_path_length;
size_t sc_size = lp_max_stat_cache_size();
+ char saved_char;
+ TALLOC_CTX *ctx = talloc_tos();
- if (!lp_stat_cache())
+ if (!lp_stat_cache()) {
return;
+ }
if (sc_size && (tdb_map_size(tdb_stat_cache) > sc_size*1024)) {
reset_stat_cache();
@@ -73,20 +77,15 @@ void stat_cache_add( const char *full_orig_name, const char *translated_path,
* would be a waste.
*/
- if (case_sensitive && (strcmp(full_orig_name, translated_path) == 0))
+ if (case_sensitive && (strcmp(full_orig_name, translated_path) == 0)) {
return;
+ }
/*
* Remove any trailing '/' characters from the
* translated path.
*/
- /*
- * To save a strdup we don't necessarily 0-terminate the translated
- * path in the tdb. Instead, we do it directly after the tdb_fetch in
- * stat_cache_lookup.
- */
-
translated_path_length = strlen(translated_path);
if(translated_path[translated_path_length-1] == '/') {
@@ -94,9 +93,9 @@ void stat_cache_add( const char *full_orig_name, const char *translated_path,
}
if(case_sensitive) {
- original_path = SMB_STRDUP(full_orig_name);
+ original_path = talloc_strdup(ctx,full_orig_name);
} else {
- original_path = strdup_upper(full_orig_name);
+ original_path = talloc_strdup_upper(ctx,full_orig_name);
}
if (!original_path) {
@@ -118,7 +117,7 @@ void stat_cache_add( const char *full_orig_name, const char *translated_path,
(unsigned long)original_path_length,
translated_path,
(unsigned long)translated_path_length));
- SAFE_FREE(original_path);
+ TALLOC_FREE(original_path);
return;
}
@@ -129,13 +128,17 @@ void stat_cache_add( const char *full_orig_name, const char *translated_path,
original_path_length = translated_path_length;
}
- /*
- * New entry or replace old entry.
- */
+ /* Ensure we're null terminated. */
+ saved_char = translated_path[translated_path_length];
+ translated_path[translated_path_length] = '\0';
data_val.dsize = translated_path_length + 1;
data_val.dptr = (uint8 *)translated_path;
+ /*
+ * New entry or replace old entry.
+ */
+
if (tdb_store_bystring(tdb_stat_cache, original_path, data_val,
TDB_REPLACE) != 0) {
DEBUG(0,("stat_cache_add: Error storing entry %s -> %s\n",
@@ -148,7 +151,8 @@ void stat_cache_add( const char *full_orig_name, const char *translated_path,
translated_path));
}
- SAFE_FREE(original_path);
+ translated_path[translated_path_length] = saved_char;
+ TALLOC_FREE(original_path);
}
/**
@@ -157,8 +161,10 @@ void stat_cache_add( const char *full_orig_name, const char *translated_path,
* @param conn A connection struct to do the stat() with.
* @param name The path we are attempting to cache, modified by this routine
* to be correct as far as the cache can tell us. We assume that
- * it is a malloc'ed string, we free it if necessary.
- * @param dirpath The path as far as the stat cache told us.
+ * it is a talloc'ed string from top of stack, we free it if
+ * necessary.
+ * @param dirpath The path as far as the stat cache told us. Also talloced
+ * from top of stack.
* @param start A pointer into name, for where to 'start' in fixing the rest
* of the name up.
* @param psd A stat buffer, NOT from the cache, but just a side-effect.
@@ -168,8 +174,11 @@ void stat_cache_add( const char *full_orig_name, const char *translated_path,
*
*/
-BOOL stat_cache_lookup(connection_struct *conn, char **pname, char **dirpath,
- char **start, SMB_STRUCT_STAT *pst)
+BOOL stat_cache_lookup(connection_struct *conn,
+ char **pp_name,
+ char **pp_dirpath,
+ char **pp_start,
+ SMB_STRUCT_STAT *pst)
{
char *chk_name;
size_t namelen;
@@ -179,15 +188,18 @@ BOOL stat_cache_lookup(connection_struct *conn, char **pname, char **dirpath,
size_t translated_path_length;
TDB_DATA data_val;
char *name;
+ TALLOC_CTX *ctx = talloc_tos();
- if (!lp_stat_cache())
+ *pp_dirpath = NULL;
+ *pp_start = *pp_name;
+
+ if (!lp_stat_cache()) {
return False;
+ }
- name = *pname;
+ name = *pp_name;
namelen = strlen(name);
- *start = name;
-
DO_PROFILE_INC(statcache_lookups);
/*
@@ -198,14 +210,14 @@ BOOL stat_cache_lookup(connection_struct *conn, char **pname, char **dirpath,
}
if (conn->case_sensitive) {
- chk_name = SMB_STRDUP(name);
+ chk_name = talloc_strdup(ctx,name);
if (!chk_name) {
DEBUG(0, ("stat_cache_lookup: strdup failed!\n"));
return False;
}
} else {
- chk_name = strdup_upper(name);
+ chk_name = talloc_strdup_upper(ctx,name);
if (!chk_name) {
DEBUG(0, ("stat_cache_lookup: strdup_upper failed!\n"));
return False;
@@ -216,8 +228,9 @@ BOOL stat_cache_lookup(connection_struct *conn, char **pname, char **dirpath,
* if we uppercase. We need to treat this differently
* below.
*/
- if (strlen(chk_name) != namelen)
+ if (strlen(chk_name) != namelen) {
sizechanged = True;
+ }
}
while (1) {
@@ -239,7 +252,7 @@ BOOL stat_cache_lookup(connection_struct *conn, char **pname, char **dirpath,
* We reached the end of the name - no match.
*/
DO_PROFILE_INC(statcache_misses);
- SAFE_FREE(chk_name);
+ TALLOC_FREE(chk_name);
return False;
}
@@ -249,25 +262,25 @@ BOOL stat_cache_lookup(connection_struct *conn, char **pname, char **dirpath,
* Count the number of times we have done this, we'll
* need it when reconstructing the string.
*/
- if (sizechanged)
+
+ if (sizechanged) {
num_components++;
+ }
if ((*chk_name == '\0')
|| ISDOT(chk_name) || ISDOTDOT(chk_name)) {
DO_PROFILE_INC(statcache_misses);
- SAFE_FREE(chk_name);
+ TALLOC_FREE(chk_name);
return False;
}
}
- translated_path = (char *)data_val.dptr;
+ translated_path = talloc_strdup(ctx,(char *)data_val.dptr);
+ if (!translated_path) {
+ smb_panic("talloc failed");
+ }
translated_path_length = data_val.dsize - 1;
-
- /*
- * In stat_cache_add we did not necessarily 0-terminate the translated
- * path. Do it here, where we do have a freshly malloc'ed blob.
- */
- translated_path[translated_path_length] = '\0';
+ SAFE_FREE(data_val.dptr);
DEBUG(10,("stat_cache_lookup: lookup succeeded for name [%s] "
"-> [%s]\n", chk_name, translated_path ));
@@ -276,50 +289,51 @@ BOOL stat_cache_lookup(connection_struct *conn, char **pname, char **dirpath,
if (SMB_VFS_STAT(conn, translated_path, pst) != 0) {
/* Discard this entry - it doesn't exist in the filesystem. */
tdb_delete_bystring(tdb_stat_cache, chk_name);
- SAFE_FREE(chk_name);
- SAFE_FREE(data_val.dptr);
+ TALLOC_FREE(chk_name);
+ TALLOC_FREE(translated_path);
return False;
}
if (!sizechanged) {
- memcpy(name, translated_path,
+ memcpy(*pp_name, translated_path,
MIN(namelen, translated_path_length));
- }
- else {
+ } else {
if (num_components == 0) {
- name = SMB_STRNDUP(translated_path,
+ name = talloc_strndup(ctx, translated_path,
translated_path_length);
} else {
char *sp;
sp = strnrchr_m(name, '/', num_components);
if (sp) {
- asprintf(&name, "%.*s%s",
+ name = talloc_asprintf(ctx,"%.*s%s",
(int)translated_path_length,
translated_path, sp);
} else {
- name = SMB_STRNDUP(translated_path,
- translated_path_length);
+ name = talloc_strndup(ctx,
+ translated_path,
+ translated_path_length);
}
}
if (name == NULL) {
/*
* TODO: Get us out of here with a real error message
*/
- smb_panic("malloc failed");
+ smb_panic("talloc failed");
}
- SAFE_FREE(*pname);
- *pname = name;
+ TALLOC_FREE(*pp_name);
+ *pp_name = name;
}
/* set pointer for 'where to start' on fixing the rest of the name */
- *start = &name[translated_path_length];
- if (**start == '/')
- ++*start;
+ *pp_start = &name[translated_path_length];
+ if (**pp_start == '/') {
+ ++*pp_start;
+ }
- *dirpath = translated_path;
- SAFE_FREE(chk_name);
+ *pp_dirpath = translated_path;
+ TALLOC_FREE(chk_name);
return (namelen == translated_path_length);
}
@@ -344,7 +358,7 @@ void send_stat_cache_delete_message(const char *name)
void stat_cache_delete(const char *name)
{
- char *lname = strdup_upper(name);
+ char *lname = talloc_strdup_upper(talloc_tos(), name);
if (!lname) {
return;
@@ -353,7 +367,7 @@ void stat_cache_delete(const char *name)
lname, name ));
tdb_delete_bystring(tdb_stat_cache, lname);
- SAFE_FREE(lname);
+ TALLOC_FREE(lname);
}
/***************************************************************
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 4f1064879e2..7392271b483 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -1,4 +1,4 @@
-/*
+/*
Unix SMB/CIFS implementation.
SMB transaction2 handling
Copyright (C) Jeremy Allison 1994-2007
@@ -13,12 +13,12 @@
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/>.
*/
@@ -211,7 +211,7 @@ static struct ea_list *get_ea_list_from_file(TALLOC_CTX *mem_ctx, connection_str
if (strnequal(p, "system.", 7) || samba_private_attr_name(p))
continue;
-
+
listp = TALLOC_P(mem_ctx, struct ea_list);
if (!listp)
return NULL;
@@ -783,7 +783,7 @@ static void call_trans2open(connection_struct *conn,
int open_ofun;
uint32 open_size;
char *pname;
- pstring fname;
+ char *fname = NULL;
SMB_OFF_T size=0;
int fattr=0,mtime=0;
SMB_INO_T inode = 0;
@@ -797,6 +797,7 @@ static void call_trans2open(connection_struct *conn,
uint32 share_mode;
uint32 create_disposition;
uint32 create_options = 0;
+ TALLOC_CTX *ctx = talloc_tos();
/*
* Ensure we have enough parameters to perform the operation.
@@ -829,8 +830,8 @@ static void call_trans2open(connection_struct *conn,
return;
}
- srvstr_get_path(params, req->flags2, fname, pname,
- sizeof(fname), total_params - 28, STR_TERMINATE,
+ srvstr_get_path(ctx, params, req->flags2, &fname, pname,
+ total_params - 28, STR_TERMINATE,
&status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -843,12 +844,12 @@ static void call_trans2open(connection_struct *conn,
/* XXXX we need to handle passed times, sattr and flags */
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
}
-
+
status = check_name(conn, fname);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -1007,7 +1008,9 @@ static void call_trans2open(connection_struct *conn,
Case can be significant or not.
**********************************************************/
-static BOOL exact_match(connection_struct *conn, char *str, char *mask)
+static BOOL exact_match(connection_struct *conn,
+ const char *str,
+ const char *mask)
{
if (mask[0] == '.' && mask[1] == 0)
return False;
@@ -1133,21 +1136,29 @@ static NTSTATUS unix_perms_from_wire( connection_struct *conn,
Get a level dependent lanman2 dir entry.
****************************************************************************/
-static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
- char *path_mask,uint32 dirtype,int info_level,
- int requires_resume_key,
- BOOL dont_descend,char **ppdata,
- char *base_data, char *end_data,
- int space_remaining,
- BOOL *out_of_space, BOOL *got_exact_match,
- int *last_entry_off, struct ea_list *name_list, TALLOC_CTX *ea_ctx)
+static BOOL get_lanman2_dir_entry(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ uint16 flags2,
+ const char *path_mask,
+ uint32 dirtype,
+ int info_level,
+ int requires_resume_key,
+ BOOL dont_descend,
+ char **ppdata,
+ char *base_data,
+ char *end_data,
+ int space_remaining,
+ BOOL *out_of_space,
+ BOOL *got_exact_match,
+ int *last_entry_off,
+ struct ea_list *name_list)
{
const char *dname;
BOOL found = False;
SMB_STRUCT_STAT sbuf;
- pstring mask;
- pstring pathreal;
- pstring fname;
+ const char *mask = NULL;
+ char *pathreal = NULL;
+ const char *fname = NULL;
char *p, *q, *pdata = *ppdata;
uint32 reskey=0;
long prev_dirpos=0;
@@ -1163,8 +1174,8 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
uint32 nt_extmode; /* Used for NT connections instead of mode */
BOOL needslash = ( conn->dirpath[strlen(conn->dirpath) -1] != '/');
BOOL check_mangled_names = lp_manglednames(conn->params);
+ char mangled_name[13]; /* mangled 8.3 name. */
- *fname = 0;
*out_of_space = False;
*got_exact_match = False;
@@ -1172,18 +1183,20 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
ZERO_STRUCT(adate_ts);
ZERO_STRUCT(create_date_ts);
- if (!conn->dirptr)
+ if (!conn->dirptr) {
return(False);
+ }
p = strrchr_m(path_mask,'/');
if(p != NULL) {
- if(p[1] == '\0')
- pstrcpy(mask,"*.*");
- else
- pstrcpy(mask, p+1);
- } else
- pstrcpy(mask, path_mask);
-
+ if(p[1] == '\0') {
+ mask = talloc_strdup(ctx,"*.*");
+ } else {
+ mask = p+1;
+ }
+ } else {
+ mask = path_mask;
+ }
while (!found) {
BOOL got_match;
@@ -1191,7 +1204,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
/* Needed if we run out of space */
long curr_dirpos = prev_dirpos = dptr_TellDir(conn->dirptr);
- dname = dptr_ReadDirName(conn->dirptr,&curr_dirpos,&sbuf);
+ dname = dptr_ReadDirName(ctx,conn->dirptr,&curr_dirpos,&sbuf);
/*
* Due to bugs in NT client redirectors we are not using
@@ -1204,12 +1217,27 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
DEBUG(8,("get_lanman2_dir_entry:readdir on dirptr 0x%lx now at offset %ld\n",
(long)conn->dirptr,curr_dirpos));
-
+
if (!dname) {
return(False);
}
- pstrcpy(fname,dname);
+ /*
+ * fname may get mangled, dname is never mangled.
+ * Whenever we're accessing the filesystem we use
+ * pathreal which is composed from dname.
+ */
+
+ pathreal = NULL;
+ fname = dname;
+
+ /* Mangle fname if it's an illegal name. */
+ if (mangle_must_mangle(dname,conn->params)) {
+ if (!name_to_8_3(dname,mangled_name,True,conn->params)) {
+ continue; /* Error - couldn't mangle. */
+ }
+ fname = mangled_name;
+ }
if(!(got_match = *got_exact_match = exact_match(conn, fname, mask))) {
got_match = mask_match(fname, mask, conn->case_sensitive);
@@ -1217,48 +1245,60 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
if(!got_match && check_mangled_names &&
!mangle_is_8_3(fname, False, conn->params)) {
-
/*
* It turns out that NT matches wildcards against
* both long *and* short names. This may explain some
* of the wildcard wierdness from old DOS clients
* that some people have been seeing.... JRA.
*/
+ /* Force the mangling into 8.3. */
+ if (!name_to_8_3( fname, mangled_name, False, conn->params)) {
+ continue; /* Error - couldn't mangle. */
+ }
- pstring newname;
- pstrcpy( newname, fname);
- mangle_map( newname, True, False, conn->params);
- if(!(got_match = *got_exact_match = exact_match(conn, newname, mask)))
- got_match = mask_match(newname, mask, conn->case_sensitive);
+ if(!(got_match = *got_exact_match = exact_match(conn, mangled_name, mask))) {
+ got_match = mask_match(mangled_name, mask, conn->case_sensitive);
+ }
}
if (got_match) {
- BOOL isdots = (strequal(fname,"..") || strequal(fname,"."));
+ BOOL isdots = (ISDOT(dname) || ISDOTDOT(dname));
+
if (dont_descend && !isdots) {
continue;
}
-
- pstrcpy(pathreal,conn->dirpath);
- if(needslash) {
- pstrcat(pathreal,"/");
+
+ if (needslash) {
+ pathreal = NULL;
+ pathreal = talloc_asprintf(ctx,
+ "%s/%s",
+ conn->dirpath,
+ dname);
+ } else {
+ pathreal = talloc_asprintf(ctx,
+ "%s%s",
+ conn->dirpath,
+ dname);
+ }
+
+ if (!pathreal) {
+ return False;
}
- pstrcat(pathreal,dname);
if (INFO_LEVEL_IS_UNIX(info_level)) {
if (SMB_VFS_LSTAT(conn,pathreal,&sbuf) != 0) {
DEBUG(5,("get_lanman2_dir_entry:Couldn't lstat [%s] (%s)\n",
pathreal,strerror(errno)));
+ TALLOC_FREE(pathreal);
continue;
}
} else if (!VALID_STAT(sbuf) && SMB_VFS_STAT(conn,pathreal,&sbuf) != 0) {
- pstring link_target;
-
- /* Needed to show the msdfs symlinks as
+ /* Needed to show the msdfs symlinks as
* directories */
- if(lp_host_msdfs() &&
+ if(lp_host_msdfs() &&
lp_msdfs_root(SNUM(conn)) &&
- ((ms_dfs_link = is_msdfs_link(conn, pathreal, link_target, &sbuf)) == True)) {
+ ((ms_dfs_link = is_msdfs_link(conn, pathreal, &sbuf)) == True)) {
DEBUG(5,("get_lanman2_dir_entry: Masquerading msdfs link %s "
"as a directory\n",
pathreal));
@@ -1268,6 +1308,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
DEBUG(5,("get_lanman2_dir_entry:Couldn't stat [%s] (%s)\n",
pathreal,strerror(errno)));
+ TALLOC_FREE(pathreal);
continue;
}
}
@@ -1280,6 +1321,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
if (!dir_check_ftype(conn,mode,dirtype)) {
DEBUG(5,("get_lanman2_dir_entry: [%s] attribs didn't match %x\n",fname,dirtype));
+ TALLOC_FREE(pathreal);
continue;
}
@@ -1301,17 +1343,15 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
create_date = convert_timespec_to_time_t(create_date_ts);
mdate = convert_timespec_to_time_t(mdate_ts);
adate = convert_timespec_to_time_t(adate_ts);
-
+
DEBUG(5,("get_lanman2_dir_entry: found %s fname=%s\n",pathreal,fname));
-
+
found = True;
dptr_DirCacheAdd(conn->dirptr, dname, curr_dirpos);
}
}
- mangle_map(fname,False,True,conn->params);
-
p = pdata;
last_entry_ptr = p;
@@ -1412,7 +1452,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
SSVAL(p,20,mode);
p += 22; /* p now points to the EA area. */
- file_list = get_ea_list_from_file(ea_ctx, conn, NULL, pathreal, &ea_len);
+ file_list = get_ea_list_from_file(ctx, conn, NULL, pathreal, &ea_len);
name_list = ea_list_union(name_list, file_list, &ea_len);
/* We need to determine if this entry will fit in the space available. */
@@ -1426,7 +1466,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
}
/* Push the ea_data followed by the name. */
- p += fill_ea_buffer(ea_ctx, p, space_remaining, conn, name_list);
+ p += fill_ea_buffer(ctx, p, space_remaining, conn, name_list);
nameptr = p;
len = srvstr_push(base_data, flags2,
p + 1, fname, PTR_DIFF(end_data, p),
@@ -1473,10 +1513,11 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
* a Win2k client bug. JRA.
*/
if (!was_8_3 && check_mangled_names) {
- pstring mangled_name;
- pstrcpy(mangled_name, fname);
- mangle_map(mangled_name,True,True,
- conn->params);
+ if (!name_to_8_3(fname,mangled_name,True,
+ conn->params)) {
+ /* Error - mangle failed ! */
+ memset(mangled_name,'\0',12);
+ }
mangled_name[12] = 0;
len = srvstr_push(base_data, flags2,
p+2, mangled_name, 24,
@@ -1523,7 +1564,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
SIVAL(pdata,0,len);
p = pdata + len;
break;
-
+
case SMB_FIND_FILE_FULL_DIRECTORY_INFO:
DEBUG(10,("get_lanman2_dir_entry: SMB_FIND_FILE_FULL_DIRECTORY_INFO\n"));
p += 4;
@@ -1628,10 +1669,11 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
* a Win2k client bug. JRA.
*/
if (!was_8_3 && check_mangled_names) {
- pstring mangled_name;
- pstrcpy(mangled_name, fname);
- mangle_map(mangled_name,True,True,
- conn->params);
+ if (!name_to_8_3(fname,mangled_name,True,
+ conn->params)) {
+ /* Error - mangle failed ! */
+ memset(mangled_name,'\0',12);
+ }
mangled_name[12] = 0;
len = srvstr_push(base_data, flags2,
p+2, mangled_name, 24,
@@ -1698,7 +1740,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint16 flags2,
break;
- default:
+ default:
return(False);
}
@@ -1744,8 +1786,8 @@ static void call_trans2findfirst(connection_struct *conn,
BOOL close_if_end;
BOOL requires_resume_key;
int info_level;
- pstring directory;
- pstring mask;
+ char *directory = NULL;
+ const char *mask = NULL;
char *p;
int last_entry_off=0;
int dptr_num = -1;
@@ -1757,9 +1799,9 @@ static void call_trans2findfirst(connection_struct *conn,
int space_remaining;
BOOL mask_contains_wcard = False;
SMB_STRUCT_STAT sbuf;
- TALLOC_CTX *ea_ctx = NULL;
struct ea_list *ea_list = NULL;
NTSTATUS ntstatus = NT_STATUS_OK;
+ TALLOC_CTX *ctx = talloc_tos();
if (total_params < 13) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
@@ -1774,8 +1816,6 @@ static void call_trans2findfirst(connection_struct *conn,
requires_resume_key = (findfirst_flags & FLAG_TRANS2_FIND_REQUIRE_RESUME);
info_level = SVAL(params,6);
- *directory = *mask = 0;
-
DEBUG(3,("call_trans2findfirst: dirtype = %x, maxentries = %d, close_after_first=%d, \
close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n",
(unsigned int)dirtype, maxentries, close_after_first, close_if_end, requires_resume_key,
@@ -1809,15 +1849,19 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n",
return;
}
- srvstr_get_path_wcard(params, req->flags2, directory,
- params+12, sizeof(directory), total_params - 12,
+ srvstr_get_path_wcard(ctx, params, req->flags2, &directory,
+ params+12, total_params - 12,
STR_TERMINATE, &ntstatus, &mask_contains_wcard);
if (!NT_STATUS_IS_OK(ntstatus)) {
reply_nterror(req, ntstatus);
return;
}
- ntstatus = resolve_dfspath_wcard(conn, req->flags2 & FLAGS2_DFS_PATHNAMES, directory, &mask_contains_wcard);
+ ntstatus = resolve_dfspath_wcard(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ directory,
+ &directory,
+ &mask_contains_wcard);
if (!NT_STATUS_IS_OK(ntstatus)) {
if (NT_STATUS_EQUAL(ntstatus,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
@@ -1828,11 +1872,12 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n",
return;
}
- ntstatus = unix_convert(conn, directory, True, NULL, &sbuf);
+ ntstatus = unix_convert(ctx, conn, directory, True, &directory, NULL, &sbuf);
if (!NT_STATUS_IS_OK(ntstatus)) {
reply_nterror(req, ntstatus);
return;
}
+
ntstatus = check_name(conn, directory);
if (!NT_STATUS_IS_OK(ntstatus)) {
reply_nterror(req, ntstatus);
@@ -1843,14 +1888,18 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n",
if(p == NULL) {
/* Windows and OS/2 systems treat search on the root '\' as if it were '\*' */
if((directory[0] == '.') && (directory[1] == '\0')) {
- pstrcpy(mask,"*");
+ mask = "*";
mask_contains_wcard = True;
} else {
- pstrcpy(mask,directory);
+ mask = directory;
+ }
+ directory = talloc_strdup(talloc_tos(), "./");
+ if (!directory) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
}
- pstrcpy(directory,"./");
} else {
- pstrcpy(mask,p+1);
+ mask = p+1;
*p = 0;
}
@@ -1876,16 +1925,10 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
reply_doserror(req, ERRDOS, ERReasnotsupported);
return;
}
-
- if ((ea_ctx = talloc_init("findnext_ea_list")) == NULL) {
- reply_nterror(req, NT_STATUS_NO_MEMORY);
- return;
- }
/* Pull out the list of names. */
- ea_list = read_ea_name_list(ea_ctx, pdata + 4, ea_size - 4);
+ ea_list = read_ea_name_list(ctx, pdata + 4, ea_size - 4);
if (!ea_list) {
- talloc_destroy(ea_ctx);
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
return;
}
@@ -1894,7 +1937,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
*ppdata = (char *)SMB_REALLOC(
*ppdata, max_data_bytes + DIR_ENTRY_SAFETY_MARGIN);
if(*ppdata == NULL ) {
- talloc_destroy(ea_ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
@@ -1904,7 +1946,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
/* Realloc the params space */
*pparams = (char *)SMB_REALLOC(*pparams, 10);
if (*pparams == NULL) {
- talloc_destroy(ea_ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
@@ -1924,7 +1965,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
&conn->dirptr);
if (!NT_STATUS_IS_OK(ntstatus)) {
- talloc_destroy(ea_ctx);
reply_nterror(req, ntstatus);
return;
}
@@ -1932,13 +1972,13 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
dptr_num = dptr_dnum(conn->dirptr);
DEBUG(4,("dptr_num is %d, wcard = %s, attr = %d\n", dptr_num, mask, dirtype));
- /* We don't need to check for VOL here as this is returned by
+ /* We don't need to check for VOL here as this is returned by
a different TRANS2 call. */
-
+
DEBUG(8,("dirpath=<%s> dontdescend=<%s>\n", conn->dirpath,lp_dontdescend(SNUM(conn))));
if (in_list(conn->dirpath,lp_dontdescend(SNUM(conn)),conn->case_sensitive))
dont_descend = True;
-
+
p = pdata;
space_remaining = max_data_bytes;
out_of_space = False;
@@ -1952,14 +1992,19 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
out_of_space = True;
finished = False;
} else {
- finished = !get_lanman2_dir_entry(conn,
+ TALLOC_CTX *sub_ctx = talloc_stackframe();
+
+ finished = !get_lanman2_dir_entry(sub_ctx,
+ conn,
req->flags2,
mask,dirtype,info_level,
requires_resume_key,dont_descend,
&p,pdata,data_end,
space_remaining, &out_of_space,
&got_exact_match,
- &last_entry_off, ea_list, ea_ctx);
+ &last_entry_off, ea_list);
+
+ TALLOC_FREE(sub_ctx);
}
if (finished && out_of_space)
@@ -1980,8 +2025,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
space_remaining = max_data_bytes - PTR_DIFF(p,pdata);
}
-
- talloc_destroy(ea_ctx);
/* Check if we can close the dirptr */
if(close_after_first || (finished && close_if_end)) {
@@ -1989,8 +2032,8 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
dptr_close(&dptr_num);
}
- /*
- * If there are no matching entries we must return ERRDOS/ERRbadfile -
+ /*
+ * If there are no matching entries we must return ERRDOS/ERRbadfile -
* from observation of NT. NB. This changes to ERRDOS,ERRnofiles if
* the protocol level is less than NT1. Tested with smbclient. JRA.
* This should fix the OS/2 client bug #2335.
@@ -2020,14 +2063,18 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
send_trans2_replies(req, params, 10, pdata, PTR_DIFF(p,pdata),
max_data_bytes);
- if ((! *directory) && dptr_path(dptr_num))
- slprintf(directory,sizeof(directory)-1, "(%s)",dptr_path(dptr_num));
+ if ((! *directory) && dptr_path(dptr_num)) {
+ directory = talloc_strdup(talloc_tos(),dptr_path(dptr_num));
+ if (!directory) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ }
+ }
DEBUG( 4, ( "%s mask=%s directory=%s dirtype=%d numentries=%d\n",
smb_fn_name(CVAL(req->inbuf,smb_com)),
mask, directory, dirtype, numentries ) );
- /*
+ /*
* Force a name mangle here to ensure that the
* mask as an 8.3 name is top of the mangled cache.
* The reasons for this are subtle. Don't remove
@@ -2035,8 +2082,10 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
* (see PR#13758). JRA.
*/
- if(!mangle_is_8_3_wildcards( mask, False, conn->params))
- mangle_map(mask, True, True, conn->params);
+ if(!mangle_is_8_3_wildcards( mask, False, conn->params)) {
+ char mangled_name[13];
+ name_to_8_3(mask, mangled_name, True, conn->params);
+ }
return;
}
@@ -2069,10 +2118,10 @@ static void call_trans2findnext(connection_struct *conn,
BOOL requires_resume_key;
BOOL continue_bit;
BOOL mask_contains_wcard = False;
- pstring resume_name;
- pstring mask;
- pstring directory;
- char *p;
+ char *resume_name = NULL;
+ const char *mask = NULL;
+ const char *directory = NULL;
+ char *p = NULL;
uint16 dirtype;
int numentries = 0;
int i, last_entry_off=0;
@@ -2080,9 +2129,9 @@ static void call_trans2findnext(connection_struct *conn,
BOOL dont_descend = False;
BOOL out_of_space = False;
int space_remaining;
- TALLOC_CTX *ea_ctx = NULL;
struct ea_list *ea_list = NULL;
NTSTATUS ntstatus = NT_STATUS_OK;
+ TALLOC_CTX *ctx = talloc_tos();
if (total_params < 13) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
@@ -2099,10 +2148,8 @@ static void call_trans2findnext(connection_struct *conn,
requires_resume_key = (findnext_flags & FLAG_TRANS2_FIND_REQUIRE_RESUME);
continue_bit = (findnext_flags & FLAG_TRANS2_FIND_CONTINUE);
- *mask = *directory = *resume_name = 0;
-
- srvstr_get_path_wcard(params, req->flags2, resume_name,
- params+12, sizeof(resume_name),
+ srvstr_get_path_wcard(ctx, params, req->flags2, &resume_name,
+ params+12,
total_params - 12, STR_TERMINATE, &ntstatus,
&mask_contains_wcard);
if (!NT_STATUS_IS_OK(ntstatus)) {
@@ -2110,12 +2157,12 @@ static void call_trans2findnext(connection_struct *conn,
complain (it thinks we're asking for the directory above the shared
path or an invalid name). Catch this as the resume name is only compared, never used in
a file access. JRA. */
- srvstr_pull(params, req->flags2,
- resume_name, params+12,
- sizeof(resume_name), total_params - 12,
+ srvstr_pull_talloc(ctx, params, req->flags2,
+ &resume_name, params+12,
+ total_params - 12,
STR_TERMINATE);
- if (!(ISDOT(resume_name) || ISDOTDOT(resume_name))) {
+ if (!resume_name || !(ISDOT(resume_name) || ISDOTDOT(resume_name))) {
reply_nterror(req, ntstatus);
return;
}
@@ -2170,21 +2217,15 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
return;
}
-
+
if (!lp_ea_support(SNUM(conn))) {
reply_doserror(req, ERRDOS, ERReasnotsupported);
return;
}
-
- if ((ea_ctx = talloc_init("findnext_ea_list")) == NULL) {
- reply_nterror(req, NT_STATUS_NO_MEMORY);
- return;
- }
/* Pull out the list of names. */
- ea_list = read_ea_name_list(ea_ctx, pdata + 4, ea_size - 4);
+ ea_list = read_ea_name_list(ctx, pdata + 4, ea_size - 4);
if (!ea_list) {
- talloc_destroy(ea_ctx);
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
return;
}
@@ -2193,7 +2234,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
*ppdata = (char *)SMB_REALLOC(
*ppdata, max_data_bytes + DIR_ENTRY_SAFETY_MARGIN);
if(*ppdata == NULL) {
- talloc_destroy(ea_ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
@@ -2204,7 +2244,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
/* Realloc the params space */
*pparams = (char *)SMB_REALLOC(*pparams, 6*SIZEOFWORD);
if(*pparams == NULL ) {
- talloc_destroy(ea_ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
@@ -2213,7 +2252,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
/* Check that the dptr is valid */
if(!(conn->dirptr = dptr_fetch_lanman2(dptr_num))) {
- talloc_destroy(ea_ctx);
reply_doserror(req, ERRDOS, ERRnofiles);
return;
}
@@ -2223,34 +2261,33 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
/* Get the wildcard mask from the dptr */
if((p = dptr_wcard(dptr_num))== NULL) {
DEBUG(2,("dptr_num %d has no wildcard\n", dptr_num));
- talloc_destroy(ea_ctx);
reply_doserror(req, ERRDOS, ERRnofiles);
return;
}
- pstrcpy(mask, p);
- pstrcpy(directory,conn->dirpath);
+ mask = p;
+ directory = conn->dirpath;
/* Get the attr mask from the dptr */
dirtype = dptr_attr(dptr_num);
DEBUG(3,("dptr_num is %d, mask = %s, attr = %x, dirptr=(0x%lX,%ld)\n",
- dptr_num, mask, dirtype,
+ dptr_num, mask, dirtype,
(long)conn->dirptr,
dptr_TellDir(conn->dirptr)));
- /* We don't need to check for VOL here as this is returned by
+ /* We don't need to check for VOL here as this is returned by
a different TRANS2 call. */
DEBUG(8,("dirpath=<%s> dontdescend=<%s>\n",conn->dirpath,lp_dontdescend(SNUM(conn))));
if (in_list(conn->dirpath,lp_dontdescend(SNUM(conn)),conn->case_sensitive))
dont_descend = True;
-
+
p = pdata;
space_remaining = max_data_bytes;
out_of_space = False;
- /*
+ /*
* Seek to the correct position. We no longer use the resume key but
* depend on the last file name instead.
*/
@@ -2260,14 +2297,20 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
long current_pos = 0;
/*
- * Remember, mangle_map is called by
+ * Remember, name_to_8_3 is called by
* get_lanman2_dir_entry(), so the resume name
* could be mangled. Ensure we check the unmangled name.
*/
if (mangle_is_mangled(resume_name, conn->params)) {
- mangle_check_cache(resume_name, sizeof(resume_name)-1,
- conn->params);
+ char *new_resume_name = NULL;
+ mangle_lookup_name_from_8_3(ctx,
+ resume_name,
+ &new_resume_name,
+ conn->params);
+ if (new_resume_name) {
+ resume_name = new_resume_name;
+ }
}
/*
@@ -2291,14 +2334,19 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
out_of_space = True;
finished = False;
} else {
- finished = !get_lanman2_dir_entry(conn,
+ TALLOC_CTX *sub_ctx = talloc_stackframe();
+
+ finished = !get_lanman2_dir_entry(sub_ctx,
+ conn,
req->flags2,
mask,dirtype,info_level,
requires_resume_key,dont_descend,
&p,pdata,data_end,
space_remaining, &out_of_space,
&got_exact_match,
- &last_entry_off, ea_list, ea_ctx);
+ &last_entry_off, ea_list);
+
+ TALLOC_FREE(sub_ctx);
}
if (finished && out_of_space)
@@ -2319,8 +2367,10 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
space_remaining = max_data_bytes - PTR_DIFF(p,pdata);
}
-
- talloc_destroy(ea_ctx);
+
+ DEBUG( 3, ( "%s mask=%s directory=%s dirtype=%d numentries=%d\n",
+ smb_fn_name(CVAL(req->inbuf,smb_com)),
+ mask, directory, dirtype, numentries ) );
/* Check if we can close the dirptr */
if(close_after_request || (finished && close_if_end)) {
@@ -2337,13 +2387,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
send_trans2_replies(req, params, 8, pdata, PTR_DIFF(p,pdata),
max_data_bytes);
- if ((! *directory) && dptr_path(dptr_num))
- slprintf(directory,sizeof(directory)-1, "(%s)",dptr_path(dptr_num));
-
- DEBUG( 3, ( "%s mask=%s directory=%s dirtype=%d numentries=%d\n",
- smb_fn_name(CVAL(req->inbuf,smb_com)),
- mask, directory, dirtype, numentries ) );
-
return;
}
@@ -3426,7 +3469,8 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
unsigned int data_size = 0;
unsigned int param_size = 2;
SMB_STRUCT_STAT sbuf;
- pstring fname, dos_fname;
+ char *dos_fname = NULL;
+ char *fname = NULL;
char *fullpathname;
char *base_name;
char *p;
@@ -3437,10 +3481,10 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
struct timespec create_time_ts, mtime_ts, atime_ts;
files_struct *fsp = NULL;
struct file_id fileid;
- TALLOC_CTX *data_ctx = NULL;
struct ea_list *ea_list = NULL;
uint32 access_mask = 0x12019F; /* Default - GENERIC_EXECUTE mapping from Windows */
char *lock_data = NULL;
+ TALLOC_CTX *ctx = talloc_tos();
if (!params) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
@@ -3473,23 +3517,31 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- if(fsp && (fsp->fake_file_handle)) {
+ /* Initial check for valid fsp ptr. */
+ if (!check_fsp_open(conn, req, fsp, &current_user)) {
+ return;
+ }
+
+ fname = talloc_strdup(talloc_tos(),fsp->fsp_name);
+ if (!fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
+
+ if(fsp->fake_file_handle) {
/*
* This is actually for the QUOTA_FAKE_FILE --metze
*/
-
- pstrcpy(fname, fsp->fsp_name);
+
/* We know this name is ok, it's already passed the checks. */
-
+
} else if(fsp && (fsp->is_directory || fsp->fh->fd == -1)) {
/*
* This is actually a QFILEINFO on a directory
* handle (returned from an NT SMB). NT5.0 seems
* to do this call. JRA.
*/
- /* We know this name is ok, it's already passed the checks. */
- pstrcpy(fname, fsp->fsp_name);
-
+
if (INFO_LEVEL_IS_UNIX(info_level)) {
/* Always do lstat for UNIX calls. */
if (SMB_VFS_LSTAT(conn,fname,&sbuf)) {
@@ -3513,7 +3565,6 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- pstrcpy(fname, fsp->fsp_name);
if (SMB_VFS_FSTAT(fsp,fsp->fh->fd,&sbuf) != 0) {
DEBUG(3,("fstat of fnum %d failed (%s)\n", fsp->fnum, strerror(errno)));
reply_unixerror(req, ERRDOS, ERRbadfid);
@@ -3524,6 +3575,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
delete_pending = get_delete_on_close_flag(fileid);
access_mask = fsp->access_mask;
}
+
} else {
NTSTATUS status = NT_STATUS_OK;
@@ -3542,17 +3594,19 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- srvstr_get_path(params, req->flags2, fname, &params[6],
- sizeof(fname), total_params - 6,
+ srvstr_get_path(ctx, params, req->flags2, &fname, &params[6],
+ total_params - 6,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
}
- status = resolve_dfspath(conn,
- req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+ status = resolve_dfspath(ctx,
+ conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req,
@@ -3563,7 +3617,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
@@ -3615,7 +3669,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
DEBUG(3,("call_trans2qfilepathinfo %s (fnum = %d) level=%d call=%d total_data=%d\n",
fname,fsp ? fsp->fnum : -1, info_level,tran_call,total_data));
- p = strrchr_m(fname,'/');
+ p = strrchr_m(fname,'/');
if (!p)
base_name = fname;
else
@@ -3657,15 +3711,9 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
return;
}
- if ((data_ctx = talloc_init("ea_list")) == NULL) {
- reply_nterror(req, NT_STATUS_NO_MEMORY);
- return;
- }
-
/* Pull out the list of names. */
- ea_list = read_ea_name_list(data_ctx, pdata + 4, ea_size - 4);
+ ea_list = read_ea_name_list(ctx, pdata + 4, ea_size - 4);
if (!ea_list) {
- talloc_destroy(data_ctx);
reply_nterror(
req, NT_STATUS_INVALID_PARAMETER);
return;
@@ -3686,16 +3734,10 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
return;
}
- if ((data_ctx = talloc_init("lock_request")) == NULL) {
- reply_nterror(req, NT_STATUS_NO_MEMORY);
- return;
- }
-
/* Copy the lock range data. */
lock_data = (char *)TALLOC_MEMDUP(
- data_ctx, pdata, total_data);
+ ctx, pdata, total_data);
if (!lock_data) {
- talloc_destroy(data_ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
@@ -3706,7 +3748,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
*pparams = (char *)SMB_REALLOC(*pparams,2);
if (*pparams == NULL) {
- talloc_destroy(data_ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
@@ -3715,7 +3756,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
data_size = max_data_bytes + DIR_ENTRY_SAFETY_MARGIN;
*ppdata = (char *)SMB_REALLOC(*ppdata, data_size);
if (*ppdata == NULL ) {
- talloc_destroy(data_ctx);
reply_nterror(req, NT_STATUS_NO_MEMORY);
return;
}
@@ -3760,10 +3800,20 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
/* NT expects the name to be in an exact form of the *full*
filename. See the trans2 torture test */
- if (strequal(base_name,".")) {
- pstrcpy(dos_fname, "\\");
+ if (ISDOT(base_name)) {
+ dos_fname = talloc_strdup(ctx, "\\");
+ if (!dos_fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
} else {
- pstr_sprintf(dos_fname, "\\%s", fname);
+ dos_fname = talloc_asprintf(ctx,
+ "\\%s",
+ fname);
+ if (!dos_fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
string_replace(dos_fname, '/', '\\');
}
@@ -3797,14 +3847,14 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
case SMB_INFO_IS_NAME_VALID:
DEBUG(10,("call_trans2qfilepathinfo: SMB_INFO_IS_NAME_VALID\n"));
if (tran_call == TRANSACT2_QFILEINFO) {
- /* os/2 needs this ? really ?*/
+ /* os/2 needs this ? really ?*/
reply_doserror(req, ERRDOS, ERRbadfunc);
return;
}
data_size = 0;
param_size = 0;
break;
-
+
case SMB_INFO_QUERY_EAS_FROM_LIST:
{
size_t total_ea_len = 0;
@@ -3812,18 +3862,16 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
DEBUG(10,("call_trans2qfilepathinfo: SMB_INFO_QUERY_EAS_FROM_LIST\n"));
- ea_file_list = get_ea_list_from_file(data_ctx, conn, fsp, fname, &total_ea_len);
+ ea_file_list = get_ea_list_from_file(ctx, conn, fsp, fname, &total_ea_len);
ea_list = ea_list_union(ea_list, ea_file_list, &total_ea_len);
if (!ea_list || (total_ea_len > data_size)) {
- talloc_destroy(data_ctx);
data_size = 4;
SIVAL(pdata,0,4); /* EA List Length must be set to 4 if no EA's. */
break;
}
- data_size = fill_ea_buffer(data_ctx, pdata, data_size, conn, ea_list);
- talloc_destroy(data_ctx);
+ data_size = fill_ea_buffer(ctx, pdata, data_size, conn, ea_list);
break;
}
@@ -3834,22 +3882,14 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
DEBUG(10,("call_trans2qfilepathinfo: SMB_INFO_QUERY_ALL_EAS\n"));
- data_ctx = talloc_init("ea_ctx");
- if (!data_ctx) {
- reply_nterror(req, NT_STATUS_NO_MEMORY);
- return;
- }
-
- ea_list = get_ea_list_from_file(data_ctx, conn, fsp, fname, &total_ea_len);
+ ea_list = get_ea_list_from_file(ctx, conn, fsp, fname, &total_ea_len);
if (!ea_list || (total_ea_len > data_size)) {
- talloc_destroy(data_ctx);
data_size = 4;
SIVAL(pdata,0,4); /* EA List Length must be set to 4 if no EA's. */
break;
}
- data_size = fill_ea_buffer(data_ctx, pdata, data_size, conn, ea_list);
- talloc_destroy(data_ctx);
+ data_size = fill_ea_buffer(ctx, pdata, data_size, conn, ea_list);
break;
}
@@ -3905,16 +3945,16 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
case SMB_QUERY_FILE_ALT_NAME_INFO:
case SMB_FILE_ALTERNATE_NAME_INFORMATION:
{
- pstring short_name;
-
+ char mangled_name[13];
DEBUG(10,("call_trans2qfilepathinfo: SMB_FILE_ALTERNATE_NAME_INFORMATION\n"));
- pstrcpy(short_name,base_name);
- /* Mangle if not already 8.3 */
- if(!mangle_is_8_3(short_name, True, conn->params)) {
- mangle_map(short_name,True,True,conn->params);
+ if (!name_to_8_3(base_name,mangled_name,
+ True,conn->params)) {
+ reply_nterror(
+ req,
+ NT_STATUS_NO_MEMORY);
}
len = srvstr_push(dstart, req->flags2,
- pdata+4, short_name,
+ pdata+4, mangled_name,
PTR_DIFF(dend, pdata+4),
STR_UNICODE);
data_size = 4 + len;
@@ -4122,7 +4162,12 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
case SMB_QUERY_FILE_UNIX_LINK:
{
- pstring buffer;
+ char *buffer = TALLOC_ARRAY(ctx, char, 1024);
+
+ if (!buffer) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
DEBUG(10,("call_trans2qfilepathinfo: SMB_QUERY_FILE_UNIX_LINK\n"));
#ifdef S_ISLNK
@@ -4135,7 +4180,8 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
reply_unixerror(req, ERRDOS, ERRbadlink);
return;
#endif
- len = SMB_VFS_READLINK(conn,fullpathname, buffer, sizeof(pstring)-1); /* read link */
+ len = SMB_VFS_READLINK(conn,fullpathname,
+ buffer, 1023);
if (len == -1) {
reply_unixerror(req, ERRDOS,
ERRnoaccess);
@@ -4267,7 +4313,6 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
case POSIX_LOCK_TYPE_UNLOCK:
default:
/* There's no point in asking for an unlock... */
- talloc_destroy(data_ctx);
reply_nterror(
req,
NT_STATUS_INVALID_PARAMETER);
@@ -4338,17 +4383,23 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
code.
****************************************************************************/
-NTSTATUS hardlink_internals(connection_struct *conn, pstring oldname, pstring newname)
+NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
+ connection_struct *conn,
+ const char *oldname_in,
+ const char *newname_in)
{
SMB_STRUCT_STAT sbuf1, sbuf2;
- pstring last_component_oldname;
- pstring last_component_newname;
+ char *last_component_oldname = NULL;
+ char *last_component_newname = NULL;
+ char *oldname = NULL;
+ char *newname = NULL;
NTSTATUS status = NT_STATUS_OK;
ZERO_STRUCT(sbuf1);
ZERO_STRUCT(sbuf2);
- status = unix_convert(conn, oldname, False, last_component_oldname, &sbuf1);
+ status = unix_convert(ctx, conn, oldname_in, False, &oldname,
+ &last_component_oldname, &sbuf1);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -4363,7 +4414,8 @@ NTSTATUS hardlink_internals(connection_struct *conn, pstring oldname, pstring ne
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
- status = unix_convert(conn, newname, False, last_component_newname, &sbuf2);
+ status = unix_convert(ctx, conn, newname_in, False, &newname,
+ &last_component_newname, &sbuf2);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -4731,9 +4783,10 @@ static NTSTATUS smb_set_file_unix_link(connection_struct *conn,
int total_data,
const char *fname)
{
- pstring link_target;
+ char *link_target = NULL;
const char *newname = fname;
NTSTATUS status = NT_STATUS_OK;
+ TALLOC_CTX *ctx = talloc_tos();
/* Set a symbolic link. */
/* Don't allow this if follow links is false. */
@@ -4746,27 +4799,42 @@ static NTSTATUS smb_set_file_unix_link(connection_struct *conn,
return NT_STATUS_ACCESS_DENIED;
}
- srvstr_pull(pdata, req->flags2, link_target, pdata,
- sizeof(link_target), total_data, STR_TERMINATE);
+ srvstr_pull_talloc(ctx, pdata, req->flags2, &link_target, pdata,
+ total_data, STR_TERMINATE);
+
+ if (!link_target) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
/* !widelinks forces the target path to be within the share. */
/* This means we can interpret the target as a pathname. */
if (!lp_widelinks(SNUM(conn))) {
- pstring rel_name;
+ char *rel_name = NULL;
char *last_dirp = NULL;
if (*link_target == '/') {
/* No absolute paths allowed. */
return NT_STATUS_ACCESS_DENIED;
}
- pstrcpy(rel_name, newname);
+ rel_name = talloc_strdup(ctx,newname);
+ if (!rel_name) {
+ return NT_STATUS_NO_MEMORY;
+ }
last_dirp = strrchr_m(rel_name, '/');
if (last_dirp) {
last_dirp[1] = '\0';
} else {
- pstrcpy(rel_name, "./");
+ rel_name = talloc_strdup(ctx,"./");
+ if (!rel_name) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ }
+ rel_name = talloc_asprintf_append(rel_name,
+ "%s",
+ link_target);
+ if (!rel_name) {
+ return NT_STATUS_NO_MEMORY;
}
- pstrcat(rel_name, link_target);
status = check_name(conn, rel_name);
if (!NT_STATUS_IS_OK(status)) {
@@ -4791,9 +4859,10 @@ static NTSTATUS smb_set_file_unix_link(connection_struct *conn,
static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
struct smb_request *req,
const char *pdata, int total_data,
- pstring fname)
+ const char *fname)
{
- pstring oldname;
+ char *oldname = NULL;
+ TALLOC_CTX *ctx = talloc_tos();
NTSTATUS status = NT_STATUS_OK;
/* Set a hard link. */
@@ -4801,14 +4870,16 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
return NT_STATUS_INVALID_PARAMETER;
}
- srvstr_get_path(pdata, req->flags2, oldname, pdata,
- sizeof(oldname), total_data, STR_TERMINATE, &status);
+ srvstr_get_path(ctx, pdata, req->flags2, &oldname, pdata,
+ total_data, STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- status = resolve_dfspath(conn, req->flags2 & FLAGS2_DFS_PATHNAMES,
- oldname);
+ status = resolve_dfspath(ctx, conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ oldname,
+ &oldname);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -4816,7 +4887,7 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
DEBUG(10,("smb_set_file_unix_hlink: SMB_SET_FILE_UNIX_LINK doing hard link %s -> %s\n",
fname, oldname));
- return hardlink_internals(conn, oldname, fname);
+ return hardlink_internals(ctx, conn, oldname, fname);
}
/****************************************************************************
@@ -4825,17 +4896,20 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
static NTSTATUS smb_file_rename_information(connection_struct *conn,
struct smb_request *req,
- const char *pdata, int total_data,
- files_struct *fsp, pstring fname)
+ const char *pdata,
+ int total_data,
+ files_struct *fsp,
+ const char *fname)
{
BOOL overwrite;
uint32 root_fid;
uint32 len;
- pstring newname;
- pstring base_name;
+ char *newname = NULL;
+ char *base_name = NULL;
BOOL dest_has_wcard = False;
NTSTATUS status = NT_STATUS_OK;
char *p;
+ TALLOC_CTX *ctx = talloc_tos();
if (total_data < 13) {
return NT_STATUS_INVALID_PARAMETER;
@@ -4849,16 +4923,21 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
return NT_STATUS_INVALID_PARAMETER;
}
- srvstr_get_path_wcard(pdata, req->flags2, newname, &pdata[12],
- sizeof(newname), len, 0, &status,
+ srvstr_get_path_wcard(ctx, pdata, req->flags2, &newname, &pdata[12],
+ len, 0, &status,
&dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- status = resolve_dfspath_wcard(conn,
+ DEBUG(10,("smb_file_rename_information: got name |%s|\n",
+ newname));
+
+ status = resolve_dfspath_wcard(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- newname, &dest_has_wcard);
+ newname,
+ &newname,
+ &dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -4869,24 +4948,37 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
}
/* Create the base directory. */
- pstrcpy(base_name, fname);
+ base_name = talloc_strdup(ctx, fname);
+ if (!base_name) {
+ return NT_STATUS_NO_MEMORY;
+ }
p = strrchr_m(base_name, '/');
if (p) {
p[1] = '\0';
} else {
- pstrcpy(base_name, "./");
+ base_name = talloc_strdup(ctx, "./");
+ if (!base_name) {
+ return NT_STATUS_NO_MEMORY;
+ }
}
/* Append the new name. */
- pstrcat(base_name, newname);
+ base_name = talloc_asprintf_append(base_name,
+ "%s",
+ newname);
+ if (!base_name) {
+ return NT_STATUS_NO_MEMORY;
+ }
if (fsp) {
SMB_STRUCT_STAT sbuf;
- pstring newname_last_component;
+ char *newname_last_component = NULL;
ZERO_STRUCT(sbuf);
- status = unix_convert(conn, newname, False,
- newname_last_component, &sbuf);
+ status = unix_convert(ctx, conn, newname, False,
+ &newname,
+ &newname_last_component,
+ &sbuf);
/* If an error we expect this to be
* NT_STATUS_OBJECT_PATH_NOT_FOUND */
@@ -4904,8 +4996,8 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
overwrite);
} else {
DEBUG(10,("smb_file_rename_information: SMB_FILE_RENAME_INFORMATION %s -> %s\n",
- fname, newname ));
- status = rename_internals(conn, req, fname, base_name, 0,
+ fname, base_name ));
+ status = rename_internals(ctx, conn, req, fname, base_name, 0,
overwrite, False, dest_has_wcard);
}
@@ -6064,10 +6156,11 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
char *pdata = *ppdata;
uint16 info_level;
SMB_STRUCT_STAT sbuf;
- pstring fname;
+ char *fname = NULL;
files_struct *fsp = NULL;
NTSTATUS status = NT_STATUS_OK;
int data_return_size = 0;
+ TALLOC_CTX *ctx = talloc_tos();
if (!params) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
@@ -6083,15 +6176,24 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
}
fsp = file_fsp(SVAL(params,0));
- info_level = SVAL(params,2);
+ /* Basic check for non-null fsp. */
+ if (!check_fsp_open(conn, req, fsp, &current_user)) {
+ return;
+ }
+ info_level = SVAL(params,2);
+
+ fname = talloc_strdup(talloc_tos(),fsp->fsp_name);
+ if (!fname) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
- if(fsp && (fsp->is_directory || fsp->fh->fd == -1)) {
+ if(fsp->is_directory || fsp->fh->fd == -1) {
/*
* This is actually a SETFILEINFO on a directory
* handle (returned from an NT SMB). NT5.0 seems
* to do this call. JRA.
*/
- pstrcpy(fname, fsp->fsp_name);
if (INFO_LEVEL_IS_UNIX(info_level)) {
/* Always do lstat for UNIX calls. */
if (SMB_VFS_LSTAT(conn,fname,&sbuf)) {
@@ -6106,7 +6208,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
return;
}
}
- } else if (fsp && fsp->print_file) {
+ } else if (fsp->print_file) {
/*
* Doing a DELETE_ON_CLOSE should cancel a print job.
*/
@@ -6114,18 +6216,17 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
fsp->fh->private_options |= FILE_DELETE_ON_CLOSE;
DEBUG(3,("call_trans2setfilepathinfo: Cancelling print job (%s)\n", fsp->fsp_name ));
-
+
SSVAL(params,0,0);
send_trans2_replies(req, params, 2,
*ppdata, 0,
max_data_bytes);
return;
- }
- else {
+ } else {
reply_unixerror(req, ERRDOS, ERRbadpath);
return;
}
- } else {
+ } else {
/*
* Original code - this is an open file.
*/
@@ -6133,8 +6234,6 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
return;
}
- pstrcpy(fname, fsp->fsp_name);
-
if (SMB_VFS_FSTAT(fsp, fsp->fh->fd, &sbuf) != 0) {
DEBUG(3,("call_trans2setfilepathinfo: fstat of fnum %d failed (%s)\n",fsp->fnum, strerror(errno)));
reply_unixerror(req, ERRDOS, ERRbadfid);
@@ -6148,18 +6247,19 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
return;
}
- info_level = SVAL(params,0);
- srvstr_get_path(params, req->flags2, fname, &params[6],
- sizeof(fname), total_params - 6, STR_TERMINATE,
+ info_level = SVAL(params,0);
+ srvstr_get_path(ctx, params, req->flags2, &fname, &params[6],
+ total_params - 6, STR_TERMINATE,
&status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
}
- status = resolve_dfspath(conn,
+ status = resolve_dfspath(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname);
+ fname,
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
reply_botherror(req,
@@ -6171,7 +6271,8 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
return;
}
- status = unix_convert(conn, fname, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False,
+ &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
@@ -6493,10 +6594,11 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
{
char *params = *pparams;
char *pdata = *ppdata;
- pstring directory;
+ char *directory = NULL;
SMB_STRUCT_STAT sbuf;
NTSTATUS status = NT_STATUS_OK;
struct ea_list *ea_list = NULL;
+ TALLOC_CTX *ctx = talloc_tos();
if (!CAN_WRITE(conn)) {
reply_doserror(req, ERRSRV, ERRaccess);
@@ -6508,8 +6610,8 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
return;
}
- srvstr_get_path(params, req->flags2, directory, &params[4],
- sizeof(directory), total_params - 4, STR_TERMINATE,
+ srvstr_get_path(ctx, params, req->flags2, &directory, &params[4],
+ total_params - 4, STR_TERMINATE,
&status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -6518,7 +6620,7 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
DEBUG(3,("call_trans2mkdir : name = %s\n", directory));
- status = unix_convert(conn, directory, False, NULL, &sbuf);
+ status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
@@ -6694,10 +6796,11 @@ static void call_trans2getdfsreferral(connection_struct *conn,
unsigned int max_data_bytes)
{
char *params = *pparams;
- pstring pathname;
+ char *pathname = NULL;
int reply_size = 0;
int max_referral_level;
NTSTATUS status = NT_STATUS_OK;
+ TALLOC_CTX *ctx = talloc_tos();
DEBUG(10,("call_trans2getdfsreferral\n"));
@@ -6713,14 +6816,18 @@ static void call_trans2getdfsreferral(connection_struct *conn,
return;
}
- srvstr_pull(params, req->flags2, pathname, &params[2],
- sizeof(pathname), total_params - 2, STR_TERMINATE);
+ srvstr_pull_talloc(ctx, params, req->flags2, &pathname, &params[2],
+ total_params - 2, STR_TERMINATE);
+ if (!pathname) {
+ reply_nterror(req, NT_STATUS_NOT_FOUND);
+ return;
+ }
if((reply_size = setup_dfs_referral(conn, pathname, max_referral_level,
ppdata,&status)) < 0) {
reply_nterror(req, status);
return;
}
-
+
SSVAL(req->inbuf, smb_flg2,
SVAL(req->inbuf,smb_flg2) | FLAGS2_DFS_PATHNAMES);
send_trans2_replies(req,0,0,*ppdata,reply_size, max_data_bytes);
@@ -6745,7 +6852,7 @@ static void call_trans2ioctl(connection_struct *conn,
files_struct *fsp = file_fsp(SVAL(req->inbuf,smb_vwv15));
/* check for an invalid fid before proceeding */
-
+
if (!fsp) {
reply_doserror(req, ERRDOS, ERRbadfid);
return;
diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c
index f9a5ba5ed6c..d9c772d6b14 100644
--- a/source/smbd/vfs.c
+++ b/source/smbd/vfs.c
@@ -653,7 +653,11 @@ char *vfs_readdirname(connection_struct *conn, void *p)
int vfs_ChDir(connection_struct *conn, const char *path)
{
int res;
- static pstring LastDir="";
+ static char *LastDir = NULL;
+
+ if (!LastDir) {
+ LastDir = SMB_STRDUP("");
+ }
if (strcsequal(path,"."))
return(0);
@@ -664,8 +668,10 @@ int vfs_ChDir(connection_struct *conn, const char *path)
DEBUG(4,("vfs_ChDir to %s\n",path));
res = SMB_VFS_CHDIR(conn,path);
- if (!res)
- pstrcpy(LastDir,path);
+ if (!res) {
+ SAFE_FREE(LastDir);
+ LastDir = SMB_STRDUP(path);
+ }
return(res);
}
@@ -675,7 +681,7 @@ int vfs_ChDir(connection_struct *conn, const char *path)
static struct {
SMB_DEV_T dev; /* These *must* be compatible with the types returned in a stat() call. */
SMB_INO_T inode; /* These *must* be compatible with the types returned in a stat() call. */
- char *dos_path; /* The pathname in DOS format. */
+ char *path; /* The pathname. */
BOOL valid;
} ino_list[MAX_GETWDCACHE];
@@ -710,23 +716,36 @@ static void array_promote(char *array,int elsize,int element)
format. Note this can be called with conn == NULL.
********************************************************************/
-char *vfs_GetWd(connection_struct *conn, char *path)
+char *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn)
{
+#ifdef PATH_MAX
+ char s[PATH_MAX+1];
+#else
pstring s;
+#endif
static BOOL getwd_cache_init = False;
SMB_STRUCT_STAT st, st2;
int i;
+ char *ret = NULL;
*s = 0;
- if (!use_getwd_cache)
- return(SMB_VFS_GETWD(conn,path));
+ if (!use_getwd_cache) {
+ nocache:
+ ret = SMB_VFS_GETWD(conn,s);
+ if (!ret) {
+ DEBUG(0,("vfs_GetWd: SMB_VFS_GETWD call failed, "
+ "errno %s\n",strerror(errno)));
+ return NULL;
+ }
+ return talloc_strdup(ctx, ret);
+ }
/* init the cache */
if (!getwd_cache_init) {
getwd_cache_init = True;
for (i=0;i<MAX_GETWDCACHE;i++) {
- string_set(&ino_list[i].dos_path,"");
+ string_set(&ino_list[i].path,"");
ino_list[i].valid = False;
}
}
@@ -737,8 +756,10 @@ char *vfs_GetWd(connection_struct *conn, char *path)
if (SMB_VFS_STAT(conn, ".",&st) == -1) {
/* Known to fail for root: the directory may be
* NFS-mounted and exported with root_squash (so has no root access). */
- DEBUG(1,("vfs_GetWd: couldn't stat \".\" path=%s error %s (NFS problem ?)\n", path, strerror(errno) ));
- return(SMB_VFS_GETWD(conn,path));
+ DEBUG(1,("vfs_GetWd: couldn't stat \".\" error %s "
+ "(NFS problem ?)\n",
+ strerror(errno) ));
+ goto nocache;
}
@@ -752,14 +773,19 @@ char *vfs_GetWd(connection_struct *conn, char *path)
the same...) */
if (st.st_ino == ino_list[i].inode && st.st_dev == ino_list[i].dev) {
- if (SMB_VFS_STAT(conn,ino_list[i].dos_path,&st2) == 0) {
+ if (SMB_VFS_STAT(conn,ino_list[i].path,&st2) == 0) {
if (st.st_ino == st2.st_ino && st.st_dev == st2.st_dev &&
(st2.st_mode & S_IFMT) == S_IFDIR) {
- pstrcpy (path, ino_list[i].dos_path);
+
+ ret = talloc_strdup(ctx,
+ ino_list[i].path);
/* promote it for future use */
array_promote((char *)&ino_list[0],sizeof(ino_list[0]),i);
- return (path);
+ if (ret == NULL) {
+ errno = ENOMEM;
+ }
+ return ret;
} else {
/* If the inode is different then something's changed,
scrub the entry and start from scratch. */
@@ -770,22 +796,24 @@ char *vfs_GetWd(connection_struct *conn, char *path)
}
}
- /* We don't have the information to hand so rely on traditional methods.
- The very slow getcwd, which spawns a process on some systems, or the
- not quite so bad getwd. */
+ /* We don't have the information to hand so rely on traditional
+ * methods. The very slow getcwd, which spawns a process on some
+ * systems, or the not quite so bad getwd. */
if (!SMB_VFS_GETWD(conn,s)) {
- DEBUG(0,("vfs_GetWd: SMB_VFS_GETWD call failed, errno %s\n",strerror(errno)));
+ DEBUG(0,("vfs_GetWd: SMB_VFS_GETWD call failed, errno %s\n",
+ strerror(errno)));
return (NULL);
}
- pstrcpy(path,s);
+ ret = talloc_strdup(ctx,s);
- DEBUG(5,("vfs_GetWd %s, inode %.0f, dev %.0f\n",s,(double)st.st_ino,(double)st.st_dev));
+ DEBUG(5,("vfs_GetWd %s, inode %.0f, dev %.0f\n",
+ s,(double)st.st_ino,(double)st.st_dev));
/* add it to the cache */
i = MAX_GETWDCACHE - 1;
- string_set(&ino_list[i].dos_path,s);
+ string_set(&ino_list[i].path,s);
ino_list[i].dev = st.st_dev;
ino_list[i].inode = st.st_ino;
ino_list[i].valid = True;
@@ -793,7 +821,10 @@ char *vfs_GetWd(connection_struct *conn, char *path)
/* put it at the top of the list */
array_promote((char *)&ino_list[0],sizeof(ino_list[0]),i);
- return (path);
+ if (ret == NULL) {
+ errno = ENOMEM;
+ }
+ return ret;
}
/*******************************************************************
@@ -832,18 +863,28 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
return map_nt_error_from_unix(errno);
case ENOENT:
{
- pstring tmp_fname;
- fstring last_component;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
+ char *tmp_fname = NULL;
+ char *last_component = NULL;
/* Last component didn't exist. Remove it and try and canonicalise the directory. */
- pstrcpy(tmp_fname, fname);
+ tmp_fname = talloc_strdup(tmp_ctx, fname);
+ if (!tmp_fname) {
+ TALLOC_FREE(tmp_ctx);
+ return NT_STATUS_NO_MEMORY;
+ }
p = strrchr_m(tmp_fname, '/');
if (p) {
*p++ = '\0';
- fstrcpy(last_component, p);
+ last_component = p;
} else {
- fstrcpy(last_component, tmp_fname);
- pstrcpy(tmp_fname, ".");
+ last_component = tmp_fname;
+ tmp_fname = talloc_strdup(tmp_ctx,
+ ".");
+ if (!tmp_fname) {
+ TALLOC_FREE(tmp_ctx);
+ return NT_STATUS_NO_MEMORY;
+ }
}
#ifdef REALPATH_TAKES_NULL
@@ -853,11 +894,17 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
#endif
if (!resolved_name) {
DEBUG(3,("reduce_name: couldn't get realpath for %s\n", fname));
+ TALLOC_FREE(tmp_ctx);
return map_nt_error_from_unix(errno);
}
- pstrcpy(tmp_fname, resolved_name);
- pstrcat(tmp_fname, "/");
- pstrcat(tmp_fname, last_component);
+ tmp_fname = talloc_asprintf(tmp_ctx,
+ "%s/%s",
+ resolved_name,
+ last_component);
+ if (!tmp_fname) {
+ TALLOC_FREE(tmp_ctx);
+ return NT_STATUS_NO_MEMORY;
+ }
#ifdef REALPATH_TAKES_NULL
SAFE_FREE(resolved_name);
resolved_name = SMB_STRDUP(tmp_fname);
@@ -873,6 +920,7 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
#endif
resolved_name = resolved_name_buf;
#endif
+ TALLOC_FREE(tmp_ctx);
break;
}
default:
@@ -903,7 +951,7 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
/* Check if we are allowing users to follow symlinks */
/* Patch from David Clerc <David.Clerc@cui.unige.ch>
University of Geneva */
-
+
#ifdef S_ISLNK
if (!lp_symlinks(SNUM(conn))) {
SMB_STRUCT_STAT statbuf;
diff --git a/source/utils/net.c b/source/utils/net.c
index 962da0b39e2..9c327f162dd 100644
--- a/source/utils/net.c
+++ b/source/utils/net.c
@@ -465,13 +465,14 @@ BOOL net_find_pdc(struct in_addr *server_ip, fstring server_name, const char *do
return False;
}
-struct cli_state *net_make_ipc_connection( unsigned flags )
+NTSTATUS net_make_ipc_connection(unsigned flags, struct cli_state **pcli)
{
- return net_make_ipc_connection_ex( NULL, NULL, NULL, flags );
+ return net_make_ipc_connection_ex(NULL, NULL, NULL, flags, pcli);
}
-struct cli_state *net_make_ipc_connection_ex( const char *domain, const char *server,
- struct in_addr *ip, unsigned flags)
+NTSTATUS net_make_ipc_connection_ex(const char *domain, const char *server,
+ struct in_addr *ip, unsigned flags,
+ struct cli_state **pcli)
{
char *server_name = NULL;
struct in_addr server_ip;
@@ -481,7 +482,8 @@ struct cli_state *net_make_ipc_connection_ex( const char *domain, const char *se
if ( !server || !ip ) {
if (!net_find_server(domain, flags, &server_ip, &server_name)) {
d_fprintf(stderr, "Unable to find a suitable server\n");
- return NULL;
+ nt_status = NT_STATUS_UNSUCCESSFUL;
+ goto done;
}
} else {
server_name = SMB_STRDUP( server );
@@ -500,13 +502,17 @@ struct cli_state *net_make_ipc_connection_ex( const char *domain, const char *se
saf_store( cli->server_domain, cli->desthost );
SAFE_FREE(server_name);
- if (NT_STATUS_IS_OK(nt_status)) {
- return cli;
- } else {
+ if (!NT_STATUS_IS_OK(nt_status)) {
d_fprintf(stderr, "Connection failed: %s\n",
nt_errstr(nt_status));
- return NULL;
+ cli = NULL;
}
+
+done:
+ if (pcli != NULL) {
+ *pcli = cli;
+ }
+ return nt_status;
}
static int net_user(int argc, const char **argv)
diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c
index 5646a0c8a82..08623d6834a 100644
--- a/source/utils/net_ads.c
+++ b/source/utils/net_ads.c
@@ -1,5 +1,5 @@
-/*
- Samba Unix/Linux SMB client library
+/*
+ Samba Unix/Linux SMB client library
net ads commands
Copyright (C) 2001 Andrew Tridgell (tridge@samba.org)
Copyright (C) 2001 Remus Koos (remuskoos@yahoo.com)
@@ -10,14 +10,14 @@
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/>.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
@@ -57,7 +57,7 @@ int net_ads_usage(int argc, const char **argv)
d_printf("dns\n");
d_printf(" Issue a dynamic DNS update request the server's hostname\n");
d_printf(" (using the machine credentials)\n");
-
+
return -1;
}
@@ -85,7 +85,7 @@ static int net_ads_cldap_netlogon(ADS_STRUCT *ads)
return -1;
}
- d_printf("Information for Domain Controller: %s\n\n",
+ d_printf("Information for Domain Controller: %s\n\n",
inet_ntoa(ads->ldap.ip));
d_printf("Response Type: ");
@@ -100,8 +100,8 @@ static int net_ads_cldap_netlogon(ADS_STRUCT *ads)
d_printf("0x%x\n", reply.type);
break;
}
- d_printf("GUID: %s\n",
- smb_uuid_string_static(smb_uuid_unpack_static(reply.guid)));
+ d_printf("GUID: %s\n",
+ smb_uuid_string_static(smb_uuid_unpack_static(reply.guid)));
d_printf("Flags:\n"
"\tIs a PDC: %s\n"
"\tIs a GC of the forest: %s\n"
@@ -218,7 +218,7 @@ static ADS_STATUS ads_startup_int(BOOL only_own_domain, uint32 auth_flags, ADS_S
const char *realm = NULL;
BOOL tried_closest_dc = False;
- /* lp_realm() should be handled by a command line param,
+ /* lp_realm() should be handled by a command line param,
However, the join requires that realm be set in smb.conf
and compares our realm with the remote server's so this is
ok until someone needs more flexibility */
@@ -262,7 +262,7 @@ retry:
ads->auth.user_name = smb_xstrdup(opt_user_name);
/*
- * If the username is of the form "name@realm",
+ * If the username is of the form "name@realm",
* extract the realm and convert to upper case.
* This is only used to establish the connection.
*/
@@ -277,13 +277,13 @@ retry:
if (!ADS_ERR_OK(status)) {
- if (NT_STATUS_EQUAL(ads_ntstatus(status),
+ if (NT_STATUS_EQUAL(ads_ntstatus(status),
NT_STATUS_NO_LOGON_SERVERS)) {
DEBUG(0,("ads_connect: %s\n", ads_errstr(status)));
ads_destroy(&ads);
return status;
}
-
+
if (!need_password && !second_time && !(auth_flags & ADS_AUTH_NO_BIND)) {
need_password = True;
second_time = True;
@@ -362,7 +362,8 @@ int net_ads_check(void)
{
return net_ads_check_int(NULL, opt_workgroup, opt_host);
}
-/*
+
+/*
determine the netbios workgroup name for a domain
*/
static int net_ads_workgroup(int argc, const char **argv)
@@ -374,12 +375,12 @@ static int net_ads_workgroup(int argc, const char **argv)
d_fprintf(stderr, "Didn't find the cldap server!\n");
return -1;
}
-
+
if (!ads->config.realm) {
ads->config.realm = CONST_DISCARD(char *, opt_target_workgroup);
ads->ldap.port = 389;
}
-
+
if ( !ads_cldap_netlogon( inet_ntoa(ads->ldap.ip), ads->server.realm, &reply ) ) {
d_fprintf(stderr, "CLDAP query failed!\n");
return -1;
@@ -388,7 +389,7 @@ static int net_ads_workgroup(int argc, const char **argv)
d_printf("Workgroup: %s\n", reply.netbios_domain);
ads_destroy(&ads);
-
+
return 0;
}
@@ -402,7 +403,7 @@ static BOOL usergrp_display(ADS_STRUCT *ads, char *field, void **values, void *d
if (disp_fields[0]) {
if (!strchr_m(disp_fields[0], '$')) {
if (disp_fields[1])
- d_printf("%-21.21s %s\n",
+ d_printf("%-21.21s %s\n",
disp_fields[0], disp_fields[1]);
else
d_printf("%s\n", disp_fields[0]);
@@ -425,7 +426,7 @@ static BOOL usergrp_display(ADS_STRUCT *ads, char *field, void **values, void *d
static int net_ads_user_usage(int argc, const char **argv)
{
return net_help_user(argc, argv);
-}
+}
static int ads_user_add(int argc, const char **argv)
{
@@ -437,7 +438,7 @@ static int ads_user_add(int argc, const char **argv)
char *ou_str = NULL;
if (argc < 1) return net_ads_user_usage(argc, argv);
-
+
if (!ADS_ERR_OK(ads_startup(False, &ads))) {
return -1;
}
@@ -448,7 +449,7 @@ static int ads_user_add(int argc, const char **argv)
d_fprintf(stderr, "ads_user_add: %s\n", ads_errstr(status));
goto done;
}
-
+
if (ads_count_replies(ads, res)) {
d_fprintf(stderr, "ads_user_add: User %s already exists\n", argv[0]);
goto done;
@@ -469,7 +470,7 @@ static int ads_user_add(int argc, const char **argv)
}
/* if no password is to be set, we're done */
- if (argc == 1) {
+ if (argc == 1) {
d_printf("User %s added\n", argv[0]);
rc = 0;
goto done;
@@ -477,7 +478,7 @@ static int ads_user_add(int argc, const char **argv)
/* try setting the password */
asprintf(&upn, "%s@%s", argv[0], ads->config.realm);
- status = ads_krb5_set_password(ads->auth.kdc_server, upn, argv[1],
+ status = ads_krb5_set_password(ads->auth.kdc_server, upn, argv[1],
ads->auth.time_offset);
safe_free(upn);
if (ADS_ERR_OK(status)) {
@@ -541,7 +542,7 @@ static int ads_user_info(int argc, const char **argv)
SAFE_FREE(escaped_user);
return -1;
}
-
+
grouplist = ldap_get_values((LDAP *)ads->ldap.ld,
(LDAPMessage *)res, "memberOf");
@@ -555,7 +556,7 @@ static int ads_user_info(int argc, const char **argv)
}
ldap_value_free(grouplist);
}
-
+
ads_msgfree(ads, res);
ads_destroy(&ads);
SAFE_FREE(escaped_user);
@@ -572,7 +573,7 @@ static int ads_user_delete(int argc, const char **argv)
if (argc < 1) {
return net_ads_user_usage(argc, argv);
}
-
+
if (!ADS_ERR_OK(ads_startup(False, &ads))) {
return -1;
}
@@ -593,7 +594,7 @@ static int ads_user_delete(int argc, const char **argv)
ads_destroy(&ads);
return 0;
}
- d_fprintf(stderr, "Error deleting user %s: %s\n", argv[0],
+ d_fprintf(stderr, "Error deleting user %s: %s\n", argv[0],
ads_errstr(rc));
ads_destroy(&ads);
return -1;
@@ -612,7 +613,7 @@ int net_ads_user(int argc, const char **argv)
const char *shortattrs[] = {"sAMAccountName", NULL};
const char *longattrs[] = {"sAMAccountName", "description", NULL};
char *disp_fields[2] = {NULL, NULL};
-
+
if (argc == 0) {
if (!ADS_ERR_OK(ads_startup(False, &ads))) {
return -1;
@@ -622,11 +623,11 @@ int net_ads_user(int argc, const char **argv)
d_printf("\nUser name Comment"\
"\n-----------------------------\n");
- rc = ads_do_search_all_fn(ads, ads->config.bind_path,
+ rc = ads_do_search_all_fn(ads, ads->config.bind_path,
LDAP_SCOPE_SUBTREE,
- "(objectCategory=user)",
+ "(objectCategory=user)",
opt_long_list_entries ? longattrs :
- shortattrs, usergrp_display,
+ shortattrs, usergrp_display,
disp_fields);
ads_destroy(&ads);
return ADS_ERR_OK(rc) ? 0 : -1;
@@ -638,7 +639,7 @@ int net_ads_user(int argc, const char **argv)
static int net_ads_group_usage(int argc, const char **argv)
{
return net_help_group(argc, argv);
-}
+}
static int ads_group_add(int argc, const char **argv)
{
@@ -651,7 +652,7 @@ static int ads_group_add(int argc, const char **argv)
if (argc < 1) {
return net_ads_group_usage(argc, argv);
}
-
+
if (!ADS_ERR_OK(ads_startup(False, &ads))) {
return -1;
}
@@ -662,7 +663,7 @@ static int ads_group_add(int argc, const char **argv)
d_fprintf(stderr, "ads_group_add: %s\n", ads_errstr(status));
goto done;
}
-
+
if (ads_count_replies(ads, res)) {
d_fprintf(stderr, "ads_group_add: Group %s already exists\n", argv[0]);
goto done;
@@ -702,7 +703,7 @@ static int ads_group_delete(int argc, const char **argv)
if (argc < 1) {
return net_ads_group_usage(argc, argv);
}
-
+
if (!ADS_ERR_OK(ads_startup(False, &ads))) {
return -1;
}
@@ -723,7 +724,7 @@ static int ads_group_delete(int argc, const char **argv)
ads_destroy(&ads);
return 0;
}
- d_fprintf(stderr, "Error deleting group %s: %s\n", argv[0],
+ d_fprintf(stderr, "Error deleting group %s: %s\n", argv[0],
ads_errstr(rc));
ads_destroy(&ads);
return -1;
@@ -750,11 +751,11 @@ int net_ads_group(int argc, const char **argv)
if (opt_long_list_entries)
d_printf("\nGroup name Comment"\
"\n-----------------------------\n");
- rc = ads_do_search_all_fn(ads, ads->config.bind_path,
- LDAP_SCOPE_SUBTREE,
- "(objectCategory=group)",
- opt_long_list_entries ? longattrs :
- shortattrs, usergrp_display,
+ rc = ads_do_search_all_fn(ads, ads->config.bind_path,
+ LDAP_SCOPE_SUBTREE,
+ "(objectCategory=group)",
+ opt_long_list_entries ? longattrs :
+ shortattrs, usergrp_display,
disp_fields);
ads_destroy(&ads);
@@ -807,7 +808,7 @@ static int net_ads_leave(int argc, const char **argv)
struct cli_state *cli = NULL;
TALLOC_CTX *ctx;
DOM_SID *dom_sid = NULL;
- char *short_domain_name = NULL;
+ char *short_domain_name = NULL;
if (!secrets_init()) {
DEBUG(1,("Failed to initialise secrets database\n"));
@@ -819,7 +820,7 @@ static int net_ads_leave(int argc, const char **argv)
return -1;
}
- /* The finds a DC and takes care of getting the
+ /* The finds a DC and takes care of getting the
user creds if necessary */
if (!ADS_ERR_OK(ads_startup(True, &ads))) {
@@ -828,12 +829,12 @@ static int net_ads_leave(int argc, const char **argv)
/* make RPC calls here */
- if ( !NT_STATUS_IS_OK(connect_to_ipc_krb5(&cli, &ads->ldap.ip,
+ if ( !NT_STATUS_IS_OK(connect_to_ipc_krb5(&cli, &ads->ldap.ip,
ads->config.ldap_server_name)) )
{
goto done;
}
-
+
if ( !NT_STATUS_IS_OK(netdom_get_domain_sid( ctx, cli, &short_domain_name, &dom_sid )) ) {
goto done;
}
@@ -863,7 +864,7 @@ static int net_ads_leave(int argc, const char **argv)
done:
- if ( cli )
+ if ( cli )
cli_shutdown(cli);
ads_destroy(&ads);
@@ -904,7 +905,7 @@ int net_ads_testjoin(int argc, const char **argv)
/* Display success or failure */
status = net_ads_join_ok();
if (!NT_STATUS_IS_OK(status)) {
- fprintf(stderr,"Join to domain is not valid: %s\n",
+ fprintf(stderr,"Join to domain is not valid: %s\n",
get_friendly_nt_error_msg(status));
return -1;
}
@@ -942,7 +943,7 @@ static NTSTATUS check_ads_config( void )
/* This is a good bet for failure of secrets_init ... */
return NT_STATUS_ACCESS_DENIED;
}
-
+
return NT_STATUS_OK;
}
@@ -950,9 +951,9 @@ static NTSTATUS check_ads_config( void )
Do the domain join
********************************************************************/
-static NTSTATUS net_join_domain(TALLOC_CTX *ctx, const char *servername,
- struct in_addr *ip, char **domain,
- DOM_SID **dom_sid,
+static NTSTATUS net_join_domain(TALLOC_CTX *ctx, const char *servername,
+ struct in_addr *ip, char **domain,
+ DOM_SID **dom_sid,
const char *password)
{
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
@@ -962,13 +963,13 @@ static NTSTATUS net_join_domain(TALLOC_CTX *ctx, const char *servername,
if ( !NT_STATUS_IS_OK(ret) ) {
goto done;
}
-
+
ret = netdom_get_domain_sid( ctx, cli, domain, dom_sid );
if ( !NT_STATUS_IS_OK(ret) ) {
goto done;
}
- /* cli->server_domain is not filled in when using krb5
+ /* cli->server_domain is not filled in when using krb5
session setups */
saf_store( *domain, cli->desthost );
@@ -976,7 +977,7 @@ static NTSTATUS net_join_domain(TALLOC_CTX *ctx, const char *servername,
ret = netdom_join_domain( ctx, cli, *dom_sid, password, ND_TYPE_AD );
done:
- if ( cli )
+ if ( cli )
cli_shutdown(cli);
return ret;
@@ -998,27 +999,27 @@ static ADS_STATUS net_set_machine_spn(TALLOC_CTX *ctx, ADS_STRUCT *ads_s )
char *dn_string = NULL;
const char *machine_name = global_myname();
int count;
-
+
if ( !machine_name ) {
return ADS_ERROR(LDAP_NO_MEMORY);
}
-
+
/* Find our DN */
-
+
status = ads_find_machine_acct(ads_s, &res, machine_name);
- if (!ADS_ERR_OK(status))
+ if (!ADS_ERR_OK(status))
return status;
-
+
if ( (count = ads_count_replies(ads_s, res)) != 1 ) {
DEBUG(1,("net_set_machine_spn: %d entries returned!\n", count));
- return ADS_ERROR(LDAP_NO_MEMORY);
+ return ADS_ERROR(LDAP_NO_MEMORY);
}
-
+
if ( (dn_string = ads_get_dn(ads_s, res)) == NULL ) {
DEBUG(1, ("ads_add_machine_acct: ads_get_dn returned NULL (malloc failure?)\n"));
goto done;
}
-
+
new_dn = talloc_strdup(ctx, dn_string);
ads_memfree(ads_s, dn_string);
if (!new_dn) {
@@ -1026,24 +1027,24 @@ static ADS_STATUS net_set_machine_spn(TALLOC_CTX *ctx, ADS_STRUCT *ads_s )
}
/* Windows only creates HOST/shortname & HOST/fqdn. */
-
- if ( !(psp = talloc_asprintf(ctx, "HOST/%s", machine_name)) )
+
+ if ( !(psp = talloc_asprintf(ctx, "HOST/%s", machine_name)) )
goto done;
strupper_m(psp);
servicePrincipalName[0] = psp;
name_to_fqdn(my_fqdn, machine_name);
strlower_m(my_fqdn);
- if ( !(psp = talloc_asprintf(ctx, "HOST/%s", my_fqdn)) )
+ if ( !(psp = talloc_asprintf(ctx, "HOST/%s", my_fqdn)) )
goto done;
servicePrincipalName[1] = psp;
-
+
if (!(mods = ads_init_mods(ctx))) {
goto done;
}
-
+
/* fields of primary importance */
-
+
ads_mod_str(ctx, &mods, "dNSHostName", my_fqdn);
ads_mod_strlist(ctx, &mods, "servicePrincipalName", servicePrincipalName);
@@ -1051,7 +1052,7 @@ static ADS_STATUS net_set_machine_spn(TALLOC_CTX *ctx, ADS_STRUCT *ads_s )
done:
ads_msgfree(ads_s, res);
-
+
return status;
}
@@ -1068,48 +1069,48 @@ static ADS_STATUS net_set_machine_upn(TALLOC_CTX *ctx, ADS_STRUCT *ads_s, const
char *dn_string = NULL;
const char *machine_name = global_myname();
int count;
-
+
if ( !machine_name ) {
return ADS_ERROR(LDAP_NO_MEMORY);
}
-
+
/* Find our DN */
-
+
status = ads_find_machine_acct(ads_s, &res, machine_name);
- if (!ADS_ERR_OK(status))
+ if (!ADS_ERR_OK(status))
return status;
-
+
if ( (count = ads_count_replies(ads_s, res)) != 1 ) {
DEBUG(1,("net_set_machine_spn: %d entries returned!\n", count));
- return ADS_ERROR(LDAP_NO_MEMORY);
+ return ADS_ERROR(LDAP_NO_MEMORY);
}
-
+
if ( (dn_string = ads_get_dn(ads_s, res)) == NULL ) {
DEBUG(1, ("ads_add_machine_acct: ads_get_dn returned NULL (malloc failure?)\n"));
goto done;
}
-
+
new_dn = talloc_strdup(ctx, dn_string);
ads_memfree(ads_s, dn_string);
if (!new_dn) {
return ADS_ERROR(LDAP_NO_MEMORY);
}
-
+
/* now do the mods */
-
+
if (!(mods = ads_init_mods(ctx))) {
goto done;
}
-
+
/* fields of primary importance */
-
+
ads_mod_str(ctx, &mods, "userPrincipalName", upn);
status = ads_gen_mod(ads_s, new_dn, mods);
done:
ads_msgfree(ads_s, res);
-
+
return status;
}
@@ -1117,7 +1118,7 @@ done:
Set a machines dNSHostName and servicePrincipalName attributes
********************************************************************/
-static ADS_STATUS net_set_os_attributes(TALLOC_CTX *ctx, ADS_STRUCT *ads_s,
+static ADS_STATUS net_set_os_attributes(TALLOC_CTX *ctx, ADS_STRUCT *ads_s,
const char *os_name, const char *os_version )
{
ADS_STATUS status = ADS_ERROR(LDAP_SERVER_DOWN);
@@ -1128,43 +1129,43 @@ static ADS_STATUS net_set_os_attributes(TALLOC_CTX *ctx, ADS_STRUCT *ads_s,
const char *machine_name = global_myname();
int count;
char *os_sp = NULL;
-
+
if ( !os_name || !os_version ) {
return ADS_ERROR(LDAP_NO_MEMORY);
}
-
+
/* Find our DN */
-
+
status = ads_find_machine_acct(ads_s, &res, machine_name);
- if (!ADS_ERR_OK(status))
+ if (!ADS_ERR_OK(status))
return status;
-
+
if ( (count = ads_count_replies(ads_s, res)) != 1 ) {
DEBUG(1,("net_set_machine_spn: %d entries returned!\n", count));
- return ADS_ERROR(LDAP_NO_MEMORY);
+ return ADS_ERROR(LDAP_NO_MEMORY);
}
-
+
if ( (dn_string = ads_get_dn(ads_s, res)) == NULL ) {
DEBUG(1, ("ads_add_machine_acct: ads_get_dn returned NULL (malloc failure?)\n"));
goto done;
}
-
+
new_dn = talloc_strdup(ctx, dn_string);
ads_memfree(ads_s, dn_string);
if (!new_dn) {
return ADS_ERROR(LDAP_NO_MEMORY);
}
-
+
/* now do the mods */
-
+
if (!(mods = ads_init_mods(ctx))) {
goto done;
}
os_sp = talloc_asprintf( ctx, "Samba %s", SAMBA_VERSION_STRING );
-
+
/* fields of primary importance */
-
+
ads_mod_str(ctx, &mods, "operatingSystem", os_name);
ads_mod_str(ctx, &mods, "operatingSystemVersion", os_version);
if ( os_sp )
@@ -1174,8 +1175,8 @@ static ADS_STATUS net_set_os_attributes(TALLOC_CTX *ctx, ADS_STRUCT *ads_s,
done:
ads_msgfree(ads_s, res);
- TALLOC_FREE( os_sp );
-
+ TALLOC_FREE( os_sp );
+
return status;
}
@@ -1263,28 +1264,28 @@ static BOOL net_derive_salting_principal( TALLOC_CTX *ctx, ADS_STRUCT *ads )
fstrcpy( salt, std_salt );
SAFE_FREE( std_salt );
-
+
/* if it's a Windows functional domain, we have to look for the UPN */
-
- if ( domain_func == DS_DOMAIN_FUNCTION_2000 ) {
+
+ if ( domain_func == DS_DOMAIN_FUNCTION_2000 ) {
char *upn;
int count;
-
+
status = ads_find_machine_acct(ads, &res, machine_name);
if (!ADS_ERR_OK(status)) {
return False;
}
-
+
if ( (count = ads_count_replies(ads, res)) != 1 ) {
DEBUG(1,("net_set_machine_spn: %d entries returned!\n", count));
return False;
}
-
+
upn = ads_pull_string(ads, ctx, res, "userPrincipalName");
if ( upn ) {
fstrcpy( salt, upn );
}
-
+
ads_msgfree(ads, res);
}
@@ -1313,8 +1314,8 @@ static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
DNS_ERROR dns_err;
fstring dns_server;
- const char *dnsdomain = NULL;
- char *root_domain = NULL;
+ const char *dnsdomain = NULL;
+ char *root_domain = NULL;
if ( (dnsdomain = strchr_m( machine_name, '.')) == NULL ) {
d_printf("No DNS domain configured for %s. "
@@ -1327,23 +1328,23 @@ static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
status = ads_dns_lookup_ns( ctx, dnsdomain, &nameservers, &ns_count );
if ( !NT_STATUS_IS_OK(status) || (ns_count == 0)) {
/* Child domains often do not have NS records. Look
- for the NS record for the forest root domain
+ for the NS record for the forest root domain
(rootDomainNamingContext in therootDSE) */
const char *rootname_attrs[] = { "rootDomainNamingContext", NULL };
LDAPMessage *msg = NULL;
char *root_dn;
ADS_STATUS ads_status;
-
+
if ( !ads->ldap.ld ) {
ads_status = ads_connect( ads );
if ( !ADS_ERR_OK(ads_status) ) {
DEBUG(0,("net_update_dns_internal: Failed to connect to our DC!\n"));
- goto done;
- }
+ goto done;
+ }
}
-
- ads_status = ads_do_search(ads, "", LDAP_SCOPE_BASE,
+
+ ads_status = ads_do_search(ads, "", LDAP_SCOPE_BASE,
"(objectclass=*)", rootname_attrs, &msg);
if (!ADS_ERR_OK(ads_status)) {
goto done;
@@ -1351,7 +1352,7 @@ static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
root_dn = ads_pull_string(ads, ctx, msg, "rootDomainNamingContext");
if ( !root_dn ) {
- ads_msgfree( ads, msg );
+ ads_msgfree( ads, msg );
goto done;
}
@@ -1363,15 +1364,15 @@ static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
/* try again for NS servers */
status = ads_dns_lookup_ns( ctx, root_domain, &nameservers, &ns_count );
-
- if ( !NT_STATUS_IS_OK(status) || (ns_count == 0)) {
+
+ if ( !NT_STATUS_IS_OK(status) || (ns_count == 0)) {
DEBUG(3,("net_ads_join: Failed to find name server for the %s "
"realm\n", ads->config.realm));
goto done;
}
- dnsdomain = root_domain;
-
+ dnsdomain = root_domain;
+
}
/* Now perform the dns update - we'll try non-secure and if we fail,
@@ -1387,7 +1388,7 @@ static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
done:
SAFE_FREE( root_domain );
-
+
return status;
}
@@ -1406,7 +1407,7 @@ static NTSTATUS net_update_dns(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads)
num_addrs = get_my_ip_address( &iplist );
if ( num_addrs <= 0 ) {
- DEBUG(4,("net_ads_join: Failed to find my non-loopback IP "
+ DEBUG(4,("net_update_dns: Failed to find my non-loopback IP "
"addresses!\n"));
return NT_STATUS_INVALID_PARAMETER;
}
@@ -1420,22 +1421,22 @@ static NTSTATUS net_update_dns(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads)
/*******************************************************************
- utility function to parse an integer parameter from
+ utility function to parse an integer parameter from
"parameter = value"
**********************************************************/
static char* get_string_param( const char* param )
{
char *p;
-
+
if ( (p = strchr( param, '=' )) == NULL )
return NULL;
-
+
return (p+1);
}
/*******************************************************************
********************************************************************/
-
+
static int net_ads_join_usage(int argc, const char **argv)
{
d_printf("net ads join [options]\n");
@@ -1458,7 +1459,7 @@ static int net_ads_join_usage(int argc, const char **argv)
/*******************************************************************
********************************************************************/
-
+
int net_ads_join(int argc, const char **argv)
{
ADS_STRUCT *ads = NULL;
@@ -1477,7 +1478,7 @@ int net_ads_join(int argc, const char **argv)
struct in_addr dcip;
const char *os_name = NULL;
const char *os_version = NULL;
-
+
nt_status = check_ads_config();
if (!NT_STATUS_IS_OK(nt_status)) {
d_fprintf(stderr, "Invalid configuration. Exiting....\n");
@@ -1497,8 +1498,8 @@ int net_ads_join(int argc, const char **argv)
if (strcmp(ads->config.realm, lp_realm()) != 0) {
d_fprintf(stderr, "realm of remote server (%s) and realm in %s "
- "(%s) DO NOT match. Aborting join\n", ads->config.realm,
- dyn_CONFIGFILE, lp_realm());
+ "(%s) DO NOT match. Aborting join\n",
+ ads->config.realm, dyn_CONFIGFILE, lp_realm());
nt_status = NT_STATUS_INVALID_PARAMETER;
goto fail;
}
@@ -1510,7 +1511,7 @@ int net_ads_join(int argc, const char **argv)
}
/* process additional command line args */
-
+
for ( i=0; i<argc; i++ ) {
if ( !StrnCaseCmp(argv[i], "createupn", strlen("createupn")) ) {
createupn = True;
@@ -1521,21 +1522,21 @@ int net_ads_join(int argc, const char **argv)
d_fprintf(stderr, "Please supply a valid OU path.\n");
nt_status = NT_STATUS_INVALID_PARAMETER;
goto fail;
- }
+ }
}
else if ( !StrnCaseCmp(argv[i], "osName", strlen("osName")) ) {
if ( (os_name = get_string_param(argv[i])) == NULL ) {
d_fprintf(stderr, "Please supply a operating system name.\n");
nt_status = NT_STATUS_INVALID_PARAMETER;
goto fail;
- }
+ }
}
else if ( !StrnCaseCmp(argv[i], "osVer", strlen("osVer")) ) {
if ( (os_version = get_string_param(argv[i])) == NULL ) {
d_fprintf(stderr, "Please supply a valid operating system version.\n");
nt_status = NT_STATUS_INVALID_PARAMETER;
goto fail;
- }
+ }
}
else {
d_fprintf(stderr, "Bad option: %s\n", argv[i]);
@@ -1544,7 +1545,7 @@ int net_ads_join(int argc, const char **argv)
}
}
- /* If we were given an OU, try to create the machine in
+ /* If we were given an OU, try to create the machine in
the OU account first and then do the normal RPC join */
if ( create_in_ou ) {
@@ -1563,32 +1564,32 @@ int net_ads_join(int argc, const char **argv)
tmp_password = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
password = talloc_strdup(ctx, tmp_password);
-
- nt_status = net_join_domain(ctx, ads->config.ldap_server_name,
+
+ nt_status = net_join_domain(ctx, ads->config.ldap_server_name,
&ads->ldap.ip, &short_domain_name, &domain_sid, password);
if ( !NT_STATUS_IS_OK(nt_status) ) {
- DEBUG(1, ("call of net_join_domain failed: %s\n",
+ DEBUG(1, ("call of net_join_domain failed: %s\n",
get_friendly_nt_error_msg(nt_status)));
goto fail;
}
/* Check the short name of the domain */
-
+
if ( !strequal(lp_workgroup(), short_domain_name) ) {
d_printf("The workgroup in %s does not match the short\n", dyn_CONFIGFILE);
d_printf("domain name obtained from the server.\n");
d_printf("Using the name [%s] from the server.\n", short_domain_name);
- d_printf("You should set \"workgroup = %s\" in %s.\n",
+ d_printf("You should set \"workgroup = %s\" in %s.\n",
short_domain_name, dyn_CONFIGFILE);
}
-
+
d_printf("Using short domain name -- %s\n", short_domain_name);
/* HACK ALERT! Store the sid and password under both the lp_workgroup()
value from smb.conf and the string returned from the server. The former is
neede to bootstrap winbindd's first connection to the DC to get the real
short domain name --jerry */
-
+
if ( (netdom_store_machine_account( lp_workgroup(), domain_sid, password ) == -1)
|| (netdom_store_machine_account( short_domain_name, domain_sid, password ) == -1) )
{
@@ -1600,32 +1601,36 @@ int net_ads_join(int argc, const char **argv)
/* Verify that everything is ok */
- if ( net_rpc_join_ok(short_domain_name, ads->config.ldap_server_name, &ads->ldap.ip) != 0 ) {
- d_fprintf(stderr, "Failed to verify membership in domain!\n");
+ nt_status = net_rpc_join_ok(short_domain_name,
+ ads->config.ldap_server_name, &ads->ldap.ip);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ d_fprintf(stderr,
+ "Failed to verify membership in domain: %s!\n",
+ nt_errstr(nt_status));
goto fail;
- }
+ }
/* create the dNSHostName & servicePrincipalName values */
-
+
status = net_set_machine_spn( ctx, ads );
if ( !ADS_ERR_OK(status) ) {
d_fprintf(stderr, "Failed to set servicePrincipalNames. Please ensure that\n");
d_fprintf(stderr, "the DNS domain of this server matches the AD domain,\n");
d_fprintf(stderr, "Or rejoin with using Domain Admin credentials.\n");
-
+
/* Disable the machine account in AD. Better to fail than to leave
a confused admin. */
-
+
if ( net_ads_leave( 0, NULL ) != 0 ) {
d_fprintf( stderr, "Failed to disable machine account in AD. Please do so manually.\n");
}
-
+
/* clear out the machine password */
-
- netdom_store_machine_account( lp_workgroup(), domain_sid, "" );
+
+ netdom_store_machine_account( lp_workgroup(), domain_sid, "" );
netdom_store_machine_account( short_domain_name, domain_sid, "" );
-
+
nt_status = ads_ntstatus(status);
goto fail;
}
@@ -1637,14 +1642,14 @@ int net_ads_join(int argc, const char **argv)
if ( createupn ) {
pstring upn;
-
+
/* default to using the short UPN name */
if ( !machineupn ) {
snprintf( upn, sizeof(upn), "host/%s@%s", global_myname(),
ads->config.realm );
machineupn = upn;
}
-
+
status = net_set_machine_upn( ctx, ads, machineupn );
if ( !ADS_ERR_OK(status) ) {
d_fprintf(stderr, "Failed to set userPrincipalName. Are you a Domain Admin?\n");
@@ -1669,10 +1674,10 @@ int net_ads_join(int argc, const char **argv)
#if defined(WITH_DNS_UPDATES)
/* We enter this block with user creds */
- ads_kdestroy( NULL );
+ ads_kdestroy( NULL );
ads_destroy(&ads);
ads = NULL;
-
+
if ( (ads = ads_init( lp_realm(), NULL, NULL )) != NULL ) {
/* kinit with the machine password */
@@ -1683,11 +1688,11 @@ int net_ads_join(int argc, const char **argv)
ads->auth.realm = SMB_STRDUP( lp_realm() );
ads_kinit_password( ads );
}
-
+
if ( !ads || !NT_STATUS_IS_OK(net_update_dns( ctx, ads )) ) {
d_fprintf( stderr, "DNS update failed!\n" );
}
-
+
/* exit from this block using machine creds */
#endif
@@ -1696,7 +1701,7 @@ int net_ads_join(int argc, const char **argv)
SAFE_FREE(machine_account);
TALLOC_FREE( ctx );
ads_destroy(&ads);
-
+
return 0;
fail:
@@ -1713,7 +1718,7 @@ fail:
/*******************************************************************
********************************************************************/
-
+
static int net_ads_dns_usage(int argc, const char **argv)
{
#if defined(WITH_DNS_UPDATES)
@@ -1730,18 +1735,18 @@ static int net_ads_dns_usage(int argc, const char **argv)
/*******************************************************************
********************************************************************/
-
+
static int net_ads_dns_register(int argc, const char **argv)
{
#if defined(WITH_DNS_UPDATES)
ADS_STRUCT *ads;
ADS_STATUS status;
TALLOC_CTX *ctx;
-
+
#ifdef DEVELOPER
talloc_enable_leak_report();
#endif
-
+
if (argc > 0) {
d_fprintf(stderr, "net ads dns register\n");
return -1;
@@ -1759,18 +1764,18 @@ static int net_ads_dns_register(int argc, const char **argv)
return -1;
}
- if ( !NT_STATUS_IS_OK(net_update_dns(ctx, ads)) ) {
+ if ( !NT_STATUS_IS_OK(net_update_dns(ctx, ads)) ) {
d_fprintf( stderr, "DNS update failed!\n" );
ads_destroy( &ads );
TALLOC_FREE( ctx );
return -1;
}
-
+
d_fprintf( stderr, "Successfully registered hostname with DNS\n" );
ads_destroy(&ads);
TALLOC_FREE( ctx );
-
+
return 0;
#else
d_fprintf(stderr, "DNS update support not enabled at compile time!\n");
@@ -1786,7 +1791,7 @@ static int net_ads_dns_gethostbyname(int argc, const char **argv)
{
#if defined(WITH_DNS_UPDATES)
DNS_ERROR err;
-
+
#ifdef DEVELOPER
talloc_enable_leak_report();
#endif
@@ -1896,7 +1901,7 @@ static int net_ads_printer_info(int argc, const char **argv)
rc = ads_find_printer_on_server(ads, &res, printername, servername);
if (!ADS_ERR_OK(rc)) {
- d_fprintf(stderr, "Server '%s' not found: %s\n",
+ d_fprintf(stderr, "Server '%s' not found: %s\n",
servername, ads_errstr(rc));
ads_msgfree(ads, res);
ads_destroy(&ads);
@@ -1941,7 +1946,7 @@ static int net_ads_printer_publish(int argc, const char **argv)
talloc_destroy(mem_ctx);
return net_ads_printer_usage(argc, argv);
}
-
+
printername = argv[0];
if (argc == 2) {
@@ -1949,17 +1954,17 @@ static int net_ads_printer_publish(int argc, const char **argv)
} else {
servername = global_myname();
}
-
+
/* Get printer data from SPOOLSS */
resolve_name(servername, &server_ip, 0x20);
- nt_status = cli_full_connection(&cli, global_myname(), servername,
+ nt_status = cli_full_connection(&cli, global_myname(), servername,
&server_ip, 0,
- "IPC$", "IPC",
+ "IPC$", "IPC",
opt_user_name, opt_workgroup,
- opt_password ? opt_password : "",
- CLI_FULL_CONNECTION_USE_KERBEROS,
+ opt_password ? opt_password : "",
+ CLI_FULL_CONNECTION_USE_KERBEROS,
Undefined, NULL);
if (NT_STATUS_IS_ERR(nt_status)) {
@@ -2027,12 +2032,12 @@ static int net_ads_printer_publish(int argc, const char **argv)
talloc_destroy(mem_ctx);
return -1;
}
-
+
d_printf("published printer\n");
SAFE_FREE(prt_dn);
ads_destroy(&ads);
talloc_destroy(mem_ctx);
-
+
return 0;
}
@@ -2098,7 +2103,7 @@ static int net_ads_printer(int argc, const char **argv)
{"REMOVE", net_ads_printer_remove},
{NULL, NULL}
};
-
+
return net_run_function(argc, argv, func, net_ads_printer_usage);
}
@@ -2130,7 +2135,7 @@ static int net_ads_password(int argc, const char **argv)
user = c;
}
- use_in_memory_ccache();
+ use_in_memory_ccache();
c = strchr_m(auth_principal, '@');
if (c) {
realm = ++c;
@@ -2138,7 +2143,7 @@ static int net_ads_password(int argc, const char **argv)
realm = lp_realm();
}
- /* use the realm so we can eventually change passwords for users
+ /* use the realm so we can eventually change passwords for users
in realms other than default */
if (!(ads = ads_init(realm, opt_workgroup, opt_host))) {
return -1;
@@ -2147,7 +2152,7 @@ static int net_ads_password(int argc, const char **argv)
/* we don't actually need a full connect, but it's the easy way to
fill in the KDC's addresss */
ads_connect(ads);
-
+
if (!ads || !ads->config.realm) {
d_fprintf(stderr, "Didn't find the kerberos server!\n");
return -1;
@@ -2161,7 +2166,7 @@ static int net_ads_password(int argc, const char **argv)
free(prompt);
}
- ret = kerberos_set_password(ads->auth.kdc_server, auth_principal,
+ ret = kerberos_set_password(ads->auth.kdc_server, auth_principal,
auth_password, user, new_password, ads->auth.time_offset);
if (!ADS_ERR_OK(ret)) {
d_fprintf(stderr, "Password change failed: %s\n", ads_errstr(ret));
@@ -2176,7 +2181,7 @@ static int net_ads_password(int argc, const char **argv)
}
int net_ads_changetrustpw(int argc, const char **argv)
-{
+{
ADS_STRUCT *ads;
char *host_principal;
fstring my_name;
@@ -2208,7 +2213,7 @@ int net_ads_changetrustpw(int argc, const char **argv)
SAFE_FREE(host_principal);
return -1;
}
-
+
d_printf("Password change for principal %s succeeded.\n", host_principal);
if (lp_use_kerberos_keytab()) {
@@ -2270,7 +2275,7 @@ static int net_ads_search(int argc, const char **argv)
d_fprintf(stderr, "search failed: %s\n", ads_errstr(rc));
ads_destroy(&ads);
return -1;
- }
+ }
d_printf("Got %d replies\n\n", ads_count_replies(ads, res));
@@ -2324,14 +2329,14 @@ static int net_ads_dn(int argc, const char **argv)
dn = argv[0];
attrs = (argv + 1);
- rc = ads_do_search_all(ads, dn,
+ rc = ads_do_search_all(ads, dn,
LDAP_SCOPE_BASE,
"(objectclass=*)", attrs, &res);
if (!ADS_ERR_OK(rc)) {
d_fprintf(stderr, "search failed: %s\n", ads_errstr(rc));
ads_destroy(&ads);
return -1;
- }
+ }
d_printf("Got %d replies\n\n", ads_count_replies(ads, res));
@@ -2395,7 +2400,7 @@ static int net_ads_sid(int argc, const char **argv)
d_fprintf(stderr, "search failed: %s\n", ads_errstr(rc));
ads_destroy(&ads);
return -1;
- }
+ }
d_printf("Got %d replies\n\n", ads_count_replies(ads, res));
@@ -2662,7 +2667,7 @@ int net_ads(int argc, const char **argv)
{"HELP", net_ads_help},
{NULL, NULL}
};
-
+
return net_run_function(argc, argv, func, net_ads_usage);
}
diff --git a/source/utils/net_rap.c b/source/utils/net_rap.c
index 56d6deab73f..74eda61331e 100644
--- a/source/utils/net_rap.c
+++ b/source/utils/net_rap.c
@@ -83,7 +83,7 @@ static int rap_file_close(int argc, const char **argv)
return net_rap_file_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetFileClose(cli, atoi(argv[0]));
@@ -98,7 +98,7 @@ static int rap_file_info(int argc, const char **argv)
if (argc == 0)
return net_rap_file_usage(argc, argv);
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetFileGetInfo(cli, atoi(argv[0]), one_file_fn);
@@ -128,7 +128,7 @@ int net_rap_file(int argc, const char **argv)
struct cli_state *cli;
int ret;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
/* list open files */
@@ -172,7 +172,7 @@ static int rap_share_delete(int argc, const char **argv)
return net_rap_share_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetShareDelete(cli, argv[0]);
@@ -194,7 +194,7 @@ static int rap_share_add(int argc, const char **argv)
return net_rap_share_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
sharename = SMB_STRDUP(argv[0]);
@@ -234,7 +234,7 @@ int net_rap_share(int argc, const char **argv)
struct cli_state *cli;
int ret;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
if (opt_long_list_entries) {
@@ -320,7 +320,7 @@ static int rap_session_info(int argc, const char **argv)
struct cli_state *cli;
int ret;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
if (argc == 0)
@@ -346,7 +346,7 @@ static int rap_session_delete(int argc, const char **argv)
struct cli_state *cli;
int ret;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
if (argc == 0)
@@ -370,7 +370,7 @@ int net_rap_session(int argc, const char **argv)
struct cli_state *cli;
int ret;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
d_printf("Computer User name "\
@@ -412,7 +412,7 @@ static int net_rap_server_name(int argc, const char *argv[])
struct cli_state *cli;
char *name;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
if (!cli_get_server_name(NULL, cli, &name)) {
@@ -444,7 +444,7 @@ int net_rap_server(int argc, const char **argv)
}
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
d_printf("\nEnumerating servers in this domain or workgroup: \n\n"\
@@ -472,7 +472,7 @@ int net_rap_domain(int argc, const char **argv)
struct cli_state *cli;
int ret;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
d_printf("\nEnumerating domains:\n\n"\
@@ -569,7 +569,7 @@ static int rap_printq_info(int argc, const char **argv)
if (argc == 0)
return net_rap_printq_usage(argc, argv);
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
d_printf(PRINTQ_ENUM_DISPLAY, cli->desthost); /* list header */
@@ -586,7 +586,7 @@ static int rap_printq_delete(int argc, const char **argv)
if (argc == 0)
return net_rap_printq_usage(argc, argv);
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_printjob_del(cli, atoi(argv[0]));
@@ -606,7 +606,7 @@ int net_rap_printq(int argc, const char **argv)
};
if (argc == 0) {
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
d_printf(PRINTQ_ENUM_DISPLAY, cli->desthost); /* list header */
@@ -652,7 +652,7 @@ static int rap_user_delete(int argc, const char **argv)
return net_rap_user_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetUserDelete(cli, argv[0]);
@@ -671,7 +671,7 @@ static int rap_user_add(int argc, const char **argv)
return net_rap_user_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
safe_strcpy(userinfo.user_name, argv[0], sizeof(userinfo.user_name)-1);
@@ -700,7 +700,7 @@ static int rap_user_info(int argc, const char **argv)
return net_rap_user_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetUserGetGroups(cli, argv[0], group_member_fn, NULL);
@@ -720,7 +720,7 @@ int net_rap_user(int argc, const char **argv)
if (argc == 0) {
struct cli_state *cli;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
goto done;
if (opt_long_list_entries) {
d_printf("\nUser name Comment"\
@@ -768,7 +768,7 @@ static int rap_group_delete(int argc, const char **argv)
return net_rap_group_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetGroupDelete(cli, argv[0]);
@@ -787,7 +787,7 @@ static int rap_group_add(int argc, const char **argv)
return net_rap_group_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
/* BB check for length 21 or smaller explicitly ? BB */
@@ -811,7 +811,7 @@ int net_rap_group(int argc, const char **argv)
if (argc == 0) {
struct cli_state *cli;
int ret;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
if (opt_long_list_entries) {
d_printf("Group name Comment\n");
@@ -852,7 +852,7 @@ static int rap_groupmember_add(int argc, const char **argv)
return net_rap_groupmember_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetGroupAddUser(cli, argv[0], argv[1]);
@@ -869,7 +869,7 @@ static int rap_groupmember_delete(int argc, const char **argv)
return net_rap_groupmember_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetGroupDelUser(cli, argv[0], argv[1]);
@@ -886,7 +886,7 @@ static int rap_groupmember_list(int argc, const char **argv)
return net_rap_groupmember_usage(argc, argv);
}
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
ret = cli_NetGroupGetUsers(cli, argv[0], group_member_fn, NULL );
@@ -962,7 +962,7 @@ int net_rap_service(int argc, const char **argv)
if (argc == 0) {
struct cli_state *cli;
int ret;
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
if (opt_long_list_entries) {
@@ -996,7 +996,7 @@ int net_rap_password(int argc, const char **argv)
if (argc < 3)
return net_rap_password_usage(argc, argv);
- if (!(cli = net_make_ipc_connection(0)))
+ if (!NT_STATUS_IS_OK(net_make_ipc_connection(0, &cli)))
return -1;
/* BB Add check for password lengths? */
diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c
index b1c190c1e5b..fc6d7da1f9b 100644
--- a/source/utils/net_rpc.c
+++ b/source/utils/net_rpc.c
@@ -115,7 +115,12 @@ int run_rpc_command(struct cli_state *cli_arg,
/* make use of cli_state handed over as an argument, if possible */
if (!cli_arg) {
- cli = net_make_ipc_connection(conn_flags);
+ nt_status = net_make_ipc_connection(conn_flags, &cli);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ DEBUG(1, ("failed to make ipc connection: %s\n",
+ nt_errstr(nt_status)));
+ return -1;
+ }
} else {
cli = cli_arg;
}
@@ -1252,9 +1257,9 @@ static NTSTATUS rpc_user_list_internals(const DOM_SID *domain_sid,
loop_count++;
for (i = 0; i < num_entries; i++) {
- unistr2_to_ascii(user, &(&ctr.sam.info1->str[i])->uni_acct_name, sizeof(user)-1);
+ unistr2_to_ascii(user, &(&ctr.sam.info1->str[i])->uni_acct_name, sizeof(user));
if (opt_long_list_entries)
- unistr2_to_ascii(desc, &(&ctr.sam.info1->str[i])->uni_acct_desc, sizeof(desc)-1);
+ unistr2_to_ascii(desc, &(&ctr.sam.info1->str[i])->uni_acct_desc, sizeof(desc));
if (opt_long_list_entries)
printf("%-21.21s %s\n", user, desc);
@@ -1803,7 +1808,7 @@ static NTSTATUS rpc_group_delete_internals(const DOM_SID *domain_sid,
if (user_ctr->info.id21->group_rid == group_rid) {
unistr2_to_ascii(temp, &(user_ctr->info.id21)->uni_user_name,
- sizeof(temp)-1);
+ sizeof(temp));
if (opt_verbose)
d_printf("Group is primary group of %s\n",temp);
group_is_primary = True;
@@ -2510,8 +2515,8 @@ static NTSTATUS rpc_group_list_internals(const DOM_SID *domain_sid,
fstring group, desc;
- unistr2_to_ascii(group, &(&ctr.sam.info3->str[i])->uni_grp_name, sizeof(group)-1);
- unistr2_to_ascii(desc, &(&ctr.sam.info3->str[i])->uni_grp_desc, sizeof(desc)-1);
+ unistr2_to_ascii(group, &(&ctr.sam.info3->str[i])->uni_grp_name, sizeof(group));
+ unistr2_to_ascii(desc, &(&ctr.sam.info3->str[i])->uni_grp_desc, sizeof(desc));
if (opt_long_list_entries)
printf("%-21.21s %-50.50s\n",
@@ -5917,8 +5922,10 @@ static int rpc_trustdom_vampire(int argc, const char **argv)
};
/* open \PIPE\lsarpc and open policy handle */
- if (!(cli = net_make_ipc_connection(NET_FLAGS_PDC))) {
- DEBUG(0, ("Couldn't connect to domain controller\n"));
+ nt_status = net_make_ipc_connection(NET_FLAGS_PDC, &cli);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ DEBUG(0, ("Couldn't connect to domain controller: %s\n",
+ nt_errstr(nt_status)));
talloc_destroy(mem_ctx);
return -1;
};
@@ -6060,8 +6067,10 @@ static int rpc_trustdom_list(int argc, const char **argv)
};
/* open \PIPE\lsarpc and open policy handle */
- if (!(cli = net_make_ipc_connection(NET_FLAGS_PDC))) {
- DEBUG(0, ("Couldn't connect to domain controller\n"));
+ nt_status = net_make_ipc_connection(NET_FLAGS_PDC, &cli);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ DEBUG(0, ("Couldn't connect to domain controller: %s\n",
+ nt_errstr(nt_status)));
talloc_destroy(mem_ctx);
return -1;
};
@@ -6228,8 +6237,10 @@ static int rpc_trustdom_list(int argc, const char **argv)
d_printf("%s%s", trusting_dom_names[i], padding);
/* connect to remote domain controller */
- remote_cli = net_make_ipc_connection(NET_FLAGS_PDC | NET_FLAGS_ANONYMOUS);
- if (remote_cli) {
+ nt_status = net_make_ipc_connection(
+ NET_FLAGS_PDC | NET_FLAGS_ANONYMOUS,
+ &remote_cli);
+ if (NT_STATUS_IS_OK(nt_status)) {
/* query for domain's sid */
if (run_rpc_command(remote_cli, PI_LSARPC, 0, rpc_query_domain_sid, argc, argv))
d_fprintf(stderr, "couldn't get domain's sid\n");
@@ -6237,7 +6248,9 @@ static int rpc_trustdom_list(int argc, const char **argv)
cli_shutdown(remote_cli);
} else {
- d_fprintf(stderr, "domain controller is not responding\n");
+ d_fprintf(stderr, "domain controller is not "
+ "responding: %s\n",
+ nt_errstr(nt_status));
};
};
diff --git a/source/utils/net_rpc_join.c b/source/utils/net_rpc_join.c
index 1097eb95754..b32fa27284f 100644
--- a/source/utils/net_rpc_join.c
+++ b/source/utils/net_rpc_join.c
@@ -40,7 +40,8 @@
* @return A shell status integer (0 for success)
*
**/
-int net_rpc_join_ok(const char *domain, const char *server, struct in_addr *ip )
+NTSTATUS net_rpc_join_ok(const char *domain, const char *server,
+ struct in_addr *ip)
{
enum security_types sec;
unsigned int conn_flags = NET_FLAGS_PDC;
@@ -64,8 +65,9 @@ int net_rpc_join_ok(const char *domain, const char *server, struct in_addr *ip )
}
/* Connect to remote machine */
- if (!(cli = net_make_ipc_connection_ex(domain, server, ip, conn_flags))) {
- return -1;
+ ntret = net_make_ipc_connection_ex(domain, server, ip, conn_flags, &cli);
+ if (!NT_STATUS_IS_OK(ntret)) {
+ return ntret;
}
/* Setup the creds as though we're going to do schannel... */
@@ -77,13 +79,13 @@ int net_rpc_join_ok(const char *domain, const char *server, struct in_addr *ip )
if (!netlogon_pipe) {
if (NT_STATUS_EQUAL(ntret, NT_STATUS_INVALID_NETWORK_RESPONSE)) {
cli_shutdown(cli);
- return 0;
+ return NT_STATUS_OK;
} else {
DEBUG(0,("net_rpc_join_ok: failed to get schannel session "
"key from server %s for domain %s. Error was %s\n",
cli->desthost, domain, nt_errstr(ntret) ));
cli_shutdown(cli);
- return -1;
+ return ntret;
}
}
@@ -91,7 +93,7 @@ int net_rpc_join_ok(const char *domain, const char *server, struct in_addr *ip )
if (!lp_client_schannel()) {
cli_shutdown(cli);
/* We're good... */
- return 0;
+ return ntret;
}
pipe_hnd = cli_rpc_pipe_open_schannel_with_key(cli, PI_NETLOGON,
@@ -102,12 +104,14 @@ int net_rpc_join_ok(const char *domain, const char *server, struct in_addr *ip )
DEBUG(0,("net_rpc_join_ok: failed to open schannel session "
"on netlogon pipe to server %s for domain %s. Error was %s\n",
cli->desthost, domain, nt_errstr(ntret) ));
- cli_shutdown(cli);
- return -1;
+ /*
+ * Note: here, we have:
+ * (pipe_hnd != NULL) if and only if NT_STATUS_IS_OK(ntret)
+ */
}
cli_shutdown(cli);
- return 0;
+ return ntret;
}
/**
@@ -180,8 +184,10 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* Make authenticated connection to remote machine */
- if (!(cli = net_make_ipc_connection(NET_FLAGS_PDC)))
+ result = net_make_ipc_connection(NET_FLAGS_PDC, &cli);
+ if (!NT_STATUS_IS_OK(result)) {
return 1;
+ }
if (!(mem_ctx = talloc_init("net_rpc_join_newstyle"))) {
DEBUG(0, ("Could not initialise talloc context\n"));
@@ -419,8 +425,9 @@ int net_rpc_join_newstyle(int argc, const char **argv)
}
/* double-check, connection from scratch */
- retval = net_rpc_join_ok(domain, cli->desthost, &cli->dest_ip);
-
+ result = net_rpc_join_ok(domain, cli->desthost, &cli->dest_ip);
+ retval = NT_STATUS_IS_OK(result) ? 0 : -1;
+
done:
/* Display success or failure */
@@ -449,10 +456,13 @@ done:
int net_rpc_testjoin(int argc, const char **argv)
{
char *domain = smb_xstrdup(opt_target_workgroup);
+ NTSTATUS nt_status;
/* Display success or failure */
- if (net_rpc_join_ok(domain, NULL, NULL) != 0) {
- fprintf(stderr,"Join to domain '%s' is not valid\n",domain);
+ nt_status = net_rpc_join_ok(domain, NULL, NULL);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ fprintf(stderr,"Join to domain '%s' is not valid: %s\n",
+ nt_errstr(nt_status), domain);
free(domain);
return -1;
}
diff --git a/source/utils/net_rpc_registry.c b/source/utils/net_rpc_registry.c
index 459e7f9f851..64aad1f4dd8 100644
--- a/source/utils/net_rpc_registry.c
+++ b/source/utils/net_rpc_registry.c
@@ -48,6 +48,9 @@ static BOOL reg_hive_key(const char *fullname, uint32 *reg_type,
else if (strnequal(fullname, "HKU", len) ||
strnequal(fullname, "HKEY_USERS", len))
(*reg_type) = HKEY_USERS;
+ else if (strnequal(fullname, "HKCU", len) ||
+ strnequal(fullname, "HKEY_CURRENT_USER", len))
+ (*reg_type) = HKEY_CURRENT_USER;
else if (strnequal(fullname, "HKPD", len) ||
strnequal(fullname, "HKEY_PERFORMANCE_DATA", len))
(*reg_type) = HKEY_PERFORMANCE_DATA;
diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c
index 0be9381c3ac..72b7f63cc44 100644
--- a/source/utils/net_rpc_samsync.c
+++ b/source/utils/net_rpc_samsync.c
@@ -585,8 +585,8 @@ static NTSTATUS fetch_group_info(uint32 rid, SAM_GROUP_INFO *delta)
GROUP_MAP map;
BOOL insert = True;
- unistr2_to_ascii(name, &delta->uni_grp_name, sizeof(name)-1);
- unistr2_to_ascii(comment, &delta->uni_grp_desc, sizeof(comment)-1);
+ unistr2_to_ascii(name, &delta->uni_grp_name, sizeof(name));
+ unistr2_to_ascii(comment, &delta->uni_grp_desc, sizeof(comment));
/* add the group to the mapping table */
sid_copy(&group_sid, get_global_sam_sid());
@@ -776,8 +776,8 @@ static NTSTATUS fetch_alias_info(uint32 rid, SAM_ALIAS_INFO *delta,
GROUP_MAP map;
BOOL insert = True;
- unistr2_to_ascii(name, &delta->uni_als_name, sizeof(name)-1);
- unistr2_to_ascii(comment, &delta->uni_als_desc, sizeof(comment)-1);
+ unistr2_to_ascii(name, &delta->uni_als_name, sizeof(name));
+ unistr2_to_ascii(comment, &delta->uni_als_desc, sizeof(comment));
/* Find out whether the group is already mapped */
sid_copy(&alias_sid, &dom_sid);
@@ -839,7 +839,7 @@ static NTSTATUS fetch_domain_info(uint32 rid, SAM_DOMAIN_INFO *delta)
u_lockoutreset = uint64s_nt_time_to_unix_abs(&delta->account_lockout.reset_count);
u_lockouttime = uint64s_nt_time_to_unix_abs(&delta->account_lockout.lockout_duration);
- unistr2_to_ascii(domname, &delta->uni_dom_name, sizeof(domname) - 1);
+ unistr2_to_ascii(domname, &delta->uni_dom_name, sizeof(domname));
/* we don't handle BUILTIN account policies */
if (!strequal(domname, get_global_sam_name())) {
@@ -1399,7 +1399,7 @@ static NTSTATUS fetch_group_info_to_ldif(SAM_DELTA_CTR *delta, GROUPMAP *groupma
/* Get the group name */
unistr2_to_ascii(groupname,
&(delta->group_info.uni_grp_name),
- sizeof(groupname)-1);
+ sizeof(groupname));
/* Set up the group type (always 2 for group info) */
grouptype = 2;
@@ -1470,7 +1470,7 @@ static NTSTATUS fetch_account_info_to_ldif(SAM_DELTA_CTR *delta,
/* Get the username */
unistr2_to_ascii(username,
&(delta->account_info.uni_acct_name),
- sizeof(username)-1);
+ sizeof(username));
/* Get the rid */
rid = delta->account_info.user_rid;
@@ -1482,7 +1482,7 @@ static NTSTATUS fetch_account_info_to_ldif(SAM_DELTA_CTR *delta,
/* Get the home directory */
if (delta->account_info.acb_info & ACB_NORMAL) {
unistr2_to_ascii(homedir, &(delta->account_info.uni_home_dir),
- sizeof(homedir)-1);
+ sizeof(homedir));
if (!*homedir) {
pstr_sprintf(homedir, "/home/%s", username);
} else {
@@ -1496,27 +1496,27 @@ static NTSTATUS fetch_account_info_to_ldif(SAM_DELTA_CTR *delta,
/* Get the logon script */
unistr2_to_ascii(logonscript, &(delta->account_info.uni_logon_script),
- sizeof(logonscript)-1);
+ sizeof(logonscript));
/* Get the home drive */
unistr2_to_ascii(homedrive, &(delta->account_info.uni_dir_drive),
- sizeof(homedrive)-1);
+ sizeof(homedrive));
/* Get the home path */
unistr2_to_ascii(homepath, &(delta->account_info.uni_home_dir),
- sizeof(homepath)-1);
+ sizeof(homepath));
/* Get the description */
unistr2_to_ascii(description, &(delta->account_info.uni_acct_desc),
- sizeof(description)-1);
+ sizeof(description));
/* Get the display name */
unistr2_to_ascii(fullname, &(delta->account_info.uni_full_name),
- sizeof(fullname)-1);
+ sizeof(fullname));
/* Get the profile path */
unistr2_to_ascii(profilepath, &(delta->account_info.uni_profile),
- sizeof(profilepath)-1);
+ sizeof(profilepath));
/* Get lm and nt password data */
if (memcmp(delta->account_info.pass.buf_lm_pwd, zero_buf, 16) != 0) {
@@ -1620,11 +1620,11 @@ static NTSTATUS fetch_alias_info_to_ldif(SAM_DELTA_CTR *delta,
/* Get the alias name */
unistr2_to_ascii(aliasname, &(delta->alias_info.uni_als_name),
- sizeof(aliasname)-1);
+ sizeof(aliasname));
/* Get the alias description */
unistr2_to_ascii(description, &(delta->alias_info.uni_als_desc),
- sizeof(description)-1);
+ sizeof(description));
/* Set up the group type */
switch (db_type) {
@@ -1895,7 +1895,7 @@ static NTSTATUS fetch_database_to_ldif(struct rpc_pipe_client *pipe_hnd,
unistr2_to_ascii(
domainname,
&deltas[k].domain_info.uni_dom_name,
- sizeof(domainname)-1);
+ sizeof(domainname));
break;
case SAM_DELTA_GROUP_INFO:
diff --git a/source/utils/net_rpc_shell.c b/source/utils/net_rpc_shell.c
index 474ca098e77..206e18776b9 100644
--- a/source/utils/net_rpc_shell.c
+++ b/source/utils/net_rpc_shell.c
@@ -218,9 +218,10 @@ int net_rpc_shell(int argc, const char **argv)
return -1;
}
- ctx->cli = net_make_ipc_connection(0);
- if (ctx->cli == NULL) {
- d_fprintf(stderr, "Could not open connection\n");
+ status = net_make_ipc_connection(0, &(ctx->cli));
+ if (!NT_STATUS_IS_OK(status)) {
+ d_fprintf(stderr, "Could not open connection: %s\n",
+ nt_errstr(status));
return -1;
}
diff --git a/source/utils/ntlm_auth.c b/source/utils/ntlm_auth.c
index d410e57f1cc..7daf83afebd 100644
--- a/source/utils/ntlm_auth.c
+++ b/source/utils/ntlm_auth.c
@@ -363,7 +363,7 @@ NTSTATUS contact_winbind_auth_crap(const char *username,
nt_status = NT_STATUS_UNSUCCESSFUL;
if (error_string)
*error_string = smb_xstrdup("Reading winbind reply failed!");
- free_response(&response);
+ winbindd_free_response(&response);
return nt_status;
}
@@ -371,7 +371,7 @@ NTSTATUS contact_winbind_auth_crap(const char *username,
if (!NT_STATUS_IS_OK(nt_status)) {
if (error_string)
*error_string = smb_xstrdup(response.data.auth.error_string);
- free_response(&response);
+ winbindd_free_response(&response);
return nt_status;
}
@@ -387,12 +387,12 @@ NTSTATUS contact_winbind_auth_crap(const char *username,
if (flags & WBFLAG_PAM_UNIX_NAME) {
*unix_name = SMB_STRDUP((char *)response.extra_data.data);
if (!*unix_name) {
- free_response(&response);
+ winbindd_free_response(&response);
return NT_STATUS_NO_MEMORY;
}
}
- free_response(&response);
+ winbindd_free_response(&response);
return nt_status;
}
@@ -458,7 +458,7 @@ static NTSTATUS contact_winbind_change_pswd_auth_crap(const char *username,
nt_status = NT_STATUS_UNSUCCESSFUL;
if (error_string)
*error_string = smb_xstrdup("Reading winbind reply failed!");
- free_response(&response);
+ winbindd_free_response(&response);
return nt_status;
}
@@ -467,11 +467,11 @@ static NTSTATUS contact_winbind_change_pswd_auth_crap(const char *username,
{
if (error_string)
*error_string = smb_xstrdup(response.data.auth.error_string);
- free_response(&response);
+ winbindd_free_response(&response);
return nt_status;
}
- free_response(&response);
+ winbindd_free_response(&response);
return nt_status;
}
@@ -658,7 +658,7 @@ static NTSTATUS do_ccache_ntlm_auth(DATA_BLOB initial_msg, DATA_BLOB challenge_m
SAFE_FREE(wb_request.extra_data.data);
if (result != NSS_STATUS_SUCCESS) {
- free_response(&wb_response);
+ winbindd_free_response(&wb_response);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -667,12 +667,12 @@ static NTSTATUS do_ccache_ntlm_auth(DATA_BLOB initial_msg, DATA_BLOB challenge_m
wb_response.data.ccache_ntlm_auth.auth_blob_len);
if (wb_response.data.ccache_ntlm_auth.auth_blob_len > 0 &&
reply->data == NULL) {
- free_response(&wb_response);
+ winbindd_free_response(&wb_response);
return NT_STATUS_NO_MEMORY;
}
}
- free_response(&wb_response);
+ winbindd_free_response(&wb_response);
return NT_STATUS_MORE_PROCESSING_REQUIRED;
}
diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c
index a2c65e916cf..79ab69918ff 100644
--- a/source/utils/smbcontrol.c
+++ b/source/utils/smbcontrol.c
@@ -271,10 +271,6 @@ static BOOL do_daemon_stack_trace(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
- fprintf(stderr,
- "Daemon stack tracing is not supported on this platform\n");
- return False;
-
pid_t dest;
int count = 0;
diff --git a/source/nsswitch/idmap.c b/source/winbindd/idmap.c
index 009d7a610ba..2c7acc185cc 100644
--- a/source/nsswitch/idmap.c
+++ b/source/winbindd/idmap.c
@@ -431,9 +431,10 @@ NTSTATUS idmap_init(void)
if (compat) {
parm_backend = talloc_strdup(idmap_ctx, compat_backend);
} else {
- char *backend = lp_parm_const_string(-1, config_option,
- "backend", "tdb");
- parm_backend = talloc_strdup(idmap_ctx, backend);
+ parm_backend = talloc_strdup(idmap_ctx,
+ lp_parm_const_string(
+ -1, config_option,
+ "backend", "tdb"));
}
IDMAP_CHECK_ALLOC(parm_backend);
diff --git a/source/nsswitch/idmap_ad.c b/source/winbindd/idmap_ad.c
index 6f8839e4ba3..b2d41e436c3 100644
--- a/source/nsswitch/idmap_ad.c
+++ b/source/winbindd/idmap_ad.c
@@ -315,7 +315,7 @@ again:
ATYPE_WORKSTATION_TRUST,
ATYPE_INTERDOMAIN_TRUST);
}
- u_filter = talloc_asprintf_append(u_filter, "(%s=%lu)",
+ u_filter = talloc_asprintf_append_buffer(u_filter, "(%s=%lu)",
ad_schema->posix_uidnumber_attr,
(unsigned long)ids[idx]->xid.id);
CHECK_ALLOC_DONE(u_filter);
@@ -329,7 +329,7 @@ again:
ATYPE_SECURITY_GLOBAL_GROUP,
ATYPE_SECURITY_LOCAL_GROUP);
}
- g_filter = talloc_asprintf_append(g_filter, "(%s=%lu)",
+ g_filter = talloc_asprintf_append_buffer(g_filter, "(%s=%lu)",
ad_schema->posix_gidnumber_attr,
(unsigned long)ids[idx]->xid.id);
CHECK_ALLOC_DONE(g_filter);
@@ -344,16 +344,16 @@ again:
filter = talloc_asprintf(memctx, "(|");
CHECK_ALLOC_DONE(filter);
if ( u_filter) {
- filter = talloc_asprintf_append(filter, "%s))", u_filter);
+ filter = talloc_asprintf_append_buffer(filter, "%s))", u_filter);
CHECK_ALLOC_DONE(filter);
TALLOC_FREE(u_filter);
}
if ( g_filter) {
- filter = talloc_asprintf_append(filter, "%s))", g_filter);
+ filter = talloc_asprintf_append_buffer(filter, "%s))", g_filter);
CHECK_ALLOC_DONE(filter);
TALLOC_FREE(g_filter);
}
- filter = talloc_asprintf_append(filter, ")");
+ filter = talloc_asprintf_append_buffer(filter, ")");
CHECK_ALLOC_DONE(filter);
rc = ads_search_retry(ads, &res, filter, attrs);
@@ -535,12 +535,12 @@ again:
for (i = 0; (i < IDMAP_AD_MAX_IDS) && ids[idx]; i++, idx++) {
sidstr = sid_binstring(ids[idx]->sid);
- filter = talloc_asprintf_append(filter, "(objectSid=%s)", sidstr);
+ filter = talloc_asprintf_append_buffer(filter, "(objectSid=%s)", sidstr);
free(sidstr);
CHECK_ALLOC_DONE(filter);
}
- filter = talloc_asprintf_append(filter, "))");
+ filter = talloc_asprintf_append_buffer(filter, "))");
CHECK_ALLOC_DONE(filter);
DEBUG(10, ("Filter: [%s]\n", filter));
@@ -773,7 +773,7 @@ static NTSTATUS nss_ad_get_info( struct nss_domain_entry *e,
if ( gid ) {
if ( !ads_pull_uint32(ads, msg, ad_schema->posix_gidnumber_attr, gid ) )
- *gid = 0;
+ *gid = (uint32)-1;
}
return NT_STATUS_OK;
diff --git a/source/nsswitch/idmap_cache.c b/source/winbindd/idmap_cache.c
index 4f01cb1392d..4f01cb1392d 100644
--- a/source/nsswitch/idmap_cache.c
+++ b/source/winbindd/idmap_cache.c
diff --git a/source/nsswitch/idmap_ldap.c b/source/winbindd/idmap_ldap.c
index 3b63915b052..9daf084ce18 100644
--- a/source/nsswitch/idmap_ldap.c
+++ b/source/winbindd/idmap_ldap.c
@@ -955,12 +955,12 @@ again:
bidx = idx;
for (i = 0; (i < IDMAP_LDAP_MAX_IDS) && ids[idx]; i++, idx++) {
- filter = talloc_asprintf_append(filter, "(%s=%lu)",
+ filter = talloc_asprintf_append_buffer(filter, "(%s=%lu)",
(ids[idx]->xid.type==ID_TYPE_UID)?uidNumber:gidNumber,
(unsigned long)ids[idx]->xid.id);
CHECK_ALLOC_DONE(filter);
}
- filter = talloc_asprintf_append(filter, "))");
+ filter = talloc_asprintf_append_buffer(filter, "))");
CHECK_ALLOC_DONE(filter);
DEBUG(10, ("Filter: [%s]\n", filter));
} else {
@@ -1185,12 +1185,12 @@ again:
bidx = idx;
for (i = 0; (i < IDMAP_LDAP_MAX_IDS) && ids[idx]; i++, idx++) {
- filter = talloc_asprintf_append(filter, "(%s=%s)",
+ filter = talloc_asprintf_append_buffer(filter, "(%s=%s)",
LDAP_ATTRIBUTE_SID,
sid_string_static(ids[idx]->sid));
CHECK_ALLOC_DONE(filter);
}
- filter = talloc_asprintf_append(filter, "))");
+ filter = talloc_asprintf_append_buffer(filter, "))");
CHECK_ALLOC_DONE(filter);
DEBUG(10, ("Filter: [%s]", filter));
} else {
diff --git a/source/nsswitch/idmap_nss.c b/source/winbindd/idmap_nss.c
index 5bb2389c93f..5bb2389c93f 100644
--- a/source/nsswitch/idmap_nss.c
+++ b/source/winbindd/idmap_nss.c
diff --git a/source/nsswitch/idmap_passdb.c b/source/winbindd/idmap_passdb.c
index 17afd71ab87..17afd71ab87 100644
--- a/source/nsswitch/idmap_passdb.c
+++ b/source/winbindd/idmap_passdb.c
diff --git a/source/nsswitch/idmap_rid.c b/source/winbindd/idmap_rid.c
index 8e5f1302f70..8e5f1302f70 100644
--- a/source/nsswitch/idmap_rid.c
+++ b/source/winbindd/idmap_rid.c
diff --git a/source/nsswitch/idmap_tdb.c b/source/winbindd/idmap_tdb.c
index 97000689fa1..97000689fa1 100644
--- a/source/nsswitch/idmap_tdb.c
+++ b/source/winbindd/idmap_tdb.c
diff --git a/source/nsswitch/idmap_util.c b/source/winbindd/idmap_util.c
index 077c5997393..077c5997393 100644
--- a/source/nsswitch/idmap_util.c
+++ b/source/winbindd/idmap_util.c
diff --git a/source/nsswitch/nss_info.c b/source/winbindd/nss_info.c
index ea51e9dde8d..ea51e9dde8d 100644
--- a/source/nsswitch/nss_info.c
+++ b/source/winbindd/nss_info.c
diff --git a/source/nsswitch/nss_info_template.c b/source/winbindd/nss_info_template.c
index aaf02e4abe9..aaf02e4abe9 100644
--- a/source/nsswitch/nss_info_template.c
+++ b/source/winbindd/nss_info_template.c
diff --git a/source/nsswitch/winbindd.c b/source/winbindd/winbindd.c
index 9d359e8416a..81f07c4c8c5 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -133,7 +133,7 @@ static void terminate(void)
/* Remove socket file */
pstr_sprintf(path, "%s/%s",
- WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
+ get_winbind_pipe_dir(), WINBINDD_SOCKET_NAME);
unlink(path);
idmap_close();
diff --git a/source/nsswitch/winbindd.h b/source/winbindd/winbindd.h
index c975de830e4..ebede0f0076 100644
--- a/source/nsswitch/winbindd.h
+++ b/source/winbindd/winbindd.h
@@ -23,12 +23,10 @@
#ifndef _WINBINDD_H
#define _WINBINDD_H
-#include "nterr.h"
-
-#include "winbindd_nss.h"
+#include "nsswitch/winbind_struct_protocol.h"
#ifdef HAVE_LIBNSCD
-#include "libnscd.h"
+#include <libnscd.h>
#endif
#ifdef HAVE_SYS_MMAN_H
@@ -346,7 +344,7 @@ struct winbindd_tdc_domain {
};
-#include "nsswitch/winbindd_proto.h"
+#include "winbindd/winbindd_proto.h"
#define WINBINDD_ESTABLISH_LOOP 30
#define WINBINDD_RESCAN_FREQ lp_winbind_cache_time()
diff --git a/source/nsswitch/winbindd_ads.c b/source/winbindd/winbindd_ads.c
index 65cc00bb97d..488967ed09a 100644
--- a/source/nsswitch/winbindd_ads.c
+++ b/source/winbindd/winbindd_ads.c
@@ -1049,13 +1049,13 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
goto done;
}
- status = rpccli_lsa_lookup_sids_all(cli, tmp_ctx,
- &lsa_policy,
- num_nocache,
- sid_mem_nocache,
- &domains_nocache,
- &names_nocache,
- &name_types_nocache);
+ status = rpccli_lsa_lookup_sids(cli, tmp_ctx,
+ &lsa_policy,
+ num_nocache,
+ sid_mem_nocache,
+ &domains_nocache,
+ &names_nocache,
+ &name_types_nocache);
if (NT_STATUS_IS_OK(status) ||
NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED))
diff --git a/source/nsswitch/winbindd_async.c b/source/winbindd/winbindd_async.c
index 5d31ff0a41a..5d31ff0a41a 100644
--- a/source/nsswitch/winbindd_async.c
+++ b/source/winbindd/winbindd_async.c
diff --git a/source/nsswitch/winbindd_cache.c b/source/winbindd/winbindd_cache.c
index e5090dfacf5..e5090dfacf5 100644
--- a/source/nsswitch/winbindd_cache.c
+++ b/source/winbindd/winbindd_cache.c
diff --git a/source/nsswitch/winbindd_ccache_access.c b/source/winbindd/winbindd_ccache_access.c
index 99c5c0c4d1e..99c5c0c4d1e 100644
--- a/source/nsswitch/winbindd_ccache_access.c
+++ b/source/winbindd/winbindd_ccache_access.c
diff --git a/source/nsswitch/winbindd_cm.c b/source/winbindd/winbindd_cm.c
index 5d74f24f19e..e12b13cbbd1 100644
--- a/source/nsswitch/winbindd_cm.c
+++ b/source/winbindd/winbindd_cm.c
@@ -1715,6 +1715,16 @@ static void set_dc_type_and_flags_connect( struct winbindd_domain *domain )
DEBUG(5, ("set_dc_type_and_flags_connect: rpccli_ds_getprimarydominfo "
"on domain %s failed: (%s)\n",
domain->name, nt_errstr(result)));
+
+ /* older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for
+ * every opcode on the LSARPC_DS pipe, continue with
+ * no_lsarpc_ds mode here as well to get domain->initialized
+ * set - gd */
+
+ if (NT_STATUS_V(result) == DCERPC_FAULT_OP_RNG_ERROR) {
+ goto no_lsarpc_ds;
+ }
+
return;
}
@@ -2151,7 +2161,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
return NT_STATUS_OK;
}
- if (domain->primary && !get_trust_pw(domain->name, mach_pwd, &sec_chan_type)) {
+ if ((IS_DC || domain->primary) && !get_trust_pw(domain->name, mach_pwd, &sec_chan_type)) {
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
}
@@ -2161,7 +2171,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
return result;
}
- if ( !domain->primary ) {
+ if ((!IS_DC) && (!domain->primary)) {
/* Clear the schannel request bit and drop down */
neg_flags &= ~NETLOGON_NEG_SCHANNEL;
goto no_schannel;
diff --git a/source/nsswitch/winbindd_cred_cache.c b/source/winbindd/winbindd_cred_cache.c
index 65dcbe5a00b..65dcbe5a00b 100644
--- a/source/nsswitch/winbindd_cred_cache.c
+++ b/source/winbindd/winbindd_cred_cache.c
diff --git a/source/nsswitch/winbindd_creds.c b/source/winbindd/winbindd_creds.c
index 62facb67698..62facb67698 100644
--- a/source/nsswitch/winbindd_creds.c
+++ b/source/winbindd/winbindd_creds.c
diff --git a/source/nsswitch/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index 05676682f9a..d9a42c31dc1 100644
--- a/source/nsswitch/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -468,9 +468,8 @@ static void child_process_request(struct winbindd_domain *domain,
state->response.result = WINBINDD_ERROR;
state->response.length = sizeof(struct winbindd_response);
- state->mem_ctx = talloc_init("winbind request");
- if (state->mem_ctx == NULL)
- return;
+ /* as all requests in the child are sync, we can use talloc_tos() */
+ state->mem_ctx = talloc_tos();
/* Process command */
@@ -488,8 +487,6 @@ static void child_process_request(struct winbindd_domain *domain,
(int)state->request.cmd ));
state->response.result = WINBINDD_ERROR;
}
-
- talloc_destroy(state->mem_ctx);
}
void setup_domain_child(struct winbindd_domain *domain,
@@ -861,7 +858,7 @@ static const char *collect_onlinestatus(TALLOC_CTX *mem_ctx)
}
for (domain = domain_list(); domain; domain = domain->next) {
- if ((buf = talloc_asprintf_append(buf, "%s:%s ",
+ if ((buf = talloc_asprintf_append_buffer(buf, "%s:%s ",
domain->name,
domain->online ?
"Online":"Offline")) == NULL) {
@@ -869,7 +866,7 @@ static const char *collect_onlinestatus(TALLOC_CTX *mem_ctx)
}
}
- buf = talloc_asprintf_append(buf, "\n");
+ buf = talloc_asprintf_append_buffer(buf, "\n");
DEBUG(5,("collect_onlinestatus: %s", buf));
diff --git a/source/nsswitch/winbindd_group.c b/source/winbindd/winbindd_group.c
index 9a4b02f7343..9a4b02f7343 100644
--- a/source/nsswitch/winbindd_group.c
+++ b/source/winbindd/winbindd_group.c
diff --git a/source/nsswitch/winbindd_misc.c b/source/winbindd/winbindd_misc.c
index 9c3f6345344..5513e1790ba 100644
--- a/source/nsswitch/winbindd_misc.c
+++ b/source/winbindd/winbindd_misc.c
@@ -209,12 +209,21 @@ enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *
void winbindd_getdcname(struct winbindd_cli_state *state)
{
+ struct winbindd_domain *domain;
+
state->request.domain_name
[sizeof(state->request.domain_name)-1] = '\0';
DEBUG(3, ("[%5lu]: Get DC name for %s\n", (unsigned long)state->pid,
state->request.domain_name));
+ domain = find_domain_from_name_noinit(state->request.domain_name);
+ if (domain && domain->internal) {
+ fstrcpy(state->response.data.dc_name, global_myname());
+ request_ok(state);
+ return;
+ }
+
sendto_domain(state, find_our_domain());
}
@@ -227,6 +236,7 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain,
NTSTATUS result;
WERROR werr;
unsigned int orig_timeout;
+ struct winbindd_domain *req_domain;
state->request.domain_name
[sizeof(state->request.domain_name)-1] = '\0';
@@ -246,9 +256,18 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain,
orig_timeout = cli_set_timeout(netlogon_pipe->cli, 35000);
- werr = rpccli_netlogon_getanydcname(netlogon_pipe, state->mem_ctx, domain->dcname,
- state->request.domain_name,
- dcname_slash);
+ req_domain = find_domain_from_name_noinit(state->request.domain_name);
+ if (req_domain == domain) {
+ werr = rpccli_netlogon_getdcname(netlogon_pipe, state->mem_ctx,
+ domain->dcname,
+ state->request.domain_name,
+ dcname_slash);
+ } else {
+ werr = rpccli_netlogon_getanydcname(netlogon_pipe, state->mem_ctx,
+ domain->dcname,
+ state->request.domain_name,
+ dcname_slash);
+ }
/* And restore our original timeout. */
cli_set_timeout(netlogon_pipe->cli, orig_timeout);
@@ -410,7 +429,7 @@ static void sequence_recv(void *private_data, BOOL success)
uint32 seq = DOM_SEQUENCE_NONE;
if ((success) && (state->response->result == WINBINDD_OK))
- seq = state->response->data.domain_info.sequence_number;
+ seq = state->response->data.sequence_number;
if (seq == DOM_SEQUENCE_NONE) {
state->extra_data = talloc_asprintf(state->mem_ctx,
@@ -459,7 +478,7 @@ enum winbindd_result winbindd_dual_show_sequence(struct winbindd_domain *domain,
domain->methods->sequence_number(domain, &domain->sequence_number);
- state->response.data.domain_info.sequence_number =
+ state->response.data.sequence_number =
domain->sequence_number;
return WINBINDD_OK;
@@ -519,8 +538,6 @@ void winbindd_domain_info(struct winbindd_cli_state *state)
domain->active_directory;
state->response.data.domain_info.primary =
domain->primary;
- state->response.data.domain_info.sequence_number =
- domain->sequence_number;
request_ok(state);
}
@@ -554,8 +571,6 @@ static void domain_info_init_recv(void *private_data, BOOL success)
domain->active_directory;
state->response.data.domain_info.primary =
domain->primary;
- state->response.data.domain_info.sequence_number =
- domain->sequence_number;
request_ok(state);
}
diff --git a/source/nsswitch/winbindd_pam.c b/source/winbindd/winbindd_pam.c
index 5672e398712..78128521c44 100644
--- a/source/nsswitch/winbindd_pam.c
+++ b/source/winbindd/winbindd_pam.c
@@ -7,17 +7,17 @@
Copyright (C) Tim Potter 2001
Copyright (C) Andrew Bartlett 2001-2002
Copyright (C) Guenther Deschner 2005
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,23 +27,23 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-static NTSTATUS append_info3_as_txt(TALLOC_CTX *mem_ctx,
- struct winbindd_cli_state *state,
- NET_USER_INFO_3 *info3)
+static NTSTATUS append_info3_as_txt(TALLOC_CTX *mem_ctx,
+ struct winbindd_cli_state *state,
+ NET_USER_INFO_3 *info3)
{
fstring str_sid;
- state->response.data.auth.info3.logon_time =
+ state->response.data.auth.info3.logon_time =
nt_time_to_unix(info3->logon_time);
- state->response.data.auth.info3.logoff_time =
+ state->response.data.auth.info3.logoff_time =
nt_time_to_unix(info3->logoff_time);
- state->response.data.auth.info3.kickoff_time =
+ state->response.data.auth.info3.kickoff_time =
nt_time_to_unix(info3->kickoff_time);
- state->response.data.auth.info3.pass_last_set_time =
+ state->response.data.auth.info3.pass_last_set_time =
nt_time_to_unix(info3->pass_last_set_time);
- state->response.data.auth.info3.pass_can_change_time =
+ state->response.data.auth.info3.pass_can_change_time =
nt_time_to_unix(info3->pass_can_change_time);
- state->response.data.auth.info3.pass_must_change_time =
+ state->response.data.auth.info3.pass_must_change_time =
nt_time_to_unix(info3->pass_must_change_time);
state->response.data.auth.info3.logon_count = info3->logon_count;
@@ -60,30 +60,38 @@ static NTSTATUS append_info3_as_txt(TALLOC_CTX *mem_ctx,
state->response.data.auth.info3.acct_flags = info3->acct_flags;
state->response.data.auth.info3.num_other_sids = info3->num_other_sids;
- unistr2_to_ascii(state->response.data.auth.info3.user_name,
- &info3->uni_user_name, -1);
- unistr2_to_ascii(state->response.data.auth.info3.full_name,
- &info3->uni_full_name, -1);
- unistr2_to_ascii(state->response.data.auth.info3.logon_script,
- &info3->uni_logon_script, -1);
- unistr2_to_ascii(state->response.data.auth.info3.profile_path,
- &info3->uni_profile_path, -1);
- unistr2_to_ascii(state->response.data.auth.info3.home_dir,
- &info3->uni_home_dir, -1);
- unistr2_to_ascii(state->response.data.auth.info3.dir_drive,
- &info3->uni_dir_drive, -1);
-
- unistr2_to_ascii(state->response.data.auth.info3.logon_srv,
- &info3->uni_logon_srv, -1);
- unistr2_to_ascii(state->response.data.auth.info3.logon_dom,
- &info3->uni_logon_dom, -1);
+ unistr2_to_ascii(state->response.data.auth.info3.user_name,
+ &info3->uni_user_name,
+ sizeof(state->response.data.auth.info3.user_name));
+ unistr2_to_ascii(state->response.data.auth.info3.full_name,
+ &info3->uni_full_name,
+ sizeof(state->response.data.auth.info3.full_name));
+ unistr2_to_ascii(state->response.data.auth.info3.logon_script,
+ &info3->uni_logon_script,
+ sizeof(state->response.data.auth.info3.logon_script));
+ unistr2_to_ascii(state->response.data.auth.info3.profile_path,
+ &info3->uni_profile_path,
+ sizeof(state->response.data.auth.info3.profile_path));
+ unistr2_to_ascii(state->response.data.auth.info3.home_dir,
+ &info3->uni_home_dir,
+ sizeof(state->response.data.auth.info3.home_dir));
+ unistr2_to_ascii(state->response.data.auth.info3.dir_drive,
+ &info3->uni_dir_drive,
+ sizeof(state->response.data.auth.info3.dir_drive));
+
+ unistr2_to_ascii(state->response.data.auth.info3.logon_srv,
+ &info3->uni_logon_srv,
+ sizeof(state->response.data.auth.info3.logon_srv));
+ unistr2_to_ascii(state->response.data.auth.info3.logon_dom,
+ &info3->uni_logon_dom,
+ sizeof(state->response.data.auth.info3.logon_dom));
return NT_STATUS_OK;
}
-static NTSTATUS append_info3_as_ndr(TALLOC_CTX *mem_ctx,
- struct winbindd_cli_state *state,
- NET_USER_INFO_3 *info3)
+static NTSTATUS append_info3_as_ndr(TALLOC_CTX *mem_ctx,
+ struct winbindd_cli_state *state,
+ NET_USER_INFO_3 *info3)
{
prs_struct ps;
uint32 size;
diff --git a/source/nsswitch/winbindd_passdb.c b/source/winbindd/winbindd_passdb.c
index 5c36c0c3279..5c36c0c3279 100644
--- a/source/nsswitch/winbindd_passdb.c
+++ b/source/winbindd/winbindd_passdb.c
diff --git a/source/nsswitch/winbindd_reconnect.c b/source/winbindd/winbindd_reconnect.c
index a1f96a03597..a1f96a03597 100644
--- a/source/nsswitch/winbindd_reconnect.c
+++ b/source/winbindd/winbindd_reconnect.c
diff --git a/source/nsswitch/winbindd_rpc.c b/source/winbindd/winbindd_rpc.c
index 6d2dd35080c..283b4f36e9e 100644
--- a/source/nsswitch/winbindd_rpc.c
+++ b/source/winbindd/winbindd_rpc.c
@@ -96,8 +96,8 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
fstring username, fullname;
uint32 rid = ctr.sam.info1->sam[j].rid_user;
- unistr2_to_ascii( username, &(&ctr.sam.info1->str[j])->uni_acct_name, sizeof(username)-1);
- unistr2_to_ascii( fullname, &(&ctr.sam.info1->str[j])->uni_full_name, sizeof(fullname)-1);
+ unistr2_to_ascii( username, &(&ctr.sam.info1->str[j])->uni_acct_name, sizeof(username));
+ unistr2_to_ascii( fullname, &(&ctr.sam.info1->str[j])->uni_full_name, sizeof(fullname));
(*info)[i].acct_name = talloc_strdup(mem_ctx, username );
(*info)[i].full_name = talloc_strdup(mem_ctx, fullname );
diff --git a/source/nsswitch/winbindd_sid.c b/source/winbindd/winbindd_sid.c
index 48e84d35e5d..48e84d35e5d 100644
--- a/source/nsswitch/winbindd_sid.c
+++ b/source/winbindd/winbindd_sid.c
diff --git a/source/nsswitch/winbindd_user.c b/source/winbindd/winbindd_user.c
index fac2832f564..fac2832f564 100644
--- a/source/nsswitch/winbindd_user.c
+++ b/source/winbindd/winbindd_user.c
diff --git a/source/nsswitch/winbindd_util.c b/source/winbindd/winbindd_util.c
index 3976c13451d..c2fe09eead3 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -187,7 +187,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
}
/* Link to domain list */
- DLIST_ADD(_domain_list, domain);
+ DLIST_ADD_END(_domain_list, domain, struct winbindd_domain *);
wcache_tdc_add_domain( domain );
@@ -632,8 +632,6 @@ static void init_child_recv(void *private_data, BOOL success)
state->response->data.domain_info.native_mode;
state->domain->active_directory =
state->response->data.domain_info.active_directory;
- state->domain->sequence_number =
- state->response->data.domain_info.sequence_number;
init_dc_connection(state->domain);
@@ -678,8 +676,6 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai
= domain->active_directory;
state->response.data.domain_info.primary
= domain->primary;
- state->response.data.domain_info.sequence_number =
- domain->sequence_number;
return WINBINDD_OK;
}
@@ -693,6 +689,25 @@ BOOL init_domain_list(void)
/* Free existing list */
free_domain_list();
+ /* BUILTIN domain */
+
+ domain = add_trusted_domain("BUILTIN", NULL, &passdb_methods,
+ &global_sid_Builtin);
+ if (domain) {
+ setup_domain_child(domain, &domain->child, NULL);
+ }
+
+ /* Local SAM */
+
+ domain = add_trusted_domain(get_global_sam_name(), NULL,
+ &passdb_methods, get_global_sam_sid());
+ if (domain) {
+ if ( role != ROLE_DOMAIN_MEMBER ) {
+ domain->primary = True;
+ }
+ setup_domain_child(domain, &domain->child, NULL);
+ }
+
/* Add ourselves as the first entry. */
if ( role == ROLE_DOMAIN_MEMBER ) {
@@ -719,25 +734,6 @@ BOOL init_domain_list(void)
}
}
- /* Local SAM */
-
- domain = add_trusted_domain(get_global_sam_name(), NULL,
- &passdb_methods, get_global_sam_sid());
- if (domain) {
- if ( role != ROLE_DOMAIN_MEMBER ) {
- domain->primary = True;
- }
- setup_domain_child(domain, &domain->child, NULL);
- }
-
- /* BUILTIN domain */
-
- domain = add_trusted_domain("BUILTIN", NULL, &passdb_methods,
- &global_sid_Builtin);
- if (domain) {
- setup_domain_child(domain, &domain->child, NULL);
- }
-
return True;
}
@@ -1159,6 +1155,11 @@ void fill_domain_username(fstring name, const char *domain, const char *user, BO
* Winbindd socket accessor functions
*/
+const char *get_winbind_pipe_dir(void)
+{
+ return lp_parm_const_string(-1, "winbindd", "socket dir", WINBINDD_SOCKET_DIR);
+}
+
char *get_winbind_priv_pipe_dir(void)
{
return lock_path(WINBINDD_PRIV_SOCKET_SUBDIR);
@@ -1173,7 +1174,7 @@ int open_winbindd_socket(void)
{
if (_winbindd_socket == -1) {
_winbindd_socket = create_pipe_sock(
- WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME, 0755);
+ get_winbind_pipe_dir(), WINBINDD_SOCKET_NAME, 0755);
DEBUG(10, ("open_winbindd_socket: opened socket fd %d\n",
_winbindd_socket));
}
diff --git a/source/nsswitch/winbindd_wins.c b/source/winbindd/winbindd_wins.c
index f84dfdf2deb..f84dfdf2deb 100644
--- a/source/nsswitch/winbindd_wins.c
+++ b/source/winbindd/winbindd_wins.c