Rev 557: removed unused makefile var in http://samba.org/~tridge/ctdb
revno: 557 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Wed 2007-07-04 16:52:38 +1000 message: removed unused makefile var modified: Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1 === modified file 'Makefile.in' --- a/Makefile.in 2007-07-04 06:51:13 + +++ b/Makefile.in 2007-07-04 06:52:38 + @@ -43,14 +43,12 @@ $(CTDB_COMMON_OBJ) $(POPT_OBJ) $(UTIL_OBJ) @TALLOC_OBJ@ @TDB_OBJ@ \ @LIBREPLACEOBJ@ $(EXTRA_OBJ) @EVENTS_OBJ@ -CTDB_TAKEOVER_OBJ = - CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o server/ctdb_lockwait.o \ server/ctdb_recoverd.o server/ctdb_recover.o server/ctdb_freeze.o \ server/ctdb_tunables.o server/ctdb_monitor.o server/ctdb_server.o \ server/ctdb_control.o server/ctdb_call.o server/ctdb_ltdb_server.o \ server/ctdb_traverse.o server/eventscript.o server/ctdb_takeover.o \ - $(CTDB_CLIENT_OBJ) $(CTDB_TAKEOVER_OBJ) $(CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@ + $(CTDB_CLIENT_OBJ) $(CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@ TEST_BINS=bin/ctdb_bench bin/ctdb_fetch bin/ctdb_store @INFINIBAND_BINS@ BINS = bin/ctdb bin/scsi_io
Rev 556: - neaten up the command line for killtcp in http://samba.org/~tridge/ctdb
revno: 556 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Wed 2007-07-04 16:51:13 +1000 message: - neaten up the command line for killtcp - split out the event script code into a separate module - get rid of the separate takeover directory removed: takeover/ takeover-20070525071636-a5n1ihghjtppy08r-1 renamed: takeover/ctdb_takeover.c => server/ctdb_takeover.c ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2 takeover/system.c => common/system.c system.c-20070525071636-a5n1ihghjtppy08r-3 modified: Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1 common/ctdb_util.c ctdb_util.c-20061128065342-to93h6eejj5kon81-3 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 tools/ctdb.c ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1 common/system.csystem.c-20070525071636-a5n1ihghjtppy08r-3 Diff too large for email (324, the limit is 200).
Rev 555: more careful checking of lengths in http://samba.org/~tridge/ctdb
revno: 555 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Wed 2007-07-04 16:22:09 +1000 message: more careful checking of lengths modified: takeover/system.c system.c-20070525071636-a5n1ihghjtppy08r-3 === modified file 'takeover/system.c' --- a/takeover/system.c 2007-07-04 03:53:22 + +++ b/takeover/system.c 2007-07-04 06:22:09 + @@ -484,7 +484,7 @@ event_loop_once(ev); ret = recv(s, pkt, RCVPKTSIZE, MSG_TRUNC); - if (ret<40) { + if (ret < sizeof(*eth)+sizeof(*ip)) { continue; } @@ -496,7 +496,7 @@ } /* IP */ - ip = (struct iphdr *)&pkt[14]; + ip = (struct iphdr *)(eth+1); /* We only want IPv4 packets */ if (ip->version != 4) { continue; @@ -519,8 +519,15 @@ continue; } + /* make sure its not a short packet */ + if (offsetof(struct tcphdr, ack_seq) + 4 + + (ip->ihl*4) + sizeof(*eth) > ret) { + continue; + } + /* TCP */ - tcp = (struct tcphdr *)&pkt[14+ip->ihl*4]; + tcp = (struct tcphdr *)((ip->ihl*4) + (char *)ip); + /* We only want replies from the port we tickled */ if (tcp->source != dst->sin_port) { continue;
svn commit: samba r23700 - in branches/SAMBA_4_0/source/smb_server: .
Author: tridge Date: 2007-07-04 05:16:19 + (Wed, 04 Jul 2007) New Revision: 23700 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23700 Log: pre-open the sam in the parent smbd. This has the effect of loading the schema. That stops us loading the schema for each new connection. In future I would prefer to share a lot more of our ldb contexts with children. That will require a larger piece of surgery. Modified: branches/SAMBA_4_0/source/smb_server/smb_server.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb_server.c === --- branches/SAMBA_4_0/source/smb_server/smb_server.c 2007-07-04 05:15:06 UTC (rev 23699) +++ branches/SAMBA_4_0/source/smb_server/smb_server.c 2007-07-04 05:16:19 UTC (rev 23700) @@ -32,6 +32,7 @@ #include "system/network.h" #include "lib/socket/netif.h" #include "param/share.h" +#include "dsdb/samdb/samdb.h" static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob) { @@ -192,7 +193,20 @@ return NT_STATUS_OK; } + /* + pre-open some of our ldb databases, to prevent an explosion of memory usage + when we fork + */ +static void smbsrv_preopen_ldb(struct task_server *task) +{ + /* yes, this looks strange. It is a hack to preload the + schema. I'd like to share most of the ldb context with the + child too. That will come later */ + talloc_free(samdb_connect(task, NULL)); +} + +/* open the smb server sockets */ static void smbsrv_task_init(struct task_server *task) @@ -220,6 +234,8 @@ if (!NT_STATUS_IS_OK(status)) goto failed; } + smbsrv_preopen_ldb(task); + return; failed: task_server_terminate(task, "Failed to startup smb server task");
svn commit: samba r23699 - in branches/SAMBA_4_0/source/dsdb/schema: .
Author: tridge Date: 2007-07-04 05:15:06 + (Wed, 04 Jul 2007) New Revision: 23699 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23699 Log: when we create the global schema, remember to set the ldb opaque so we can find it again Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_init.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_init.c === --- branches/SAMBA_4_0/source/dsdb/schema/schema_init.c 2007-07-04 04:18:44 UTC (rev 23698) +++ branches/SAMBA_4_0/source/dsdb/schema/schema_init.c 2007-07-04 05:15:06 UTC (rev 23699) @@ -1016,7 +1016,7 @@ { int ret; if (!global_schema) { - return LDB_SUCCESS; + return LDB_SUCCESS; } ret = ldb_set_opaque(ldb, "dsdb_schema", global_schema); if (ret != LDB_SUCCESS) { @@ -1063,6 +1063,8 @@ talloc_steal(talloc_autofree_context(), schema); global_schema = schema; + + dsdb_set_global_schema(ldb); } WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf, const char *df)
Rev 554: merge from ronnie in http://samba.org/~tridge/ctdb
revno: 554 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Wed 2007-07-04 14:51:33 +1000 message: merge from ronnie removed: tools/socketkiller.c socketkiller.c-20070704025142-tipbngbwruk1brmb-1 modified: Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 takeover/ctdb_takeover.c ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2 takeover/system.c system.c-20070525071636-a5n1ihghjtppy08r-3 tools/ctdb.c ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1 revno: 432.1.100 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Wed 2007-07-04 14:16:28 +1000 message: we dont need socketkiller anymore now that the kill-tcp-connection code is available from the ctdb tool revno: 432.1.99 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Wed 2007-07-04 14:14:48 +1000 message: add a killtcp command to the ctdb tool revno: 432.1.98 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Wed 2007-07-04 13:53:22 +1000 message: add a new ctdb_sys_kill_tcp() function that kills (RST) the specified connection revno: 432.1.97 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Wed 2007-07-04 13:32:38 +1000 message: change the signature for ctdb_sys_send_ack() to ctdb_sys_send_tcp() to make it possible to provide which seq/ack numbers to use and also whether the RST flag should be set. update all callers to the new signature revno: 432.1.96 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Wed 2007-07-04 13:27:08 +1000 message: ETH_P_IP does not work on my ubuntu system so changing it back to the slightly less efficient ETH_P_ALL revno: 432.1.95 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Wed 2007-07-04 13:13:54 +1000 message: merge from tridge Diff too large for email (490, the limit is 200).
svn commit: samba r23698 - in branches/SAMBA_4_0/source/ntvfs/sysdep: .
Author: tridge Date: 2007-07-04 04:18:44 + (Wed, 04 Jul 2007) New Revision: 23698 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23698 Log: fixed notify:backend so it actually works again Modified: branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c === --- branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c 2007-07-04 04:16:16 UTC (rev 23697) +++ branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c 2007-07-04 04:18:44 UTC (rev 23698) @@ -34,7 +34,7 @@ static struct sys_notify_backend *backends; static uint32_t num_backends; -#define NOTIFY_BACKEND "notify-backend" +#define NOTIFY_BACKEND "notify:backend" /* initialise a system change notify backend
svn commit: samba r23697 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: tridge Date: 2007-07-04 04:16:16 + (Wed, 04 Jul 2007) New Revision: 23697 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23697 Log: use the file perm options in the posix backend Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fileinfo.c branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fileinfo.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fileinfo.c 2007-07-04 04:15:07 UTC (rev 23696) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fileinfo.c 2007-07-04 04:16:16 UTC (rev 23697) @@ -88,34 +88,39 @@ */ mode_t pvfs_fileperms(struct pvfs_state *pvfs, uint32_t attrib) { - mode_t mode = S_IRUSR; + mode_t mode = (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH); - if (attrib & FILE_ATTRIBUTE_DIRECTORY) { - mode |= S_IXUSR; + if (!(pvfs->flags & PVFS_FLAG_XATTR_ENABLE) && + (attrib & FILE_ATTRIBUTE_READONLY)) { + mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH); } - if (!(attrib & FILE_ATTRIBUTE_READONLY) || - (pvfs->flags & PVFS_FLAG_XATTR_ENABLE)) { - mode |= S_IWUSR; - } - if (!(pvfs->flags & PVFS_FLAG_XATTR_ENABLE)) { if ((attrib & FILE_ATTRIBUTE_ARCHIVE) && (pvfs->flags & PVFS_FLAG_MAP_ARCHIVE)) { mode |= S_IXUSR; } - if ((attrib & FILE_ATTRIBUTE_SYSTEM) && (pvfs->flags & PVFS_FLAG_MAP_SYSTEM)) { mode |= S_IXGRP; } - if ((attrib & FILE_ATTRIBUTE_HIDDEN) && (pvfs->flags & PVFS_FLAG_MAP_HIDDEN)) { mode |= S_IXOTH; } } + if (attrib & FILE_ATTRIBUTE_DIRECTORY) { + mode |= (S_IFDIR | S_IWUSR); + mode |= (S_IXUSR | S_IXGRP | S_IXOTH); + mode &= pvfs->options.dir_mask; + mode |= pvfs->options.force_dir_mode; + } else { + mode &= pvfs->options.create_mask; + mode |= pvfs->options.force_create_mode; + } + return mode; } + Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c === --- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c 2007-07-04 04:15:07 UTC (rev 23696) +++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c 2007-07-04 04:16:16 UTC (rev 23697) @@ -60,6 +60,19 @@ if (share_bool_option(scfg, PVFS_AIO, False)) pvfs->flags |= PVFS_FLAG_LINUX_AIO; + /* file perm options */ + pvfs->options.create_mask = share_int_option(scfg, + SHARE_CREATE_MASK, + SHARE_CREATE_MASK_DEFAULT); + pvfs->options.dir_mask = share_int_option(scfg, + SHARE_DIR_MASK, + SHARE_DIR_MASK_DEFAULT); + pvfs->options.force_dir_mode= share_int_option(scfg, + SHARE_FORCE_DIR_MODE, + SHARE_FORCE_DIR_MODE_DEFAULT); + pvfs->options.force_create_mode = share_int_option(scfg, + SHARE_FORCE_CREATE_MODE, + SHARE_FORCE_CREATE_MODE_DEFAULT); /* this must be a power of 2 */ pvfs->alloc_size_rounding = share_int_option(scfg, PVFS_ALLOCATION_ROUNDING, Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h === --- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h 2007-07-04 04:15:07 UTC (rev 23696) +++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h 2007-07-04 04:16:16 UTC (rev 23697) @@ -86,6 +86,14 @@ /* the acl backend */ const struct pvfs_acl_ops *acl_ops; + + /* non-flag share options */ + struct { + mode_t dir_mask; + mode_t force_dir_mode; + mode_t create_mask; + mode_t force_create_mode; + } options; }; /* this is the basic information needed about a file from the filesystem */
svn commit: samba r23696 - in branches/SAMBA_4_0/source/param: .
Author: tridge Date: 2007-07-04 04:15:07 + (Wed, 04 Jul 2007) New Revision: 23696 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23696 Log: added the create mask and related share permissions options to Samba4, using the new share_int_option() code from Simo speaking of which, this is the first time I've looked closely at the share_classic.c code. It is absolutely and completely braindead and broken. Whatever drugs Simo was on at the time, he better not try to cross a border with them on him! Problems with it: - if you actually set a value, it gets ignored, and the defvalue gets used instead ('ret' is never returned). If you don't set a value, then defvalue gets returned too. Sound useful? - it means we now have to list parameters in source/param/ in lots and lots of places, all of which have to match exactly. code like this is supposed to reduce the likelyhood of errors, not increase it! - code which has a long line of if() statements with strcmp() should cause your fingers to burn on the keyboard when you type it in. That's what structure lists are for. Strangely enough, we have all the info in loadparm.c in a structure list, but instead it gets replicated in share_classic.c in this strange if() strcmp() form expect some changes to this code shortly. I'll need a calming cup of tea first though :-) Modified: branches/SAMBA_4_0/source/param/loadparm.c branches/SAMBA_4_0/source/param/loadparm.h branches/SAMBA_4_0/source/param/share.h branches/SAMBA_4_0/source/param/share_classic.c Changeset: Modified: branches/SAMBA_4_0/source/param/loadparm.c === --- branches/SAMBA_4_0/source/param/loadparm.c 2007-07-04 03:25:44 UTC (rev 23695) +++ branches/SAMBA_4_0/source/param/loadparm.c 2007-07-04 04:15:07 UTC (rev 23696) @@ -223,6 +223,10 @@ int bMap_hidden; int bMap_archive; int bStrictLocking; + int iCreate_mask; + int iCreate_force_mode; + int iDir_mask; + int iDir_force_mode; int *copymap; int bMSDfsRoot; int bStrictSync; @@ -259,6 +263,10 @@ False, /* bMap_hidden */ True, /* bMap_archive */ True, /* bStrictLocking */ + 0744, /* iCreate_mask */ + , /* iCreate_force_mode */ + 0755, /* iDir_mask */ + , /* iDir_force_mode */ NULL, /* copymap */ False, /* bMSDfsRoot */ False, /* bStrictSync */ @@ -419,6 +427,11 @@ {"read only", P_BOOL, P_LOCAL, &sDefault.bRead_only, NULL, NULL, FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE}, + {"create mask", P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE}, + {"force create mode", P_OCTAL, P_LOCAL, &sDefault.iCreate_force_mode, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE}, + {"directory mask", P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE}, + {"force directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_force_mode, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE}, + {"hosts allow", P_LIST, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT | FLAG_DEVELOPER}, {"hosts deny", P_LIST, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, FLAG_GLOBAL | FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT | FLAG_DEVELOPER}, @@ -932,6 +945,10 @@ _PUBLIC_ FN_LOCAL_BOOL(lp_map_system, bMap_system) _PUBLIC_ FN_LOCAL_INTEGER(lp_max_connections, iMaxConnections) _PUBLIC_ FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy) +_PUBLIC_ FN_LOCAL_INTEGER(lp_create_mask, iCreate_mask) +_PUBLIC_ FN_LOCAL_INTEGER(lp_force_create_mode, iCreate_force_mode) +_PUBLIC_ FN_LOCAL_INTEGER(lp_dir_mask, iDir_mask) +_PUBLIC_ FN_LOCAL_INTEGER(lp_force_dir_mode, iDir_force_mode) _PUBLIC_ FN_GLOBAL_INTEGER(lp_server_signing, &Globals.server_signing) _PUBLIC_ FN_GLOBAL_INTEGER(lp_client_signing, &Globals.client_signing) @@ -1489,6 +1506,7 @@ break; case P_INTEGER: + case P_OCTAL: case P_ENUM: *(int *)dest_ptr = *(int *)src_ptr; break; @@ -1894,6 +1912,10 @@ *(int *)parm_ptr = atoi(pszParmValue); break; + case P_OCTAL: + *(int *)parm_ptr = strtol(pszParmValue, NULL, 8); + break; + case P_BYTES: { uint64_t val; @@ -2088,6 +2110,10 @@
svn commit: samba r23695 - in branches/SAMBA_4_0/source: dsdb/schema smbd
Author: abartlet Date: 2007-07-04 03:25:44 + (Wed, 04 Jul 2007) New Revision: 23695 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23695 Log: By not using the NULL context for these large structures, we don't falsely report them as leaked. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_init.c branches/SAMBA_4_0/source/smbd/server.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_init.c === --- branches/SAMBA_4_0/source/dsdb/schema/schema_init.c 2007-07-04 00:41:58 UTC (rev 23694) +++ branches/SAMBA_4_0/source/dsdb/schema/schema_init.c 2007-07-04 03:25:44 UTC (rev 23695) @@ -1061,7 +1061,7 @@ return; } - talloc_steal(NULL, schema); + talloc_steal(talloc_autofree_context(), schema); global_schema = schema; } Modified: branches/SAMBA_4_0/source/smbd/server.c === --- branches/SAMBA_4_0/source/smbd/server.c 2007-07-04 00:41:58 UTC (rev 23694) +++ branches/SAMBA_4_0/source/smbd/server.c 2007-07-04 03:25:44 UTC (rev 23695) @@ -285,7 +285,7 @@ /* the event context is the top level structure in smbd. Everything else should hang off that */ - event_ctx = event_context_init(NULL); + event_ctx = event_context_init(talloc_autofree_context()); /* initialise clustering if needed */ cluster_ctdb_init(event_ctx, model);
Rev 553: merge from ronnie in http://samba.org/~tridge/ctdb
revno: 553 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Wed 2007-07-04 13:14:45 +1000 message: merge from ronnie added: tools/socketkiller.c socketkiller.c-20070704025142-tipbngbwruk1brmb-1 modified: Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 scsi/scsi_io.c scsi_io.c-20070702055133-iclxpxa82pdb3ue6-2 server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 server/ctdb_tunables.c ctdb_tunables.c-20070604095258-4m34d7cm1qa7yos9-1 revno: 432.1.94 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Wed 2007-07-04 12:52:07 +1000 message: initial version of a socketkiller tool checked in so it is not lost this tool takes a socketpair as arguments and will reset the tcp connection revno: 432.1.93 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Wed 2007-07-04 08:36:59 +1000 message: add a tuneable to control how long we wait after a successful recovery before we alow another recovery to be initiated revno: 432.1.92 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Tue 2007-07-03 12:25:49 +1000 message: add more command line parsing add the PREEMPT service action for persistent reservation out so we can delete someone elses registration from the lun and thus disable that someone else from reading/writing the lun completely revno: 432.1.91 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Mon 2007-07-02 18:41:37 +1000 message: merge from tridge Diff too large for email (706, the limit is 200).
svn commit: samba r23694 - in branches: SAMBA_3_0/source SAMBA_3_0_26/source
Author: jerry Date: 2007-07-04 00:41:58 + (Wed, 04 Jul 2007) New Revision: 23694 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23694 Log: Make sure that when builddir != srcdir, we can still find the exports files and library-versions file. Also move the "-o $@" from the individual targets and into the SHLD_DSO command. Modified: branches/SAMBA_3_0/source/Makefile.in branches/SAMBA_3_0_26/source/Makefile.in Changeset: Modified: branches/SAMBA_3_0/source/Makefile.in === --- branches/SAMBA_3_0/source/Makefile.in 2007-07-04 00:34:16 UTC (rev 23693) +++ branches/SAMBA_3_0/source/Makefile.in 2007-07-04 00:41:58 UTC (rev 23694) @@ -22,10 +22,10 @@ [EMAIL PROTECTED]@ ## Dynamic shared libraries build settings -DSO_EXPORTS_CMD=-Wl,--version-script,exports/`basename $@ | sed 's/@[EMAIL PROTECTED]/syms/'` +DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@ | sed 's/@[EMAIL PROTECTED]/syms/'` [EMAIL PROTECTED]@ -SONAME_VER=`grep ^$@ $(srcdir)/library-versions | cut -d: -f2` -SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) +SONAME_VER=`grep ^$@ $(builddir)/library-versions | cut -d: -f2` +SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) -o $@ # Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler # (GCC) warnings. This is done automtically for --enable-developer @@ -1352,7 +1352,7 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking libaddns shared library $@ - @$(SHLD_DSO) -o $@ $(LIBADDNS_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(UUID_LIBS)\ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) @@ -1362,7 +1362,7 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @echo Linking libsmbclient shared library $@ - @$(SHLD_DSO) -o $@ $(LIBSMBCLIENT_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) @@ -1372,7 +1372,7 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @echo Linking libsmbsharemodes shared library $@ - @$(SHLD_DSO) -o $@ $(LIBSMBSHAREMODES_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) \ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) @@ -1382,7 +1382,7 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(CAC_OBJ) @echo Linking libmsrpc shared library $@ - @$(SHLD_DSO) -o $@ $(CAC_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) $(CAC_OBJ) $(LDFLAGS) $(LIBS) \ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) bin/libmsrpc.a: $(BINARY_PREREQS) $(CAC_OBJ) Modified: branches/SAMBA_3_0_26/source/Makefile.in === --- branches/SAMBA_3_0_26/source/Makefile.in2007-07-04 00:34:16 UTC (rev 23693) +++ branches/SAMBA_3_0_26/source/Makefile.in2007-07-04 00:41:58 UTC (rev 23694) @@ -22,10 +22,10 @@ [EMAIL PROTECTED]@ ## Dynamic shared libraries build settings -DSO_EXPORTS_CMD=-Wl,--version-script,exports/`basename $@ | sed 's/@[EMAIL PROTECTED]/syms/'` +DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@ | sed 's/@[EMAIL PROTECTED]/syms/'` [EMAIL PROTECTED]@ -SONAME_VER=`grep ^$@ $(srcdir)/library-versions | cut -d: -f2` -SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) +SONAME_VER=`grep ^$@ $(builddir)/library-versions | cut -d: -f2` +SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) -o $@ # Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler # (GCC) warnings. This is done automtically for --enable-developer @@ -1310,7 +1310,7 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking libaddns shared library $@ - @$(SHLD_DSO) -o $@ $(LIBADDNS_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(UUID_LIBS)\ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) @@ -1320,7 +1320,7 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @echo Linking libsmbclient shared library $@ - @$(SHLD_DSO) -o $@ $(LIBSMBCLIENT_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) @@ -1330,7 +1330,7 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @echo Linking libsmbsharemodes shared library $@ - @$(SHLD_DSO) -o $@ $(LIBSMBSHAREMODES_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) \
svn commit: samba r23693 - in branches/SAMBA_4_0/source/selftest: .
Author: abartlet Date: 2007-07-04 00:34:16 + (Wed, 04 Jul 2007) New Revision: 23693 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23693 Log: Give the process a chance to write out it's coverage data, before we blast a kill -9 at it. Andrew Bartlett Modified: branches/SAMBA_4_0/source/selftest/Samba4.pm Changeset: Modified: branches/SAMBA_4_0/source/selftest/Samba4.pm === --- branches/SAMBA_4_0/source/selftest/Samba4.pm2007-07-03 23:48:02 UTC (rev 23692) +++ branches/SAMBA_4_0/source/selftest/Samba4.pm2007-07-04 00:34:16 UTC (rev 23693) @@ -514,19 +514,34 @@ sub teardown_env($$) { my ($self, $envvars) = @_; + my $pid; close(DATA); - sleep(2); - - my $failed = $? >> 8; - if (-f "$envvars->{PIDDIR}/smbd.pid" ) { open(IN, "<$envvars->{PIDDIR}/smbd.pid") or die("unable to open smbd pid file"); - kill 9, ; + $pid = ; close(IN); + + # Give the process 20 seconds to exit. gcov needs + # this time to write out the covarge data + my $count = 0; + until (kill(0, $pid) == 0) { + # if no process sucessfully signalled, then we are done + sleep(1); + $count++; + last if $count > 20; + } + + # If it is still around, kill it + if ($count > 20) { + print "smbd process $pid took more than $count seconds to exit, killing\n"; + kill 9, $pid; + } } + my $failed = $? >> 8; + $self->slapd_stop($envvars) if ($self->{ldap}); print $self->getlog_env($envvars);
Build status as of Wed Jul 4 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-07-03 00:00:27.0 + +++ /home/build/master/cache/broken_results.txt 2007-07-04 00:01:45.0 + @@ -1,25 +1,25 @@ -Build status as of Tue Jul 3 00:00:01 2007 +Build status as of Wed Jul 4 00:00:02 2007 Build counts: Tree Total Broken Panic SOC 0 0 0 build_farm 0 0 0 -ccache 35 9 0 +ccache 36 9 0 ctdb 0 0 0 distcc 2 0 0 -ldb 34 3 0 -libreplace 32 10 0 -lorikeet-heimdal 30 13 0 -pidl 18 4 0 -ppp 14 9 0 +ldb 35 3 0 +libreplace 33 10 0 +lorikeet-heimdal 31 13 0 +pidl 19 4 0 +ppp 15 10 0 python 0 0 0 -rsync35 12 0 +rsync36 12 0 samba0 0 0 samba-docs 0 0 0 samba-gtk4 4 0 -samba4 32 24 12 -samba_3_035 18 0 -smb-build32 32 0 -talloc 34 8 0 -tdb 34 1 0 +samba4 33 17 6 +samba_3_036 18 0 +smb-build33 33 0 +talloc 36 8 0 +tdb 35 1 0
svn commit: samba r23692 - in branches: SAMBA_3_0/source/modules SAMBA_3_0_26/source/modules
Author: jra Date: 2007-07-03 23:48:02 + (Tue, 03 Jul 2007) New Revision: 23692 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23692 Log: Couldn't wait, sorry :-). Did the style change. Jeremy. Modified: branches/SAMBA_3_0/source/modules/vfs_recycle.c branches/SAMBA_3_0_26/source/modules/vfs_recycle.c Changeset: Modified: branches/SAMBA_3_0/source/modules/vfs_recycle.c === --- branches/SAMBA_3_0/source/modules/vfs_recycle.c 2007-07-03 23:34:01 UTC (rev 23691) +++ branches/SAMBA_3_0/source/modules/vfs_recycle.c 2007-07-03 23:48:02 UTC (rev 23692) @@ -391,7 +391,7 @@ { SMB_STRUCT_STAT st; struct timespec ts[2]; - int status, err; + int ret, err; if (SMB_VFS_NEXT_STAT(handle, fname, &st) != 0) { DEBUG(0,("recycle: stat for %s returned %s\n", @@ -402,10 +402,10 @@ ts[1] = touch_mtime ? ts[0] : get_mtimespec(&st); /* mtime */ become_root(); - status = SMB_VFS_NEXT_NTIMES(handle, fname, ts); + ret = SMB_VFS_NEXT_NTIMES(handle, fname, ts); err = errno; unbecome_root(); - if (status == -1 ) { + if (ret == -1 ) { DEBUG(0, ("recycle: touching %s failed, reason = %s\n", fname, strerror(err))); } Modified: branches/SAMBA_3_0_26/source/modules/vfs_recycle.c === --- branches/SAMBA_3_0_26/source/modules/vfs_recycle.c 2007-07-03 23:34:01 UTC (rev 23691) +++ branches/SAMBA_3_0_26/source/modules/vfs_recycle.c 2007-07-03 23:48:02 UTC (rev 23692) @@ -391,7 +391,7 @@ { SMB_STRUCT_STAT st; struct timespec ts[2]; - int status, err; + int ret, err; if (SMB_VFS_NEXT_STAT(handle, fname, &st) != 0) { DEBUG(0,("recycle: stat for %s returned %s\n", @@ -402,10 +402,10 @@ ts[1] = touch_mtime ? ts[0] : get_mtimespec(&st); /* mtime */ become_root(); - status = SMB_VFS_NEXT_NTIMES(handle, fname, ts); + ret = SMB_VFS_NEXT_NTIMES(handle, fname, ts); err = errno; unbecome_root(); - if (status == -1 ) { + if (ret == -1 ) { DEBUG(0, ("recycle: touching %s failed, reason = %s\n", fname, strerror(err))); }
Re: svn commit: samba r23691 - in branches: SAMBA_3_0/source/modules SAMBA_3_0_26/source/modules
On Tue, Jul 03, 2007 at 11:34:02PM +, [EMAIL PROTECTED] wrote: > Author: idra > Date: 2007-07-03 23:34:01 + (Tue, 03 Jul 2007) > New Revision: 23691 > > WebSVN: > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23691 > > Log: > > fix for bug on touching files as described here: > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=243897 Arg. Just a style thing but can you change the variable name "status" to "ret". Historically we use "status" for NTSTATUS and "ret" for an int. It;s just convention but it makes code easier to read. Jeremy.
svn commit: samba r23691 - in branches: SAMBA_3_0/source/modules SAMBA_3_0_26/source/modules
Author: idra Date: 2007-07-03 23:34:01 + (Tue, 03 Jul 2007) New Revision: 23691 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23691 Log: fix for bug on touching files as described here: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=243897 Modified: branches/SAMBA_3_0/source/modules/vfs_recycle.c branches/SAMBA_3_0_26/source/modules/vfs_recycle.c Changeset: Modified: branches/SAMBA_3_0/source/modules/vfs_recycle.c === --- branches/SAMBA_3_0/source/modules/vfs_recycle.c 2007-07-03 20:00:02 UTC (rev 23690) +++ branches/SAMBA_3_0/source/modules/vfs_recycle.c 2007-07-03 23:34:01 UTC (rev 23691) @@ -386,20 +386,28 @@ /** * Touch access or modify date **/ -static void recycle_do_touch(vfs_handle_struct *handle, const char *fname, BOOL touch_mtime) +static void recycle_do_touch(vfs_handle_struct *handle, const char *fname, +BOOL touch_mtime) { SMB_STRUCT_STAT st; struct timespec ts[2]; - + int status, err; + if (SMB_VFS_NEXT_STAT(handle, fname, &st) != 0) { - DEBUG(0,("recycle: stat for %s returned %s\n", fname, strerror(errno))); + DEBUG(0,("recycle: stat for %s returned %s\n", +fname, strerror(errno))); return; } ts[0] = timespec_current(); /* atime */ ts[1] = touch_mtime ? ts[0] : get_mtimespec(&st); /* mtime */ - if (SMB_VFS_NEXT_NTIMES(handle, fname, ts) == -1 ) { - DEBUG(0, ("recycle: touching %s failed, reason = %s\n", fname, strerror(errno))); + become_root(); + status = SMB_VFS_NEXT_NTIMES(handle, fname, ts); + err = errno; + unbecome_root(); + if (status == -1 ) { + DEBUG(0, ("recycle: touching %s failed, reason = %s\n", + fname, strerror(err))); } } Modified: branches/SAMBA_3_0_26/source/modules/vfs_recycle.c === --- branches/SAMBA_3_0_26/source/modules/vfs_recycle.c 2007-07-03 20:00:02 UTC (rev 23690) +++ branches/SAMBA_3_0_26/source/modules/vfs_recycle.c 2007-07-03 23:34:01 UTC (rev 23691) @@ -386,20 +386,28 @@ /** * Touch access or modify date **/ -static void recycle_do_touch(vfs_handle_struct *handle, const char *fname, BOOL touch_mtime) +static void recycle_do_touch(vfs_handle_struct *handle, const char *fname, +BOOL touch_mtime) { SMB_STRUCT_STAT st; struct timespec ts[2]; - + int status, err; + if (SMB_VFS_NEXT_STAT(handle, fname, &st) != 0) { - DEBUG(0,("recycle: stat for %s returned %s\n", fname, strerror(errno))); + DEBUG(0,("recycle: stat for %s returned %s\n", +fname, strerror(errno))); return; } ts[0] = timespec_current(); /* atime */ ts[1] = touch_mtime ? ts[0] : get_mtimespec(&st); /* mtime */ - if (SMB_VFS_NEXT_NTIMES(handle, fname, ts) == -1 ) { - DEBUG(0, ("recycle: touching %s failed, reason = %s\n", fname, strerror(errno))); + become_root(); + status = SMB_VFS_NEXT_NTIMES(handle, fname, ts); + err = errno; + unbecome_root(); + if (status == -1 ) { + DEBUG(0, ("recycle: touching %s failed, reason = %s\n", + fname, strerror(err))); } }
svn commit: samba r23690 - in branches/SAMBA_3_0_26/source: . exports
Author: jerry Date: 2007-07-03 20:00:02 + (Tue, 03 Jul 2007) New Revision: 23690 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23690 Log: Squashed commit of the following: commit 0d4bbd197198a94bf4e29e0ccd175a40a60097f3 Author: Gerald (Jerry) Carter <[EMAIL PROTECTED]> Date: Mon Jul 2 20:08:19 2007 -0500 Introduce GNU ld linker export-script for hiding non-public symbols in shared libraries. Based on initial patch from Julien Cristau <[EMAIL PROTECTED]> and suggestions from James Peach <[EMAIL PROTECTED]>. Currently the libsmbsharemodes libraries still exports *. Signed off on my Derrell as well. Added: branches/SAMBA_3_0_26/source/exports/ branches/SAMBA_3_0_26/source/exports/libsmbclient.syms branches/SAMBA_3_0_26/source/exports/libsmbsharemodes.syms branches/SAMBA_3_0_26/source/library-versions.in Modified: branches/SAMBA_3_0_26/source/Makefile.in branches/SAMBA_3_0_26/source/configure.in Changeset: Modified: branches/SAMBA_3_0_26/source/Makefile.in === --- branches/SAMBA_3_0_26/source/Makefile.in2007-07-03 19:55:02 UTC (rev 23689) +++ branches/SAMBA_3_0_26/source/Makefile.in2007-07-03 20:00:02 UTC (rev 23690) @@ -21,6 +21,12 @@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ +## Dynamic shared libraries build settings +DSO_EXPORTS_CMD=-Wl,--version-script,exports/`basename $@ | sed 's/@[EMAIL PROTECTED]/syms/'` [EMAIL PROTECTED]@ +SONAME_VER=`grep ^$@ $(srcdir)/library-versions | cut -d: -f2` +SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) + # Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler # (GCC) warnings. This is done automtically for --enable-developer # and --enable-krb5developer. @@ -120,16 +126,8 @@ PIDDIR = @piddir@ LIBSMBCLIENT=bin/libsmbclient.a @LIBSMBCLIENT_SHARED@ -LIBSMBCLIENT_MAJOR=0 -LIBSMBCLIENT_MINOR=1 - LIBSMBSHAREMODES=bin/libsmbsharemodes.a @LIBSMBSHAREMODES_SHARED@ -LIBSMBSHAREMODES_MAJOR=0 -LIBSMBSHAREMODES_MINOR=2 - LIBADDNS=bin/libaddns.a @LIBADDNS_SHARED@ -LIBADDNS_MAJOR=0 -LIBADDNS_MINOR=1 FLAGS1 = $(CFLAGS) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS) FLAGS2 = @@ -1312,9 +1310,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking libaddns shared library $@ - @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBADDNS_OBJ) $(LIBS) \ + @$(SHLD_DSO) -o $@ $(LIBADDNS_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(UUID_LIBS)\ - @[EMAIL PROTECTED] [EMAIL PROTECTED](LIBADDNS_MAJOR) + @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) bin/libaddns.a: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking libaddns non-shared library $@ @@ -1322,9 +1320,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @echo Linking libsmbclient shared library $@ - @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_OBJ) $(LIBS) \ + @$(SHLD_DSO) -o $@ $(LIBSMBCLIENT_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ - @[EMAIL PROTECTED] [EMAIL PROTECTED](LIBSMBCLIENT_MAJOR) + @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @echo Linking libsmbclient non-shared library $@ @@ -1332,9 +1330,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @echo Linking libsmbsharemodes shared library $@ - @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBSHAREMODES_OBJ) $(LIBS) \ + @$(SHLD_DSO) -o $@ $(LIBSMBSHAREMODES_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) \ - @[EMAIL PROTECTED] [EMAIL PROTECTED](LIBSMBSHAREMODES_MAJOR) + @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) bin/libsmbsharemodes.a: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @echo Linking libsmbsharemodes non-shared library $@ Modified: branches/SAMBA_3_0_26/source/configure.in === --- branches/SAMBA_3_0_26/source/configure.in 2007-07-03 19:55:02 UTC (rev 23689) +++ branches/SAMBA_3_0_26/source/configure.in 2007-07-03 20:00:02 UTC (rev 23690) @@ -282,6 +282,7 @@ AC_SUBST(LDSHFLAGS) AC_SUBST(SONAMEFLAG) AC_SUBST(SHLD) +AC_SUBST(DSO_EXPORTS) AC_SUBST(HOST_OS) AC_SUBST(PICFLAG) AC_SUBST(PIE_CFLAGS) @@ -515,6 +516,9 @@ if test "$ac_cv_gnu_ld_date" -lt 20030217; then ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes fi + if test "$ac_cv_gnu_ld_date" -gt 20030101; then + ac_cv_gnu_ld_version_script=yes + fi else AC_MSG_CHECKING(GNU ld release version) changequote(,)dnl @@ -530,6 +534,9 @@ if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes fi + if test "$ac_cv_gnu_ld_vernr_
svn commit: samba r23689 - in branches/SAMBA_3_0/source: . exports
Author: jerry Date: 2007-07-03 19:55:02 + (Tue, 03 Jul 2007) New Revision: 23689 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23689 Log: Squashed commit of the following: commit 0d4bbd197198a94bf4e29e0ccd175a40a60097f3 Author: Gerald (Jerry) Carter <[EMAIL PROTECTED]> Date: Mon Jul 2 20:08:19 2007 -0500 Introduce GNU ld linker export-script for hiding non-public symbols in shared libraries. Based on initial patch from Julien Cristau <[EMAIL PROTECTED]> and suggestions from James Peach <[EMAIL PROTECTED]>. Currently the libsmbsharemodes libraries still exports *. Signed off on my Derrell as well. Added: branches/SAMBA_3_0/source/exports/ branches/SAMBA_3_0/source/exports/libsmbclient.syms branches/SAMBA_3_0/source/exports/libsmbsharemodes.syms branches/SAMBA_3_0/source/library-versions.in Modified: branches/SAMBA_3_0/source/Makefile.in branches/SAMBA_3_0/source/configure.in Changeset: Modified: branches/SAMBA_3_0/source/Makefile.in === --- branches/SAMBA_3_0/source/Makefile.in 2007-07-03 18:00:54 UTC (rev 23688) +++ branches/SAMBA_3_0/source/Makefile.in 2007-07-03 19:55:02 UTC (rev 23689) @@ -21,6 +21,12 @@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ +## Dynamic shared libraries build settings +DSO_EXPORTS_CMD=-Wl,--version-script,exports/`basename $@ | sed 's/@[EMAIL PROTECTED]/syms/'` [EMAIL PROTECTED]@ +SONAME_VER=`grep ^$@ $(srcdir)/library-versions | cut -d: -f2` +SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) + # Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler # (GCC) warnings. This is done automtically for --enable-developer # and --enable-krb5developer. @@ -125,20 +131,9 @@ PIDDIR = @piddir@ LIBSMBCLIENT=bin/libsmbclient.a @LIBSMBCLIENT_SHARED@ -LIBSMBCLIENT_MAJOR=0 -LIBSMBCLIENT_MINOR=1 - LIBMSRPC=bin/libmsrpc.a @LIBMSRPC_SHARED@ -LIBMSRPC_MAJOR=0 -LIBMSRPC_MINOR=1 - LIBSMBSHAREMODES=bin/libsmbsharemodes.a @LIBSMBSHAREMODES_SHARED@ -LIBSMBSHAREMODES_MAJOR=0 -LIBSMBSHAREMODES_MINOR=2 - LIBADDNS=bin/libaddns.a @LIBADDNS_SHARED@ -LIBADDNS_MAJOR=0 -LIBADDNS_MINOR=1 FLAGS1 = $(CFLAGS) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS) FLAGS2 = @@ -1357,9 +1352,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking libaddns shared library $@ - @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBADDNS_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) -o $@ $(LIBADDNS_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(UUID_LIBS)\ - @[EMAIL PROTECTED] [EMAIL PROTECTED](LIBADDNS_MAJOR) + @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) bin/libaddns.a: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking libaddns non-shared library $@ @@ -1367,9 +1362,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @echo Linking libsmbclient shared library $@ - @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) -o $@ $(LIBSMBCLIENT_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ - @[EMAIL PROTECTED] [EMAIL PROTECTED](LIBSMBCLIENT_MAJOR) + @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @echo Linking libsmbclient non-shared library $@ @@ -1377,9 +1372,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @echo Linking libsmbsharemodes shared library $@ - @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBSHAREMODES_OBJ) $(LDFLAGS) $(LIBS) \ + @$(SHLD_DSO) -o $@ $(LIBSMBSHAREMODES_OBJ) $(LDFLAGS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) \ - @[EMAIL PROTECTED] [EMAIL PROTECTED](LIBSMBSHAREMODES_MAJOR) + @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) bin/libsmbsharemodes.a: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @echo Linking libsmbsharemodes non-shared library $@ @@ -1387,8 +1382,8 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(CAC_OBJ) @echo Linking libmsrpc shared library $@ - @$(SHLD) $(LDSHFLAGS) -o $@ $(CAC_OBJ) $(LDFLAGS) $(LIBS) \ - @[EMAIL PROTECTED] [EMAIL PROTECTED](LIBMSRPC_MAJOR) + @$(SHLD_DSO) -o $@ $(CAC_OBJ) $(LDFLAGS) $(LIBS) \ + @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) bin/libmsrpc.a: $(BINARY_PREREQS) $(CAC_OBJ) @echo Linking libmsrpc non-shared library $@ Modified: branches/SAMBA_3_0/source/configure.in === --- branches/SAMBA_3_0/source/configure.in 2007-07-03 18:00:54 UTC (rev 23688) +++ branches/SAMBA_3_0/source/configure.in 2007-07-03 19:55:02 UTC (rev 23689) @@ -283,6 +283,7 @@ AC_SUBST(MODULE_EXPORTS) AC_SUBST(SONAMEFLAG) AC_SUBST(SHLD) +AC_SUBST(DSO_EXPORTS) AC_SUBST(HOST_OS) AC_SUBST(PICFLAG) AC_SUBST(PIE_CFLAGS) @@ -545,6 +546,9 @@ if te
svn commit: samba r23688 - in branches: SAMBA_3_0/source/passdb SAMBA_3_0_25/source/passdb SAMBA_3_0_26/source/passdb
Author: jra Date: 2007-07-03 18:00:54 + (Tue, 03 Jul 2007) New Revision: 23688 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23688 Log: Fix bug #4759 reported by Raul <[EMAIL PROTECTED]>. "N" is not a valid format entry for ber_printf, should be "n" Jeremy. Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c branches/SAMBA_3_0_25/source/passdb/pdb_ldap.c branches/SAMBA_3_0_26/source/passdb/pdb_ldap.c Changeset: Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c === --- branches/SAMBA_3_0/source/passdb/pdb_ldap.c 2007-07-03 16:27:35 UTC (rev 23687) +++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c 2007-07-03 18:00:54 UTC (rev 23688) @@ -1611,7 +1611,7 @@ ber_printf (ber, "{"); ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_ID, utf8_dn); ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, utf8_password); - ber_printf (ber, "N}"); + ber_printf (ber, "n}"); if ((rc = ber_flatten (ber, &bv))<0) { DEBUG(0,("ldapsam_modify_entry: ber_flatten returns a value <0\n")); Modified: branches/SAMBA_3_0_25/source/passdb/pdb_ldap.c === --- branches/SAMBA_3_0_25/source/passdb/pdb_ldap.c 2007-07-03 16:27:35 UTC (rev 23687) +++ branches/SAMBA_3_0_25/source/passdb/pdb_ldap.c 2007-07-03 18:00:54 UTC (rev 23688) @@ -1611,7 +1611,7 @@ ber_printf (ber, "{"); ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_ID, utf8_dn); ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, utf8_password); - ber_printf (ber, "N}"); + ber_printf (ber, "n}"); if ((rc = ber_flatten (ber, &bv))<0) { DEBUG(0,("ldapsam_modify_entry: ber_flatten returns a value <0\n")); Modified: branches/SAMBA_3_0_26/source/passdb/pdb_ldap.c === --- branches/SAMBA_3_0_26/source/passdb/pdb_ldap.c 2007-07-03 16:27:35 UTC (rev 23687) +++ branches/SAMBA_3_0_26/source/passdb/pdb_ldap.c 2007-07-03 18:00:54 UTC (rev 23688) @@ -1611,7 +1611,7 @@ ber_printf (ber, "{"); ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_ID, utf8_dn); ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, utf8_password); - ber_printf (ber, "N}"); + ber_printf (ber, "n}"); if ((rc = ber_flatten (ber, &bv))<0) { DEBUG(0,("ldapsam_modify_entry: ber_flatten returns a value <0\n"));
svn commit: samba r23687 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2007-07-03 16:27:35 + (Tue, 03 Jul 2007) New Revision: 23687 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23687 Log: not every compiler supports __typeof__() metze Modified: branches/SAMBA_4_0/source/torture/rpc/spoolss.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/spoolss.c === --- branches/SAMBA_4_0/source/torture/rpc/spoolss.c 2007-07-03 15:44:58 UTC (rev 23686) +++ branches/SAMBA_4_0/source/torture/rpc/spoolss.c 2007-07-03 16:27:35 UTC (rev 23687) @@ -64,6 +64,8 @@ }\ } while(0) +/* not every compiler supports __typeof__() */ +#if (__GNUC__ >= 3) #define _CHECK_FIELD_SIZE(c,r,e,type) do {\ if (sizeof(__typeof__(c.e)) != sizeof(type)) { \ printf(__location__ ":" #c "." #e "field is not " #type "\n"); \ @@ -76,6 +78,9 @@ ret = False; \ }\ } while(0) +#else +#define _CHECK_FIELD_SIZE(c,r,e,type) do {} while(0) +#endif #if 0 /* unused */ #define COMPARE_UINT16(c,r,e) do {\
svn commit: samba r23686 - in branches/SAMBA_3_0_26/source/script: .
Author: metze Date: 2007-07-03 15:44:58 + (Tue, 03 Jul 2007) New Revision: 23686 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23686 Log: merge from SAMBA_4_0: Only use the bzr and git information when there's a .bzr or .git in the top branch directory I use bzr for my home directory and bzr version-info in ~/devel/samba/4.0/samba4-git gives the info about the ~/.bzr branch metze Modified: branches/SAMBA_3_0_26/source/script/mkversion.sh Changeset: Modified: branches/SAMBA_3_0_26/source/script/mkversion.sh === --- branches/SAMBA_3_0_26/source/script/mkversion.sh2007-07-03 14:46:06 UTC (rev 23685) +++ branches/SAMBA_3_0_26/source/script/mkversion.sh2007-07-03 15:44:58 UTC (rev 23686) @@ -91,7 +91,7 @@ TMP_MIRRORED_REVISION=`echo -e "${SVK_INFO}" | grep 'Mirrored From:.*samba\.org.*' |sed -e 's/Mirrored From: .* Rev\..* \([0-9]*\).*/\1/'` fi -if test x"${HAVEVER}" != x"yes";then +if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.bzr";then HAVEBZR=no BZR_INFO=`bzr version-info --check-clean ${SOURCE_DIR} 2>/dev/null` TMP_REVISION=`echo -e "${BZR_INFO}" | grep 'revno:' |sed -e 's/revno: \([0-9]*\).*/\1/'` @@ -104,7 +104,7 @@ TMP_CLEAN_TREE=`echo -e "${BZR_INFO}" | grep 'clean:' |sed -e 's/clean: \([a-zA-Z]*\).*/\1/'` fi -if test x"${HAVEVER}" != x"yes";then +if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.git";then HAVEGIT=no GIT_INFO=`git show --abbrev-commit HEAD 2>/dev/null` TMP_REVISION=`echo -e "${GIT_INFO}" | grep 'commit ' | sed 1q |sed -e 's/commit \([0-9a-f]*\).*/\1/'`
svn commit: samba r23685 - in branches/SAMBA_3_0/source/script: .
Author: metze Date: 2007-07-03 14:46:06 + (Tue, 03 Jul 2007) New Revision: 23685 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23685 Log: merge from SAMBA_4_0: Only use the bzr and git information when there's a .bzr or .git in the top branch directory I use bzr for my home directory and bzr version-info in ~/devel/samba/4.0/samba4-git gives the info about the ~/.bzr branch metze Modified: branches/SAMBA_3_0/source/script/mkversion.sh Changeset: Modified: branches/SAMBA_3_0/source/script/mkversion.sh === --- branches/SAMBA_3_0/source/script/mkversion.sh 2007-07-03 14:44:27 UTC (rev 23684) +++ branches/SAMBA_3_0/source/script/mkversion.sh 2007-07-03 14:46:06 UTC (rev 23685) @@ -91,7 +91,7 @@ TMP_MIRRORED_REVISION=`echo -e "${SVK_INFO}" | grep 'Mirrored From:.*samba\.org.*' |sed -e 's/Mirrored From: .* Rev\..* \([0-9]*\).*/\1/'` fi -if test x"${HAVEVER}" != x"yes";then +if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.bzr";then HAVEBZR=no BZR_INFO=`bzr version-info --check-clean ${SOURCE_DIR} 2>/dev/null` TMP_REVISION=`echo -e "${BZR_INFO}" | grep 'revno:' |sed -e 's/revno: \([0-9]*\).*/\1/'` @@ -104,7 +104,7 @@ TMP_CLEAN_TREE=`echo -e "${BZR_INFO}" | grep 'clean:' |sed -e 's/clean: \([a-zA-Z]*\).*/\1/'` fi -if test x"${HAVEVER}" != x"yes";then +if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.git";then HAVEGIT=no GIT_INFO=`git show --abbrev-commit HEAD 2>/dev/null` TMP_REVISION=`echo -e "${GIT_INFO}" | grep 'commit ' | sed 1q |sed -e 's/commit \([0-9a-f]*\).*/\1/'`
svn commit: samba r23684 - in branches/SAMBA_4_0/source/script: .
Author: metze Date: 2007-07-03 14:44:27 + (Tue, 03 Jul 2007) New Revision: 23684 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23684 Log: Only use the bzr and git information when there's a .bzr or .git in the top branch directory I use bzr for my home directory and bzr version-info in ~/devel/samba/4.0/samba4-git gives the info about the ~/.bzr branch metze Modified: branches/SAMBA_4_0/source/script/mkversion.sh Changeset: Modified: branches/SAMBA_4_0/source/script/mkversion.sh === --- branches/SAMBA_4_0/source/script/mkversion.sh 2007-07-03 13:11:56 UTC (rev 23683) +++ branches/SAMBA_4_0/source/script/mkversion.sh 2007-07-03 14:44:27 UTC (rev 23684) @@ -91,7 +91,7 @@ TMP_MIRRORED_REVISION=`echo -e "${SVK_INFO}" | grep 'Mirrored From:.*samba\.org.*' |sed -e 's/Mirrored From: .* Rev\..* \([0-9]*\).*/\1/'` fi -if test x"${HAVEVER}" != x"yes";then +if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.bzr";then HAVEBZR=no BZR_INFO=`bzr version-info --check-clean ${SOURCE_DIR} 2>/dev/null` TMP_REVISION=`echo -e "${BZR_INFO}" | grep 'revno:' |sed -e 's/revno: \([0-9]*\).*/\1/'` @@ -104,7 +104,7 @@ TMP_CLEAN_TREE=`echo -e "${BZR_INFO}" | grep 'clean:' |sed -e 's/clean: \([a-zA-Z]*\).*/\1/'` fi -if test x"${HAVEVER}" != x"yes";then +if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.git";then HAVEGIT=no GIT_INFO=`git show --abbrev-commit HEAD 2>/dev/null` TMP_REVISION=`echo -e "${GIT_INFO}" | grep 'commit ' | sed 1q |sed -e 's/commit \([0-9a-f]*\).*/\1/'`
svn commit: samba r23683 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_26/source/smbd
Author: idra Date: 2007-07-03 13:11:56 + (Tue, 03 Jul 2007) New Revision: 23683 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23683 Log: Check ports are in the correct range (1-65535) Modified: branches/SAMBA_3_0/source/smbd/sockinit.c branches/SAMBA_3_0_26/source/smbd/server.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/sockinit.c === --- branches/SAMBA_3_0/source/smbd/sockinit.c 2007-07-03 13:07:56 UTC (rev 23682) +++ branches/SAMBA_3_0/source/smbd/sockinit.c 2007-07-03 13:11:56 UTC (rev 23683) @@ -63,7 +63,7 @@ for (ptr=ports; next_token(&ptr, tok, " \t,", sizeof(tok)); ) { unsigned port = atoi(tok); - if (port == 0) { + if (port == 0 || port > 0x) { continue; } s = listenset[num_sockets] = open_socket_in(SOCK_STREAM, port, 0, ifip->s_addr, True); @@ -101,7 +101,7 @@ for (ptr=ports; next_token(&ptr, tok, " \t,", sizeof(tok)); ) { unsigned port = atoi(tok); - if (port == 0) continue; + if (port == 0 || port > 0x) continue; /* open an incoming socket */ s = open_socket_in(SOCK_STREAM, port, 0, interpret_addr(lp_socket_address()),True); Modified: branches/SAMBA_3_0_26/source/smbd/server.c === --- branches/SAMBA_3_0_26/source/smbd/server.c 2007-07-03 13:07:56 UTC (rev 23682) +++ branches/SAMBA_3_0_26/source/smbd/server.c 2007-07-03 13:11:56 UTC (rev 23683) @@ -381,7 +381,7 @@ for (ptr=ports; next_token(&ptr, tok, " \t,", sizeof(tok)); ) { unsigned port = atoi(tok); - if (port == 0) { + if (port == 0 || port > 0x) { continue; } s = fd_listenset[num_sockets] = open_socket_in(SOCK_STREAM, port, 0, ifip->s_addr, True); @@ -421,7 +421,7 @@ for (ptr=ports; next_token(&ptr, tok, " \t,", sizeof(tok)); ) { unsigned port = atoi(tok); - if (port == 0) continue; + if (port == 0 || port > 0x) continue; /* open an incoming socket */ s = open_socket_in(SOCK_STREAM, port, 0, interpret_addr(lp_socket_address()),True);
svn commit: samba r23682 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_26/source/smbd
Author: idra Date: 2007-07-03 13:07:56 + (Tue, 03 Jul 2007) New Revision: 23682 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23682 Log: Old patch I forgot in one of my 3.0.25 trees. Make sure we honour the directive not to allow machine password changes. Modified: branches/SAMBA_3_0/source/smbd/chgpasswd.c branches/SAMBA_3_0_26/source/smbd/chgpasswd.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/chgpasswd.c === --- branches/SAMBA_3_0/source/smbd/chgpasswd.c 2007-07-03 08:22:24 UTC (rev 23681) +++ branches/SAMBA_3_0/source/smbd/chgpasswd.c 2007-07-03 13:07:56 UTC (rev 23682) @@ -1019,6 +1019,7 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, BOOL as_root, uint32 *samr_reject_reason) { uint32 min_len; + uint32 refuse; struct passwd *pass = NULL; const char *username = pdb_get_username(hnd); time_t can_change_time = pdb_get_pass_can_change_time(hnd); @@ -1036,6 +1037,21 @@ return NT_STATUS_ACCOUNT_RESTRICTION; } + /* check to see if it is a Machine account and if the policy +* denies machines to change the password. * +* Should we deny also SRVTRUST and/or DOMSTRUST ? .SSS. */ + if (pdb_get_acct_ctrl(hnd) & ACB_WSTRUST) { + if (pdb_get_account_policy(AP_REFUSE_MACHINE_PW_CHANGE, &refuse) && refuse) { + DEBUG(1, ("Machine %s cannot change password now, " + "denied by Refuse Machine Password Change policy\n", + username)); + if (samr_reject_reason) { + *samr_reject_reason = REJECT_REASON_OTHER; + } + return NT_STATUS_ACCOUNT_RESTRICTION; + } + } + /* removed calculation here, becuase passdb now calculates based on policy. jmcd */ if ((can_change_time != 0) && (time(NULL) < can_change_time)) { Modified: branches/SAMBA_3_0_26/source/smbd/chgpasswd.c === --- branches/SAMBA_3_0_26/source/smbd/chgpasswd.c 2007-07-03 08:22:24 UTC (rev 23681) +++ branches/SAMBA_3_0_26/source/smbd/chgpasswd.c 2007-07-03 13:07:56 UTC (rev 23682) @@ -1019,6 +1019,7 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, BOOL as_root, uint32 *samr_reject_reason) { uint32 min_len; + uint32 refuse; struct passwd *pass = NULL; const char *username = pdb_get_username(hnd); time_t can_change_time = pdb_get_pass_can_change_time(hnd); @@ -1036,6 +1037,21 @@ return NT_STATUS_ACCOUNT_RESTRICTION; } + /* check to see if it is a Machine account and if the policy +* denies machines to change the password. * +* Should we deny also SRVTRUST and/or DOMSTRUST ? .SSS. */ + if (pdb_get_acct_ctrl(hnd) & ACB_WSTRUST) { + if (pdb_get_account_policy(AP_REFUSE_MACHINE_PW_CHANGE, &refuse) && refuse) { + DEBUG(1, ("Machine %s cannot change password now, " + "denied by Refuse Machine Password Change policy\n", + username)); + if (samr_reject_reason) { + *samr_reject_reason = REJECT_REASON_OTHER; + } + return NT_STATUS_ACCOUNT_RESTRICTION; + } + } + /* removed calculation here, becuase passdb now calculates based on policy. jmcd */ if ((can_change_time != 0) && (time(NULL) < can_change_time)) {
svn commit: samba-docs r1133 - in trunk/Samba3-ByExample: .
Author: jht Date: 2007-07-03 12:32:50 + (Tue, 03 Jul 2007) New Revision: 1133 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1133 Log: Fix provided by Gavin Henry. Modified: trunk/Samba3-ByExample/SBE-Appendix1.xml Changeset: Modified: trunk/Samba3-ByExample/SBE-Appendix1.xml === --- trunk/Samba3-ByExample/SBE-Appendix1.xml2007-06-28 22:15:11 UTC (rev 1132) +++ trunk/Samba3-ByExample/SBE-Appendix1.xml2007-07-03 12:32:50 UTC (rev 1133) @@ -864,7 +864,7 @@ LDAP Pre-configuration Script: SMBLDAP-ldif-preconfig.sh &smbmdash; Part C -cat >>EOL +cat <
svn commit: samba r23681 - in branches/SAMBA_4_0/source/script: .
Author: metze Date: 2007-07-03 08:22:24 + (Tue, 03 Jul 2007) New Revision: 23681 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23681 Log: merge 23670 from SAMBA_3_0: metze Modified: branches/SAMBA_4_0/source/script/mkversion.sh Changeset: Modified: branches/SAMBA_4_0/source/script/mkversion.sh === --- branches/SAMBA_4_0/source/script/mkversion.sh 2007-07-03 08:05:55 UTC (rev 23680) +++ branches/SAMBA_4_0/source/script/mkversion.sh 2007-07-03 08:22:24 UTC (rev 23681) @@ -107,7 +107,7 @@ if test x"${HAVEVER}" != x"yes";then HAVEGIT=no GIT_INFO=`git show --abbrev-commit HEAD 2>/dev/null` - TMP_REVISION=`echo -e "${GIT_INFO}" | grep 'commit ' |sed -e 's/commit \([0-9a-f]*\).*/\1/'` + TMP_REVISION=`echo -e "${GIT_INFO}" | grep 'commit ' | sed 1q |sed -e 's/commit \([0-9a-f]*\).*/\1/'` if test -n "$TMP_REVISION";then HAVEGIT=yes HAVEVER=yes
svn commit: samba r23680 - in branches/SAMBA_4_0/source: auth auth/ntlmssp param rpc_server/netlogon scripting/ejs selftest smb_server/smb
Author: abartlet Date: 2007-07-03 08:05:55 + (Tue, 03 Jul 2007) New Revision: 23680 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23680 Log: Make it easier to setup a domain member server - the 'server role' will now control the auth methods, but an override is still available, ex: auth methods:domain controller = Andrew Bartlett Modified: branches/SAMBA_4_0/source/auth/auth.c branches/SAMBA_4_0/source/auth/auth_simple.c branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_server.c branches/SAMBA_4_0/source/param/loadparm.c branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c branches/SAMBA_4_0/source/selftest/Samba4.pm branches/SAMBA_4_0/source/smb_server/smb/negprot.c branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c Changeset: Modified: branches/SAMBA_4_0/source/auth/auth.c === --- branches/SAMBA_4_0/source/auth/auth.c 2007-07-03 08:01:34 UTC (rev 23679) +++ branches/SAMBA_4_0/source/auth/auth.c 2007-07-03 08:05:55 UTC (rev 23680) @@ -348,11 +348,12 @@ /*** Make a auth_info struct for the auth subsystem + - Allow the caller to specify the methods to use ***/ -NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx, const char **methods, -struct event_context *ev, -struct messaging_context *msg, -struct auth_context **auth_ctx) +NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **methods, +struct event_context *ev, +struct messaging_context *msg, +struct auth_context **auth_ctx) { int i; struct auth_context *ctx; @@ -406,7 +407,31 @@ return NT_STATUS_OK; } +/*** + Make a auth_info struct for the auth subsystem + - Uses default auth_methods, depending on server role and smb.conf settings +***/ +NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx, +struct event_context *ev, +struct messaging_context *msg, +struct auth_context **auth_ctx) +{ + const char **auth_methods = NULL; + switch (lp_server_role()) { + case ROLE_STANDALONE: + auth_methods = lp_parm_string_list(-1, "auth methods", "standalone", NULL); + break; + case ROLE_DOMAIN_MEMBER: + auth_methods = lp_parm_string_list(-1, "auth methods", "member server", NULL); + break; + case ROLE_DOMAIN_CONTROLLER: + auth_methods = lp_parm_string_list(-1, "auth methods", "domain controller", NULL); + break; + } + return auth_context_create_methods(mem_ctx, auth_methods, ev, msg, auth_ctx); +} + /* the list of currently registered AUTH backends */ static struct auth_backend { const struct auth_operations *ops; Modified: branches/SAMBA_4_0/source/auth/auth_simple.c === --- branches/SAMBA_4_0/source/auth/auth_simple.c2007-07-03 08:01:34 UTC (rev 23679) +++ branches/SAMBA_4_0/source/auth/auth_simple.c2007-07-03 08:05:55 UTC (rev 23680) @@ -48,7 +48,7 @@ return NT_STATUS_NO_MEMORY; } - nt_status = auth_context_create(tmp_ctx, lp_auth_methods(), + nt_status = auth_context_create(tmp_ctx, ev, msg, &auth_context); if (!NT_STATUS_IS_OK(nt_status)) { Modified: branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_server.c === --- branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_server.c 2007-07-03 08:01:34 UTC (rev 23679) +++ branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_server.c 2007-07-03 08:05:55 UTC (rev 23680) @@ -835,7 +835,7 @@ gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_SEAL; } - nt_status = auth_context_create(gensec_ntlmssp_state, lp_auth_methods(), + nt_status = auth_context_create(gensec_ntlmssp_state, gensec_security->event_ctx, gensec_security->msg_ctx, &gensec_ntlmssp_state->auth_context); Modified: branches/SAMBA_4_0/source/param/loadparm.c === --- branches/SAMBA_4_0/source/param/loadparm.c 2007-07-03 08:01
svn commit: samba r23679 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
Author: abartlet Date: 2007-07-03 08:01:34 + (Tue, 03 Jul 2007) New Revision: 23679 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23679 Log: invocationID is a GUID too. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c 2007-07-03 08:00:08 UTC (rev 23678) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c 2007-07-03 08:01:34 UTC (rev 23679) @@ -321,6 +321,18 @@ }, }, }, + /* invocationId */ + { + .local_name = "invocationId", + .type = MAP_CONVERT, + .u = { + .convert = { + .remote_name = "invocationId", + .convert_local = guid_always_string, + .convert_remote = encode_guid, + }, + }, + }, /* objectSid */ { .local_name = "objectSid",
svn commit: samba r23678 - in branches/SAMBA_4_0/source: heimdal/kdc heimdal/lib/asn1 heimdal/lib/com_err heimdal/lib/gssapi/krb5 heimdal/lib/gssapi/mech heimdal/lib/gssapi/spnego heimdal/lib/hcrypto
Author: abartlet Date: 2007-07-03 08:00:08 + (Tue, 03 Jul 2007) New Revision: 23678 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23678 Log: Update to current lorikeet-heimdal (-r 767), which should fix the panics on hosts without /dev/random. Andrew Bartlett Added: branches/SAMBA_4_0/source/heimdal/lib/hcrypto/rand-timer.c Modified: branches/SAMBA_4_0/source/heimdal/kdc/default_config.c branches/SAMBA_4_0/source/heimdal/kdc/digest.c branches/SAMBA_4_0/source/heimdal/kdc/kdc-protos.h branches/SAMBA_4_0/source/heimdal/kdc/kdc.h branches/SAMBA_4_0/source/heimdal/kdc/krb5tgs.c branches/SAMBA_4_0/source/heimdal/kdc/misc.c branches/SAMBA_4_0/source/heimdal/kdc/pkinit.c branches/SAMBA_4_0/source/heimdal/lib/asn1/k5.asn1 branches/SAMBA_4_0/source/heimdal/lib/asn1/lex.c branches/SAMBA_4_0/source/heimdal/lib/asn1/pkinit.asn1 branches/SAMBA_4_0/source/heimdal/lib/com_err/lex.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/krb5/acquire_cred.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/krb5/display_name.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/krb5/prf.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/krb5/release_name.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/context.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/gss_accept_sec_context.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/gss_display_name.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/gss_display_status.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/gss_duplicate_name.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/gss_inquire_context.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/gss_inquire_cred_by_mech.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/gss_krb5.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/mech/gss_set_cred_option.c branches/SAMBA_4_0/source/heimdal/lib/gssapi/spnego/accept_sec_context.c branches/SAMBA_4_0/source/heimdal/lib/hcrypto/pkcs12.c branches/SAMBA_4_0/source/heimdal/lib/hcrypto/rand-egd.c branches/SAMBA_4_0/source/heimdal/lib/hcrypto/rand-fortuna.c branches/SAMBA_4_0/source/heimdal/lib/hcrypto/rand.c branches/SAMBA_4_0/source/heimdal/lib/hcrypto/randi.h branches/SAMBA_4_0/source/heimdal/lib/hcrypto/rsa-imath.c branches/SAMBA_4_0/source/heimdal/lib/hdb/ext.c branches/SAMBA_4_0/source/heimdal/lib/hx509/cert.c branches/SAMBA_4_0/source/heimdal/lib/hx509/cms.c branches/SAMBA_4_0/source/heimdal/lib/hx509/crypto.c branches/SAMBA_4_0/source/heimdal/lib/hx509/file.c branches/SAMBA_4_0/source/heimdal/lib/hx509/hx509-private.h branches/SAMBA_4_0/source/heimdal/lib/hx509/hx509-protos.h branches/SAMBA_4_0/source/heimdal/lib/hx509/hx509.h branches/SAMBA_4_0/source/heimdal/lib/hx509/hx_locl.h branches/SAMBA_4_0/source/heimdal/lib/hx509/keyset.c branches/SAMBA_4_0/source/heimdal/lib/hx509/ks_file.c branches/SAMBA_4_0/source/heimdal/lib/hx509/ks_keychain.c branches/SAMBA_4_0/source/heimdal/lib/hx509/ks_p11.c branches/SAMBA_4_0/source/heimdal/lib/hx509/ks_p12.c branches/SAMBA_4_0/source/heimdal/lib/hx509/req.c branches/SAMBA_4_0/source/heimdal/lib/hx509/revoke.c branches/SAMBA_4_0/source/heimdal/lib/krb5/crypto.c branches/SAMBA_4_0/source/heimdal/lib/krb5/get_cred.c branches/SAMBA_4_0/source/heimdal/lib/krb5/init_creds_pw.c branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5-private.h branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5-protos.h branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5.h branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5_err.et branches/SAMBA_4_0/source/heimdal/lib/krb5/krbhst.c branches/SAMBA_4_0/source/heimdal/lib/krb5/misc.c branches/SAMBA_4_0/source/heimdal/lib/krb5/pac.c branches/SAMBA_4_0/source/heimdal/lib/krb5/pkinit.c branches/SAMBA_4_0/source/heimdal/lib/krb5/plugin.c branches/SAMBA_4_0/source/heimdal/lib/krb5/principal.c branches/SAMBA_4_0/source/heimdal/lib/krb5/rd_error.c branches/SAMBA_4_0/source/heimdal/lib/krb5/send_to_kdc.c branches/SAMBA_4_0/source/heimdal/lib/ntlm/heimntlm-protos.h branches/SAMBA_4_0/source/heimdal/lib/ntlm/ntlm.c branches/SAMBA_4_0/source/heimdal/lib/roken/roken_gethostby.c branches/SAMBA_4_0/source/heimdal_build/config.mk Changeset: Sorry, the patch is too large (5836 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23678
svn commit: samba r23677 - in branches/SAMBA_4_0/source/pidl/tests: .
Author: abartlet Date: 2007-07-03 07:28:46 + (Tue, 03 Jul 2007) New Revision: 23677 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23677 Log: When I removed data_blob_equal, I clearly didn't test the PIDL code. Fix these to use the new data_blob_cmp() Andrew Bartlett Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl Changeset: Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl === --- branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl 2007-07-03 06:20:00 UTC (rev 23676) +++ branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl 2007-07-03 07:28:46 UTC (rev 23677) @@ -29,7 +29,7 @@ result_blob = ndr_push_blob(ndr); - if (!data_blob_equal(&result_blob, &expected_blob)) + if (data_blob_cmp(&result_blob, &expected_blob) != 0) return 2; '); @@ -54,7 +54,7 @@ result_blob = ndr_push_blob(ndr); - if (!data_blob_equal(&result_blob, &expected_blob)) + if (data_blob_cmp(&result_blob, &expected_blob) != 0) return 2; '); @@ -81,7 +81,7 @@ result_blob = ndr_push_blob(ndr); - if (!data_blob_equal(&result_blob, &expected_blob)) + if (data_blob_cmp(&result_blob, &expected_blob) != 0) return 2; '); @@ -108,7 +108,7 @@ result_blob = ndr_push_blob(ndr); - if (!data_blob_equal(&result_blob, &expected_blob)) + if (data_blob_cmp(&result_blob, &expected_blob) != 0) return 2; '); @@ -138,6 +138,6 @@ result_blob = ndr_push_blob(ndr); - if (!data_blob_equal(&result_blob, &expected_blob)) + if (data_blob_cmp(&result_blob, &expected_blob) != 0) return 2; '); Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl === --- branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl 2007-07-03 06:20:00 UTC (rev 23676) +++ branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl 2007-07-03 07:28:46 UTC (rev 23677) @@ -22,7 +22,7 @@ result_blob = ndr_push_blob(ndr); - if (!data_blob_equal(&result_blob, &expected_blob)) + if (data_blob_cmp(&result_blob, &expected_blob) != 0) return 2; '); @@ -41,7 +41,7 @@ result_blob = ndr_push_blob(ndr); - if (!data_blob_equal(&result_blob, &expected_blob)) + if (data_blob_cmp(&result_blob, &expected_blob) != 0) return 2; '); @@ -61,6 +61,6 @@ result_blob = ndr_push_blob(ndr); - if (!data_blob_equal(&result_blob, &expected_blob)) + if (data_blob_cmp(&result_blob, &expected_blob) != 0) return 2; ');