From: Jelmer Vernooij Date: Sun, 19 Jul 2009 15:39:23 +0000 (+0200) Subject: Merge branch 'master' of git://git.samba.org/samba X-Git-Tag: tevent-0.9.8~710^2~41 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=8557d14f65212faceb3e7223818b34b8869a0470;hp=7a765b65b739c38ea1e3cfc136c92d2fb5ed4fa7;p=gd%2Fsamba-autobuild%2F.git Merge branch 'master' of git://git.samba.org/samba --- diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index 2d90d9c7e85..a3a26ef43e4 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -103,6 +103,7 @@ AC_CHECK_HEADERS(sys/time.h time.h) AC_CHECK_HEADERS(stdarg.h vararg.h) AC_CHECK_HEADERS(sys/mount.h mntent.h) AC_CHECK_HEADERS(stropts.h) +AC_CHECK_HEADERS(unix.h) AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror) AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename) diff --git a/lib/replace/replace.h b/lib/replace/replace.h index fe1f732acb2..2db6aa1226c 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -258,6 +258,10 @@ char *rep_realpath(const char *path, char *resolved_path); int rep_lchown(const char *fname,uid_t uid,gid_t gid); #endif +#ifdef HAVE_UNIX_H +#include +#endif + #ifndef HAVE_SETLINEBUF #define setlinebuf rep_setlinebuf void rep_setlinebuf(FILE *); diff --git a/lib/util/genrand.c b/lib/util/genrand.c index cd1823a9a07..c51f9384b83 100644 --- a/lib/util/genrand.c +++ b/lib/util/genrand.c @@ -294,6 +294,7 @@ _PUBLIC_ uint32_t generate_random(void) _PUBLIC_ bool check_password_quality(const char *s) { int has_digit=0, has_capital=0, has_lower=0, has_special=0, has_high=0; + char* reals = s; while (*s) { if (isdigit((unsigned char)*s)) { has_digit |= 1; @@ -310,7 +311,7 @@ _PUBLIC_ bool check_password_quality(const char *s) } return ((has_digit + has_lower + has_capital + has_special) >= 3 - || (has_high > strlen(s)/2)); + || (has_high > strlen(reals)/2)); } /** diff --git a/lib/util/tests/genrand.c b/lib/util/tests/genrand.c index 5fe229c089e..20a20ac7fa1 100644 --- a/lib/util/tests/genrand.c +++ b/lib/util/tests/genrand.c @@ -40,6 +40,8 @@ static bool test_check_password_quality(struct torture_context *tctx) torture_assert(tctx, !check_password_quality("aaaaaaaaaaaa"), "same char password"); torture_assert(tctx, !check_password_quality("BLA"), "multiple upcases password"); torture_assert(tctx, !check_password_quality("123"), "digits only"); + torture_assert(tctx, !check_password_quality("matthiéu"), "not enough high symbols"); + torture_assert(tctx, check_password_quality("abcdééàçè"), "valid"); torture_assert(tctx, check_password_quality("A2e"), "valid"); torture_assert(tctx, check_password_quality("BA2eLi443"), "valid"); return true; diff --git a/lib/util/util_file.c b/lib/util/util_file.c index 0275e78c54f..7466004e5ce 100644 --- a/lib/util/util_file.c +++ b/lib/util/util_file.c @@ -380,6 +380,7 @@ _PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length) return false; } if (write(fd, packet, length) != (size_t)length) { + close(fd); return false; } close(fd); diff --git a/librpc/ndr_standard.pc.in b/librpc/ndr_standard.pc.in new file mode 100644 index 00000000000..80eace1befb --- /dev/null +++ b/librpc/ndr_standard.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: ndr-standard +Description: NDR marshallers for the standard set of DCE/RPC interfaces +Requires: ndr +Version: 0.0.1 +Libs: -L${libdir} -lndr-standard +Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 -D_GNU_SOURCE=1 diff --git a/source4/configure.ac b/source4/configure.ac index 1930f4b6c75..7c5f310aa93 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -37,6 +37,7 @@ m4_include(client/config.m4) AC_CONFIG_FILES(lib/registry/registry.pc) AC_CONFIG_FILES(librpc/dcerpc.pc) AC_CONFIG_FILES(../librpc/ndr.pc) +AC_CONFIG_FILES(../librpc/ndr_standard.pc) AC_CONFIG_FILES(../lib/torture/torture.pc) AC_CONFIG_FILES(auth/gensec/gensec.pc) AC_CONFIG_FILES(param/samba-hostconfig.pc) diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c index 4e28c8a1496..9ed06a91309 100644 --- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c +++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c @@ -741,15 +741,15 @@ static int la_op_search_callback(struct ldb_request *req, if (ret != LDB_SUCCESS) { return ldb_module_done(ac->req, NULL, NULL, ret); } - break; - case LDB_RENAME: - + return ret; + + case LDB_RENAME: + /* start the mod requests chain */ ret = la_do_mod_request(ac); if (ret != LDB_SUCCESS) { return ldb_module_done(ac->req, NULL, NULL, ret); - } - + } return ret; default: @@ -759,7 +759,6 @@ static int la_op_search_callback(struct ldb_request *req, return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } - return LDB_SUCCESS; } talloc_free(ares); diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index ef641ac18bf..c7fa636aa80 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -1400,33 +1400,33 @@ static int setup_password_fields(struct setup_password_fields_io *io) } ret = setup_kerberos_keys(io); - if (ret != 0) { + if (ret != LDB_SUCCESS) { return ret; } } ret = setup_nt_fields(io); - if (ret != 0) { + if (ret != LDB_SUCCESS) { return ret; } ret = setup_lm_fields(io); - if (ret != 0) { + if (ret != LDB_SUCCESS) { return ret; } ret = setup_supplemental_field(io); - if (ret != 0) { + if (ret != LDB_SUCCESS) { return ret; } ret = setup_last_set_field(io); - if (ret != 0) { + if (ret != LDB_SUCCESS) { return ret; } ret = setup_kvno_field(io); - if (ret != 0) { + if (ret != LDB_SUCCESS) { return ret; } @@ -1649,6 +1649,7 @@ static int get_domain_data_callback(struct ldb_request *req, if (ret != LDB_SUCCESS) { return ldb_module_done(ac->req, NULL, NULL, ret); } + break; case LDB_REPLY_REFERRAL: /* ignore */ diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c index 925806985e1..24d86abf485 100644 --- a/source4/lib/registry/patchfile.c +++ b/source4/lib/registry/patchfile.c @@ -316,6 +316,7 @@ _PUBLIC_ WERROR reg_diff_load(const char *filename, if (read(fd, &hdr, 4) != 4) { DEBUG(0, ("Error reading registry patch file `%s'\n", filename)); + close(fd); return WERR_GENERAL_FAILURE; } diff --git a/source4/lib/samba3/README b/source4/lib/samba3/README index 83520f673d2..3f6553f7e8a 100644 --- a/source4/lib/samba3/README +++ b/source4/lib/samba3/README @@ -3,6 +3,3 @@ Samba3 import, migration and compatibility. For example, the first file in this directory (smbpasswd.c) handles portions of the smbpasswd file format. - -The other files in this directory support reading the various -TDB databases from Samba3. diff --git a/source4/lib/samba3/STATUS b/source4/lib/samba3/STATUS deleted file mode 100644 index e4644526df0..00000000000 --- a/source4/lib/samba3/STATUS +++ /dev/null @@ -1,68 +0,0 @@ ---- Samba3 -> Samba4 Upgrade --- -(C) 2005 Jelmer Vernooij -Published under the GNU GPL - -Sponsored by the Google Summer of Code program (http://code.google.com/summerofcode.html) -Mentored by Andrew Bartlett -Thanks! - -Done: - - Reading wins.dat - - Reading registry.tdb - - Reading passdb.tdb - - Reading account_policy.tdb - - Reading group_mappings.tdb - - Reading winbindd_idmap.tdb - - Reading share_info.tdb - - Reading secrets.tdb - - Reading smbpasswd - - Reading + writing (generic) smb.conf files - - Testsuite for read support mentioned above - - Console utility for dumping Samba information - - Import user accounts in Samba4 - - Import groups in Samba4 - - Import secrets in Samba4 - - Import WINS data in Samba4 - - Dump idmap data to LDB - - Import registry keys/values in Samba4 - - Import account policies in Samba4 - - Testsuite for upgrade - - Console utility from upgrading from Samba3 -> Samba4 - - SWAT (Web interface) support for upgrading from Samba3 -> Samba4 - - LDB generic mapping module - - (Experimental) Samba4 LDB <-> Samba3 LDAP mapping module based on LDB generic mapping module - - Testsuite for Samba4 LDB <-> Samba3 LDAP mapping module - -Source files: -source/lib/ldb/modules/ldb_map.c -source/lib/ldb/modules/ldb_map.h -source/lib/samba3/group.c -source/lib/samba3/idmap.c -source/lib/samba3/policy.c -source/lib/samba3/registry.c -source/lib/samba3/samba3.c -source/lib/samba3/secrets.c -source/lib/samba3/share_info.c -source/lib/samba3/smbpasswd.c -source/lib/samba3/tdbsam.c -source/lib/samba3/winsdb.c -source/lib/samba3/samba3.h -source/scripting/libjs/upgrade.js -source/scripting/ejs/smbcalls_param.c -source/scripting/ejs/smbcalls_samba3.c -source/param/generic.c -source/param/generic.h -testdata/samba3/verify -testprogs/ejs/samba3sam -source/setup/upgrade -source/scripting/bin/samba3dump -source/dsdb/samdb/ldb_modules/samba3sam.c -source/script/tests/test_s3upgrade.sh -swat/install/samba3.esp - -Known remaining issues: - - [upgrade] Conversion from the smbpasswd/TDB passwords to ntPwdHash / lmPwdHash is broken. Couldn't find out why. - - [ldb_map] Conversion of attribute names in DN's is still a bit dodgy - - [ldb_map] mapped objectClass names may be mentioned multiple times in returned records - - [ldb_map] add/modify support not tested very well with LDAP yet (only LDB+TDB) - - [ldb_map] group membership is not yet mapped (only primaryGroupID / sambaPrimaryGroupSID) diff --git a/source4/lib/samba3/samba3.h b/source4/lib/samba3/samba3.h index 1a0ce041436..87de13f8f89 100644 --- a/source4/lib/samba3/samba3.h +++ b/source4/lib/samba3/samba3.h @@ -22,7 +22,6 @@ #include "librpc/gen_ndr/security.h" #include "librpc/gen_ndr/samr.h" -#include "param/param.h" struct samr_Password *smbpasswd_gethexpwd(TALLOC_CTX *mem_ctx, const char *p); char *smbpasswd_sethexpwd(TALLOC_CTX *mem_ctx, struct samr_Password *pwd, uint16_t acb_info); diff --git a/source4/libcli/security/security_token.c b/source4/libcli/security/security_token.c index e1349e06f84..0764dfeb8fa 100644 --- a/source4/libcli/security/security_token.c +++ b/source4/libcli/security/security_token.c @@ -1,7 +1,7 @@ /* Unix SMB/CIFS implementation. - security descriptror utility functions + security descriptor utility functions Copyright (C) Andrew Tridgell 2004 Copyright (C) Stefan Metzmacher 2005 diff --git a/source4/libnet/libnet_samdump.c b/source4/libnet/libnet_samdump.c index 08a2295169b..8092260515b 100644 --- a/source4/libnet/libnet_samdump.c +++ b/source4/libnet/libnet_samdump.c @@ -25,6 +25,7 @@ #include "../lib/util/dlinklist.h" #include "samba3/samba3.h" #include "libcli/security/security.h" +#include "param/param.h" struct samdump_secret { diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index 52c7f3e2d1d..9e3d6b27ea9 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -79,11 +79,6 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_WINSTATION_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winstation.o -[SUBSYSTEM::NDR_ECHO] -PUBLIC_DEPENDENCIES = LIBNDR - -NDR_ECHO_OBJ_FILES = ../librpc/gen_ndr/ndr_echo.o - [SUBSYSTEM::NDR_IRPC] PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY NDR_NBT @@ -114,18 +109,6 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_ORPC NDR_ROT_OBJ_FILES = ../librpc/gen_ndr/ndr_rot.o -[SUBSYSTEM::NDR_LSA] -PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY - -NDR_LSA_OBJ_FILES = ../librpc/gen_ndr/ndr_lsa.o - -PUBLIC_HEADERS += ../librpc/gen_ndr/lsa.h - -[SUBSYSTEM::NDR_DFS] -PUBLIC_DEPENDENCIES = LIBNDR - -NDR_DFS_OBJ_FILES = ../librpc/gen_ndr/ndr_dfs.o - [SUBSYSTEM::NDR_FRSRPC] PUBLIC_DEPENDENCIES = LIBNDR @@ -137,7 +120,7 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_FRSAPI_OBJ_FILES = ../librpc/gen_ndr/ndr_frsapi.o [SUBSYSTEM::NDR_DRSUAPI] -PUBLIC_DEPENDENCIES = LIBNDR NDR_COMPRESSION NDR_SECURITY NDR_SAMR ASN1_UTIL +PUBLIC_DEPENDENCIES = LIBNDR NDR_COMPRESSION NDR_SECURITY NDR_STANDARD ASN1_UTIL NDR_DRSUAPI_OBJ_FILES = ../librpc/gen_ndr/ndr_drsuapi.o ../librpc/ndr/ndr_drsuapi.o @@ -161,13 +144,6 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY NDR_UNIXINFO_OBJ_FILES = ../librpc/gen_ndr/ndr_unixinfo.o -[SUBSYSTEM::NDR_SAMR] -PUBLIC_DEPENDENCIES = LIBNDR NDR_LSA NDR_SECURITY - -NDR_SAMR_OBJ_FILES = ../librpc/gen_ndr/ndr_samr.o - -PUBLIC_HEADERS += $(addprefix ../librpc/gen_ndr/, samr.h ndr_samr.h ndr_samr_c.h) - [SUBSYSTEM::NDR_NFS4ACL] PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY @@ -182,35 +158,6 @@ NDR_SPOOLSS_OBJ_FILES = ../librpc/gen_ndr/ndr_spoolss.o NDR_SPOOLSS_BUF_OBJ_FILES = ../librpc/ndr/ndr_spoolss_buf.o -[SUBSYSTEM::NDR_WKSSVC] -PUBLIC_DEPENDENCIES = LIBNDR NDR_SRVSVC NDR_SECURITY - -NDR_WKSSVC_OBJ_FILES = ../librpc/gen_ndr/ndr_wkssvc.o - -[SUBSYSTEM::NDR_SRVSVC] -PUBLIC_DEPENDENCIES = LIBNDR NDR_SVCCTL NDR_SECURITY - -NDR_SRVSVC_OBJ_FILES = ../librpc/gen_ndr/ndr_srvsvc.o - -[SUBSYSTEM::NDR_SVCCTL] -PUBLIC_DEPENDENCIES = LIBNDR - -NDR_SVCCTL_OBJ_FILES = ../librpc/gen_ndr/ndr_svcctl.o ../librpc/ndr/ndr_svcctl.o - -PUBLIC_HEADERS += $(addprefix ../librpc/gen_ndr/, ndr_svcctl.h svcctl.h) - -[SUBSYSTEM::NDR_ATSVC] -PUBLIC_DEPENDENCIES = LIBNDR - -NDR_ATSVC_OBJ_FILES = ../librpc/gen_ndr/ndr_atsvc.o - -PUBLIC_HEADERS += $(addprefix ../librpc/gen_ndr/, atsvc.h ndr_atsvc.h) - -[SUBSYSTEM::NDR_EVENTLOG] -PUBLIC_DEPENDENCIES = LIBNDR NDR_LSA - -NDR_EVENTLOG_OBJ_FILES = ../librpc/gen_ndr/ndr_eventlog.o - [SUBSYSTEM::NDR_EPMAPPER] PUBLIC_DEPENDENCIES = LIBNDR @@ -236,16 +183,6 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_WINS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wins.o -[SUBSYSTEM::NDR_WINREG] -PUBLIC_DEPENDENCIES = LIBNDR NDR_INITSHUTDOWN NDR_SECURITY - -NDR_WINREG_OBJ_FILES = ../librpc/gen_ndr/ndr_winreg.o - -[SUBSYSTEM::NDR_INITSHUTDOWN] -PUBLIC_DEPENDENCIES = LIBNDR - -NDR_INITSHUTDOWN_OBJ_FILES = ../librpc/gen_ndr/ndr_initshutdown.o - [SUBSYSTEM::NDR_MGMT] PUBLIC_DEPENDENCIES = LIBNDR @@ -291,18 +228,6 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_SCERPC_OBJ_FILES = ../librpc/gen_ndr/ndr_scerpc.o -[SUBSYSTEM::NDR_NTSVCS] -PUBLIC_DEPENDENCIES = LIBNDR - -NDR_NTSVCS_OBJ_FILES = ../librpc/gen_ndr/ndr_ntsvcs.o - -[SUBSYSTEM::NDR_NETLOGON] -PUBLIC_DEPENDENCIES = LIBNDR NDR_SAMR NDR_LSA NDR_SECURITY - -NDR_NETLOGON_OBJ_FILES = ../librpc/gen_ndr/ndr_netlogon.o ../librpc/ndr/ndr_netlogon.o - -PUBLIC_HEADERS += ../librpc/gen_ndr/netlogon.h - [SUBSYSTEM::NDR_TRKWKS] PUBLIC_DEPENDENCIES = LIBNDR @@ -314,7 +239,7 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_KEYSVC_OBJ_FILES = ../librpc/gen_ndr/ndr_keysvc.o [SUBSYSTEM::NDR_KRB5PAC] -PUBLIC_DEPENDENCIES = LIBNDR NDR_NETLOGON NDR_SECURITY +PUBLIC_DEPENDENCIES = LIBNDR NDR_STANDARD NDR_SECURITY NDR_KRB5PAC_OBJ_FILES = ../librpc/gen_ndr/ndr_krb5pac.o ../librpc/ndr/ndr_krb5pac.o @@ -339,7 +264,7 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT NDR_SCHANNEL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_schannel.o [SUBSYSTEM::NDR_NBT] -PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT_BUF NDR_SVCCTL NDR_SECURITY NDR_SAMR LIBCLI_NDR_NETLOGON +PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT_BUF NDR_SECURITY NDR_STANDARD LIBCLI_NDR_NETLOGON NDR_NBT_OBJ_FILES = ../librpc/gen_ndr/ndr_nbt.o @@ -356,7 +281,7 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT NDR_WINSREPL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winsrepl.o [SUBSYSTEM::NDR_WINBIND] -PUBLIC_DEPENDENCIES = LIBNDR NDR_NETLOGON +PUBLIC_DEPENDENCIES = LIBNDR NDR_STANDARD NDR_WINBIND_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winbind.o #PUBLIC_HEADERS += $(gen_ndrsrcdir)/winbind.h @@ -374,17 +299,45 @@ $(gen_ndrsrcdir)/tables.c: $(IDL_NDR_PARSE_H_FILES) @$(PERL) ../librpc/tables.pl --output=$@ $^ > $(gen_ndrsrcdir)/tables.x @mv $(gen_ndrsrcdir)/tables.x $@ +[LIBRARY::NDR_STANDARD] +PUBLIC_DEPENDENCIES = LIBNDR +PRIVATE_DEPENDENCIES = NDR_SECURITY + +NDR_STANDARD_OBJ_FILES = ../librpc/gen_ndr/ndr_echo.o \ + ../librpc/gen_ndr/ndr_lsa.o \ + ../librpc/gen_ndr/ndr_samr.o \ + ../librpc/gen_ndr/ndr_netlogon.o \ + ../librpc/ndr/ndr_netlogon.o \ + ../librpc/gen_ndr/ndr_dfs.o \ + ../librpc/gen_ndr/ndr_atsvc.o \ + ../librpc/gen_ndr/ndr_wkssvc.o \ + ../librpc/gen_ndr/ndr_srvsvc.o \ + ../librpc/gen_ndr/ndr_svcctl.o \ + ../librpc/ndr/ndr_svcctl.o \ + ../librpc/gen_ndr/ndr_winreg.o \ + ../librpc/gen_ndr/ndr_initshutdown.o \ + ../librpc/gen_ndr/ndr_eventlog.o \ + ../librpc/gen_ndr/ndr_ntsvcs.o + +PC_FILES += $(librpcsrcdir)/ndr_standard.pc + +PUBLIC_HEADERS += $(addprefix ../librpc/gen_ndr/, samr.h ndr_samr.h lsa.h netlogon.h atsvc.h ndr_atsvc.h ndr_svcctl.h svcctl.h) + +NDR_STANDARD_VERSION = 0.0.1 +NDR_STANDARD_SOVERSION = 0 + [SUBSYSTEM::NDR_TABLE] PUBLIC_DEPENDENCIES = \ - NDR_AUDIOSRV NDR_ECHO NDR_DCERPC \ - NDR_DSBACKUP NDR_EFS NDR_LSA NDR_DFS NDR_DRSUAPI \ - NDR_POLICYAGENT NDR_UNIXINFO NDR_SAMR NDR_SPOOLSS NDR_WKSSVC NDR_SRVSVC NDR_ATSVC \ - NDR_EVENTLOG NDR_EPMAPPER NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINS \ - NDR_WINREG NDR_MGMT NDR_PROTECTED_STORAGE NDR_OXIDRESOLVER \ - NDR_REMACT NDR_WZCSVC NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_NTSVCS \ - NDR_NETLOGON NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC NDR_XATTR NDR_SCHANNEL \ - NDR_ROT NDR_DRSBLOBS NDR_SVCCTL NDR_NBT NDR_WINSREPL NDR_SECURITY \ - NDR_INITSHUTDOWN NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_OPENDB \ + NDR_STANDARD \ + NDR_AUDIOSRV \ + NDR_DSBACKUP NDR_EFS NDR_DRSUAPI \ + NDR_POLICYAGENT NDR_UNIXINFO NDR_SPOOLSS \ + NDR_EPMAPPER NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINS \ + NDR_MGMT NDR_PROTECTED_STORAGE NDR_OXIDRESOLVER \ + NDR_REMACT NDR_WZCSVC NDR_BROWSER NDR_W32TIME NDR_SCERPC \ + NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC NDR_XATTR NDR_SCHANNEL \ + NDR_ROT NDR_DRSBLOBS NDR_NBT NDR_WINSREPL NDR_SECURITY \ + NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_OPENDB \ NDR_SASL_HELPERS NDR_NOTIFY NDR_WINBIND NDR_FRSRPC NDR_FRSAPI NDR_NFS4ACL NDR_NTP_SIGND \ NDR_DCOM NDR_WMI NDR_NAMED_PIPE_AUTH @@ -401,7 +354,7 @@ PUBLIC_DEPENDENCIES = NDR_AUDIOSRV dcerpc RPC_NDR_AUDIOSRV_OBJ_FILES = ../librpc/gen_ndr/ndr_audiosrv_c.o [SUBSYSTEM::RPC_NDR_ECHO] -PUBLIC_DEPENDENCIES = dcerpc NDR_ECHO +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_ECHO_OBJ_FILES = ../librpc/gen_ndr/ndr_echo_c.o @@ -416,12 +369,12 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_EFS RPC_NDR_EFS_OBJ_FILES = ../librpc/gen_ndr/ndr_efs_c.o [SUBSYSTEM::RPC_NDR_LSA] -PUBLIC_DEPENDENCIES = dcerpc NDR_LSA +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_LSA_OBJ_FILES = ../librpc/gen_ndr/ndr_lsa_c.o [SUBSYSTEM::RPC_NDR_DFS] -PUBLIC_DEPENDENCIES = dcerpc NDR_DFS +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_DFS_OBJ_FILES = ../librpc/gen_ndr/ndr_dfs_c.o @@ -456,7 +409,7 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_IRPC RPC_NDR_IRPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_irpc_c.o [LIBRARY::dcerpc_samr] -PUBLIC_DEPENDENCIES = dcerpc NDR_SAMR +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD PC_FILES += $(librpcsrcdir)/dcerpc_samr.pc @@ -464,13 +417,15 @@ dcerpc_samr_VERSION = 0.0.1 dcerpc_samr_SOVERSION = 0 dcerpc_samr_OBJ_FILES = ../librpc/gen_ndr/ndr_samr_c.o +PUBLIC_HEADERS += ../librpc/gen_ndr/ndr_samr_c.h + [SUBSYSTEM::RPC_NDR_SPOOLSS] PUBLIC_DEPENDENCIES = dcerpc NDR_SPOOLSS RPC_NDR_SPOOLSS_OBJ_FILES = ../librpc/gen_ndr/ndr_spoolss_c.o [SUBSYSTEM::RPC_NDR_WKSSVC] -PUBLIC_DEPENDENCIES = dcerpc NDR_WKSSVC +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_WKSSVC_OBJ_FILES = ../librpc/gen_ndr/ndr_wkssvc_c.o @@ -480,14 +435,14 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_SRVSVC RPC_NDR_SRVSVC_OBJ_FILES = ../librpc/gen_ndr/ndr_srvsvc_c.o [SUBSYSTEM::RPC_NDR_SVCCTL] -PUBLIC_DEPENDENCIES = dcerpc NDR_SVCCTL +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_SVCCTL_OBJ_FILES = ../librpc/gen_ndr/ndr_svcctl_c.o PUBLIC_HEADERS += ../librpc/gen_ndr/ndr_svcctl_c.h [LIBRARY::dcerpc_atsvc] -PUBLIC_DEPENDENCIES = dcerpc NDR_ATSVC +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD dcerpc_atsvc_VERSION = 0.0.1 dcerpc_atsvc_SOVERSION = 0 @@ -498,7 +453,7 @@ PC_FILES += $(librpcsrcdir)/dcerpc_atsvc.pc PUBLIC_HEADERS += ../librpc/gen_ndr/ndr_atsvc_c.h [SUBSYSTEM::RPC_NDR_EVENTLOG] -PUBLIC_DEPENDENCIES = dcerpc NDR_EVENTLOG +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_EVENTLOG_OBJ_FILES = ../librpc/gen_ndr/ndr_eventlog_c.o @@ -528,12 +483,12 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_WINS RPC_NDR_WINS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wins_c.o [SUBSYSTEM::RPC_NDR_WINREG] -PUBLIC_DEPENDENCIES = dcerpc NDR_WINREG +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_WINREG_OBJ_FILES = ../librpc/gen_ndr/ndr_winreg_c.o [SUBSYSTEM::RPC_NDR_INITSHUTDOWN] -PUBLIC_DEPENDENCIES = dcerpc NDR_INITSHUTDOWN +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_INITSHUTDOWN_OBJ_FILES = ../librpc/gen_ndr/ndr_initshutdown_c.o @@ -573,12 +528,12 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_SCERPC RPC_NDR_SCERPC_OBJ_FILES = ../librpc/gen_ndr/ndr_scerpc_c.o [SUBSYSTEM::RPC_NDR_NTSVCS] -PUBLIC_DEPENDENCIES = dcerpc NDR_NTSVCS +PUBLIC_DEPENDENCIES = dcerpc NDR_STANDARD RPC_NDR_NTSVCS_OBJ_FILES = ../librpc/gen_ndr/ndr_ntsvcs_c.o [SUBSYSTEM::RPC_NDR_NETLOGON] -PUBLIC_DEPENDENCIES = NDR_NETLOGON +PUBLIC_DEPENDENCIES = NDR_STANDARD RPC_NDR_NETLOGON_OBJ_FILES = ../librpc/gen_ndr/ndr_netlogon_c.o diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c index 3ef341d61ad..97c306f7c35 100644 --- a/source4/ntvfs/unixuid/vfs_unixuid.c +++ b/source4/ntvfs/unixuid/vfs_unixuid.c @@ -310,9 +310,9 @@ static NTSTATUS unixuid_connect(struct ntvfs_module_context *ntvfs, return NT_STATUS_INTERNAL_ERROR; } - ntvfs->private_data = priv; priv->last_sec_ctx = NULL; priv->last_token = NULL; + ntvfs->private_data = priv; tevent_loop_set_nesting_hook(ntvfs->ctx->event_ctx, unixuid_event_nesting_hook, diff --git a/source4/rpc_server/config.mk b/source4/rpc_server/config.mk index f3dc0741253..32669db37ad 100644 --- a/source4/rpc_server/config.mk +++ b/source4/rpc_server/config.mk @@ -19,7 +19,7 @@ PUBLIC_HEADERS += $(rpc_serversrcdir)/common/common.h [MODULE::dcerpc_rpcecho] INIT_FUNCTION = dcerpc_server_rpcecho_init SUBSYSTEM = dcerpc_server -PRIVATE_DEPENDENCIES = NDR_ECHO LIBEVENTS +PRIVATE_DEPENDENCIES = NDR_STANDARD LIBEVENTS # End MODULE dcerpc_rpcecho ################################################ @@ -69,7 +69,7 @@ $(eval $(call proto_header_template,$(rpc_serversrcdir)/srvsvc/proto.h,$(dcerpc_ INIT_FUNCTION = dcerpc_server_wkssvc_init SUBSYSTEM = dcerpc_server PRIVATE_DEPENDENCIES = \ - DCERPC_COMMON NDR_WKSSVC + DCERPC_COMMON NDR_STANDARD # End MODULE dcerpc_wkssvc ################################################ @@ -99,7 +99,7 @@ SUBSYSTEM = dcerpc_server PRIVATE_DEPENDENCIES = \ SAMDB \ DCERPC_COMMON \ - NDR_SAMR + NDR_STANDARD # End MODULE dcesrv_samr ################################################ @@ -114,7 +114,7 @@ INIT_FUNCTION = dcerpc_server_winreg_init SUBSYSTEM = dcerpc_server OUTPUT_TYPE = MERGED_OBJ PRIVATE_DEPENDENCIES = \ - registry NDR_WINREG + registry NDR_STANDARD # End MODULE dcerpc_winreg ################################################ @@ -128,7 +128,7 @@ SUBSYSTEM = dcerpc_server PRIVATE_DEPENDENCIES = \ DCERPC_COMMON \ SCHANNELDB \ - NDR_NETLOGON \ + NDR_STANDARD \ auth_sam \ LIBSAMBA-HOSTCONFIG # End MODULE dcerpc_netlogon @@ -144,7 +144,7 @@ SUBSYSTEM = dcerpc_server PRIVATE_DEPENDENCIES = \ SAMDB \ DCERPC_COMMON \ - NDR_LSA \ + NDR_STANDARD \ LIBCLI_AUTH \ NDR_DSSETUP # End MODULE dcerpc_lsa diff --git a/source4/torture/auth/pac.c b/source4/torture/auth/pac.c index fd54863686c..076120bfeee 100644 --- a/source4/torture/auth/pac.c +++ b/source4/torture/auth/pac.c @@ -29,6 +29,7 @@ #include "libcli/security/security.h" #include "torture/torture.h" #include "auth/auth_sam_reply.h" +#include "param/param.h" static bool torture_pac_self_check(struct torture_context *tctx) { diff --git a/source4/torture/rpc/object_uuid.c b/source4/torture/rpc/object_uuid.c index a70266697e0..53d03a3ce9c 100644 --- a/source4/torture/rpc/object_uuid.c +++ b/source4/torture/rpc/object_uuid.c @@ -35,7 +35,6 @@ static bool test_random_uuid(struct torture_context *torture) { NTSTATUS status; struct dcerpc_pipe *p1, *p2; - struct rpc_request *req; struct GUID uuid; struct dssetup_DsRoleGetPrimaryDomainInformation r1; struct lsa_GetUserName r2;