Rev 276: - merge from ronnie in http://samba.org/~tridge/ctdb
revno: 276 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Fri 2007-05-11 10:33:43 +1000 message: - merge from ronnie - increment rsn only in become_dmaster - add torture check for rsn regression in ctdb_ltdb_store modified: common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1 common/ctdb_client.c ctdb_client.c-20070411010216-3kd8v37k61steeya-1 common/ctdb_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2 revno: 197.1.100 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Fri 2007-05-11 06:08:17 +1000 message: we must bump the rsn everytime we do a REQ_DMASTER or a REPLY_DMASTER to make sure that the "merge records based on rsn during recovery" will merge correctly. this is extra important since samba3 never bumps the record when it writes new data to it ! revno: 197.1.99 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Fri 2007-05-11 05:40:11 +1000 message: make ctdb_control catdb work again revno: 197.1.98 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg <[EMAIL PROTECTED]> branch nick: ctdb timestamp: Thu 2007-05-10 17:59:51 +1000 message: merge from tridge === modified file 'common/ctdb_call.c' --- a/common/ctdb_call.c2007-05-10 07:43:45 + +++ b/common/ctdb_call.c2007-05-11 00:33:43 + @@ -295,7 +295,7 @@ DEBUG(2,("vnn %u dmaster response %08x\n", ctdb->vnn, ctdb_hash(&key))); ZERO_STRUCT(header); - header.rsn = rsn; + header.rsn = rsn + 1; header.dmaster = ctdb->vnn; if (ctdb_ltdb_store(ctdb_db, key, &header, data) != 0) { === modified file 'common/ctdb_client.c' --- a/common/ctdb_client.c 2007-05-10 07:43:45 + +++ b/common/ctdb_client.c 2007-05-10 19:40:11 + @@ -1037,17 +1037,16 @@ { int i, ret; TDB_DATA indata, outdata; + struct ctdb_control_pulldb pull; + struct ctdb_control_pulldb_reply *reply; + struct ctdb_rec_data *rec; int32_t res; - unsigned char *ptr; - - DEBUG(0,("ronnie to fix!\n")); - return -1; - - indata.dsize = 2*sizeof(uint32_t); - indata.dptr = (unsigned char *)talloc_array(mem_ctx, uint32_t, 2); - - ((uint32_t *)(&indata.dptr[0]))[0] = dbid; - ((uint32_t *)(&indata.dptr[0]))[1] = lmaster; + + pull.db_id = dbid; + pull.lmaster = lmaster; + + indata.dsize = sizeof(struct ctdb_control_pulldb); + indata.dptr = (unsigned char *)&pull; ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_PULL_DB, 0, indata, @@ -1058,45 +1057,34 @@ } - keys->dbid = ((uint32_t *)(&outdata.dptr[0]))[0]; - keys->num= ((uint32_t *)(&outdata.dptr[0]))[1]; - keys->keys =talloc_array(mem_ctx, TDB_DATA, keys->num); - keys->headers=talloc_array(mem_ctx, struct ctdb_ltdb_header, keys->num); - keys->lmasters=talloc_array(mem_ctx, uint32_t, keys->num); - keys->data=talloc_array(mem_ctx, TDB_DATA, keys->num); - - /* loop over all key/data pairs */ - ptr=&outdata.dptr[8]; - for(i=0;inum;i++){ - TDB_DATA *key, *data; - - keys->lmasters[i] = *((uint32_t *)ptr); - ptr += 4; - - key = &keys->keys[i]; - key->dsize = *((uint32_t *)ptr); - key->dptr = talloc_size(mem_ctx, key->dsize); - ptr += 4; - - data = &keys->data[i]; - data->dsize = *((uint32_t *)ptr); - data->dptr = talloc_size(mem_ctx, data->dsize); - ptr += 4; - - ptr = outdata.dptr+(((ptr-outdata.dptr)+CTDB_DS_ALIGNMENT-1)& ~(CTDB_DS_ALIGNMENT-1)); - memcpy(key->dptr, ptr, key->dsize); - ptr += key->dsize; - - ptr = outdata.dptr+(((ptr-outdata.dptr)+CTDB_DS_ALIGNMENT-1)& ~(CTDB_DS_ALIGNMENT-1)); - memcpy(&keys->headers[i], ptr, sizeof(struct ctdb_ltdb_header)); - ptr += sizeof(struct ctdb_ltdb_header); - - ptr = outdata.dptr+(((ptr-outdata.dptr)+CTDB_DS_ALIGNMENT-1)& ~(CTDB_DS_ALIGNMENT-1)); - memcpy(data->dptr, ptr, data->dsize); - ptr += data->dsize; - - ptr = outdata.dptr+(((ptr-outdata.dptr)+CTDB_DS
Build status as of Fri May 11 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-05-10 00:00:21.0 + +++ /home/build/master/cache/broken_results.txt 2007-05-11 00:01:01.0 + @@ -1,25 +1,25 @@ -Build status as of Thu May 10 00:00:02 2007 +Build status as of Fri May 11 00:00:02 2007 Build counts: Tree Total Broken Panic SOC 0 0 0 build_farm 0 0 0 -ccache 34 6 0 +ccache 35 6 0 ctdb 0 0 0 distcc 3 0 0 ldb 34 6 0 libreplace 33 10 0 lorikeet-heimdal 29 14 0 -pidl 17 4 0 -ppp 13 0 0 +pidl 18 4 0 +ppp 14 0 0 python 0 0 0 rsync35 17 0 samba0 0 0 samba-docs 0 0 0 samba-gtk4 3 0 samba4 36 32 1 -samba_3_039 23 0 +samba_3_040 24 0 smb-build31 30 0 -talloc 35 1 0 +talloc 34 1 0 tdb 34 3 0
svn commit: samba r22783 - in branches/SAMBA_3_0_RELEASE/source: .
Author: jerry Date: 2007-05-10 22:20:22 + (Thu, 10 May 2007) New Revision: 22783 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22783 Log: this will be 3.0.25 Modified: branches/SAMBA_3_0_RELEASE/source/VERSION Changeset: Modified: branches/SAMBA_3_0_RELEASE/source/VERSION === --- branches/SAMBA_3_0_RELEASE/source/VERSION 2007-05-10 21:43:27 UTC (rev 22782) +++ branches/SAMBA_3_0_RELEASE/source/VERSION 2007-05-10 22:20:22 UTC (rev 22783) @@ -56,7 +56,7 @@ # e.g. SAMBA_VERSION_RC_RELEASE=1 # # -> "3.0.0rc1" # -SAMBA_VERSION_RC_RELEASE=4 +SAMBA_VERSION_RC_RELEASE= # To mark SVN snapshots this should be set to 'yes'#
svn commit: samba r22782 - in branches/SAMBA_3_0_RELEASE: .
Author: jerry Date: 2007-05-10 21:43:27 + (Thu, 10 May 2007) New Revision: 22782 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22782 Log: add commits since 3.0.25rc3 to the release notes Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt Changeset: Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt === --- branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2007-05-10 21:16:36 UTC (rev 22781) +++ branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2007-05-10 21:43:27 UTC (rev 22782) @@ -135,7 +135,65 @@ --- +o Jeremy Allison <[EMAIL PROTECTED]> +* Fix memory corruption bug during string processing. +* Instantiate idiom that malloc/tallocs of array of 0 elements + returns NULL. +* Fix marshalling bugs in samr code based on incorrect + assumptions. +* Fix DFS MS-RPC enumeration reply when we have no DFS shares. +* Fix memory curruption when enumerating accounts in the + LsaPrivilege database. + +o Gerald (Jerry) Carter <[EMAIL PROTECTED]> +* Fix memory corruption when adding/removing members from Local + Groups. + + +o Guenther Deschner <[EMAIL PROTECTED]> +* Prevent leaking on full NET_USER_INFO_3 structure memory on each + cached login. +* Plug memory leak in client SPNEGO session setup code. +* Don't clear cached U/SID and UG/SID entries when we want to + logon offline. + + +o Steve French <[EMAIL PROTECTED]> +* Allow prepaths in mount.cifs. +* Don't prompt for a password in mount.cifs when sec=none has been + specified. + + +o Volker Lendecke <[EMAIL PROTECTED]> +* Fix memory corruption bug in string_replace(). +* Fix valgrind error in parse_domain_user(). +* Fix compilation of explicit --without-winbind. +* Fix an uninitialized variable and other compiler warnings. +* Fix memory leak in smbd's claim session code. + + +o Stefan Metzmacher <[EMAIL PROTECTED]> +* Add AC_GNU_SOURCE macro in libreplace for systems which don't have it. +* Fix libreplace compiler warnings. + + +o Jens Nissen <[EMAIL PROTECTED]> +* Fix memory leak on the file/directory ACL processing code. + + +o Simo Sorce <[EMAIL PROTECTED]> +* Memory allocation cleanups and sanity checks after the malloc(0) + == NULL crusade. +* Fix socket leak in idmap_ldap.c. +* Fix failure in "net idmap restore". +* Fix crash bug in idmap_ldap's get_credentials() code. + + +o Alison Winters <[EMAIL PROTECTED]> +* Add missing return calls in sendfilereadbraw. + + Changes since 3.0.24
svn commit: samba r22781 - in branches/SAMBA_3_0_RELEASE/source/client: .
Author: jerry Date: 2007-05-10 21:16:36 + (Thu, 10 May 2007) New Revision: 22781 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22781 Log: grab Steve's patch for mount.cifs and sec=none Modified: branches/SAMBA_3_0_RELEASE/source/client/mount.cifs.c Changeset: Modified: branches/SAMBA_3_0_RELEASE/source/client/mount.cifs.c === --- branches/SAMBA_3_0_RELEASE/source/client/mount.cifs.c 2007-05-10 21:12:53 UTC (rev 22780) +++ branches/SAMBA_3_0_RELEASE/source/client/mount.cifs.c 2007-05-10 21:16:36 UTC (rev 22781) @@ -419,6 +419,11 @@ printf("password too long\n"); return 1; } + } else if (strncmp(data, "sec", 3) == 0) { + if (value) { + if (!strcmp(value, "none")) + got_password = 1; + } } else if (strncmp(data, "ip", 2) == 0) { if (!value || !*value) { printf("target ip address argument missing"); @@ -567,8 +572,6 @@ *filesys_flags &= ~MS_NOEXEC; } else if (strncmp(data, "guest", 5) == 0) { got_password=1; -/* remove the parm since it would otherwise be logged by kern */ - goto nocopy; } else if (strncmp(data, "ro", 2) == 0) { *filesys_flags |= MS_RDONLY; } else if (strncmp(data, "rw", 2) == 0) {
svn commit: samba r22780 - in branches/SAMBA_3_0_RELEASE: .
Author: jerry Date: 2007-05-10 21:12:53 + (Thu, 10 May 2007) New Revision: 22780 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22780 Log: start prepping the release notes for 3.0.25 Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt Changeset: Sorry, the patch is too large (922 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22780
svn commit: samba r22779 - in branches/SAMBA_3_0/source/client: .
Author: sfrench Date: 2007-05-10 19:16:36 + (Thu, 10 May 2007) New Revision: 22779 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22779 Log: Patch for not prompting for password on cifs mounts when "sec=none" specified Modified: branches/SAMBA_3_0/source/client/mount.cifs.c Changeset: Modified: branches/SAMBA_3_0/source/client/mount.cifs.c === --- branches/SAMBA_3_0/source/client/mount.cifs.c 2007-05-10 19:12:32 UTC (rev 22778) +++ branches/SAMBA_3_0/source/client/mount.cifs.c 2007-05-10 19:16:36 UTC (rev 22779) @@ -79,8 +79,8 @@ static char * mountpassword = NULL; char * domain_name = NULL; char * prefixpath = NULL; +char * servern = NULL; - /* BB finish BB cifs_umount @@ -128,7 +128,8 @@ struct passwd *password = getpwuid(getuid()); if (password) { - username = password->pw_name; + if(password->pw_name); + username = strdup(password->pw_name); } return username; } @@ -419,6 +420,11 @@ printf("password too long\n"); return 1; } + } else if (strncmp(data, "sec", 3) == 0) { + if (value) { + if (!strcmp(value, "none")) + got_password = 1; + } } else if (strncmp(data, "ip", 2) == 0) { if (!value || !*value) { printf("target ip address argument missing"); @@ -567,8 +573,6 @@ *filesys_flags &= ~MS_NOEXEC; } else if (strncmp(data, "guest", 5) == 0) { got_password=1; -/* remove the parm since it would otherwise be logged by kern */ - goto nocopy; } else if (strncmp(data, "ro", 2) == 0) { *filesys_flags |= MS_RDONLY; } else if (strncmp(data, "rw", 2) == 0) { @@ -805,6 +809,9 @@ if(got_ip == 0) { host_entry = gethostbyname(unc_name); } + if(strnlen(unc_name, 16) < 16) { + servern = strdup(unc_name); + } *(share - 1) = '/'; /* put the slash back */ if ((prefixpath = strchr(share, '/'))) { *prefixpath = 0; /* permanently terminate the string */ @@ -880,7 +887,7 @@ char * ipaddr = NULL; char * uuid = NULL; char * mountpoint = NULL; - char * options; + char * options = NULL; char * resolved_path; char * temp; int rc; @@ -892,6 +899,7 @@ int optlen = 0; int orgoptlen = 0; int retry = 0; /* set when we have to retry mount with uppercase */ + int retry_with_rfc1001name = 0; /* set when we have to retry with netbios name */ struct stat statbuf; struct utsname sysinfo; struct mntent mountent; @@ -1152,26 +1160,40 @@ optlen += strlen(ipaddr) + 4; if(mountpassword) optlen += strlen(mountpassword) + 6; - options = (char *)malloc(optlen + 10 + 64 /* space for commas in password */ + 8 /* space for domain= , domain name itself was counted as part of the length username string above */); + if(options) { + printf("\norg options %s at %p\n", options, options); /* BB removeme BB */ + free(options); + } + options = malloc(optlen + 10 + 64 /* space for commas in password */ + 8 /* space for domain= , domain name itself was counted as part of the length username string above */) + 9 /* servern=" */ + 16 /* space for maximum RFC1001 name */; if(options == NULL) { printf("Could not allocate memory for mount options\n"); return -1; } - + printf("\noptions %s at %p\n", options, options); /* BB removeme BB */ + options = realloc(options, 3350); /* BB removeme BB */ + printf("\nrealloc seems ok\n"); /* BB removeme BB */ options[0] = 0; strncat(options,"unc=",4); strcat(options,share_name); /* scan backwards and reverse direction of slash */ temp = strrchr(options, '/'); + options = realloc(options, 980); /* BB removeme BB */ + printf("\nrealloc seemms very ok\n"); /* BB removeme BB */ if(temp > options + 6) *temp = '\\'; if(ipaddr) { strncat(options,",ip=",4); strcat(options,ipaddr); } - + if((servern) && retry_with_rfc1001name) { +
svn commit: samba r22778 - in branches/SAMBA_3_0_25/source/client: .
Author: sfrench Date: 2007-05-10 19:12:32 + (Thu, 10 May 2007) New Revision: 22778 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22778 Log: Patch for not prompting for password on cifs mounts when "sec=none" specified Modified: branches/SAMBA_3_0_25/source/client/mount.cifs.c Changeset: Modified: branches/SAMBA_3_0_25/source/client/mount.cifs.c === --- branches/SAMBA_3_0_25/source/client/mount.cifs.c2007-05-10 13:31:15 UTC (rev 22777) +++ branches/SAMBA_3_0_25/source/client/mount.cifs.c2007-05-10 19:12:32 UTC (rev 22778) @@ -419,6 +419,11 @@ printf("password too long\n"); return 1; } + } else if (strncmp(data, "sec", 3) == 0) { + if (value) { + if (!strcmp(value, "none")) + got_password = 1; + } } else if (strncmp(data, "ip", 2) == 0) { if (!value || !*value) { printf("target ip address argument missing"); @@ -567,8 +572,6 @@ *filesys_flags &= ~MS_NOEXEC; } else if (strncmp(data, "guest", 5) == 0) { got_password=1; -/* remove the parm since it would otherwise be logged by kern */ - goto nocopy; } else if (strncmp(data, "ro", 2) == 0) { *filesys_flags |= MS_RDONLY; } else if (strncmp(data, "rw", 2) == 0) {
svn commit: samba-docs r1110 - in trunk/manpages-3: .
Author: vlendec Date: 2007-05-10 17:07:44 + (Thu, 10 May 2007) New Revision: 1110 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1110 Log: Rename fam_notify to notify_fam. Thanks to Bj?\195?\182rn for notifying us ;-) Added: trunk/manpages-3/vfs_notify_fam.8.xml Removed: trunk/manpages-3/vfs_fam_notify.8.xml Changeset: Deleted: trunk/manpages-3/vfs_fam_notify.8.xml === --- trunk/manpages-3/vfs_fam_notify.8.xml 2007-05-10 17:07:03 UTC (rev 1109) +++ trunk/manpages-3/vfs_fam_notify.8.xml 2007-05-10 17:07:44 UTC (rev 1110) @@ -1,67 +0,0 @@ - -http://www.samba.org/samba/DTD/samba-doc";> - - - - vfs_notify_fam - 8 - - - - - vfs_notify_fam - FAM support for file change notifications - - - - - vfs objects = notify_fam - - - - - DESCRIPTION - - This VFS module is part of the - samba - 7 suite. - - The vfs_notify_fam module makes use of - the system FAM (File Alteration Monitor) daemon to implement - file change notifications for Windows clients. FAM is generally - present only on IRIX and some BSD systems. - - This module is not stackable. - - - - - EXAMPLES - - Support FAM notifications globally: - - - - notify_fam - - - - - - VERSION - - This man page is correct for version 3.0.25 of the Samba suite. - - - - - AUTHOR - - The original Samba software and related utilities - were created by Andrew Tridgell. Samba is now developed - by the Samba Team as an Open Source project similar - to the way the Linux kernel is developed. - - - - Copied: trunk/manpages-3/vfs_notify_fam.8.xml (from rev 1109, trunk/manpages-3/vfs_fam_notify.8.xml)
svn commit: samba-docs r1109 - in trunk/manpages-3: .
Author: vlendec Date: 2007-05-10 17:07:03 + (Thu, 10 May 2007) New Revision: 1109 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1109 Log: Change contents from fam_notify to notify_fam Modified: trunk/manpages-3/vfs_fam_notify.8.xml Changeset: Modified: trunk/manpages-3/vfs_fam_notify.8.xml === --- trunk/manpages-3/vfs_fam_notify.8.xml 2007-05-07 10:40:00 UTC (rev 1108) +++ trunk/manpages-3/vfs_fam_notify.8.xml 2007-05-10 17:07:03 UTC (rev 1109) @@ -1,21 +1,21 @@ http://www.samba.org/samba/DTD/samba-doc";> - + - vfs_fam_notify + vfs_notify_fam 8 - vfs_fam_notify + vfs_notify_fam FAM support for file change notifications - vfs objects = fam_notify + vfs objects = notify_fam @@ -26,7 +26,7 @@ samba 7 suite. - The vfs_fam_notify module makes use of + The vfs_notify_fam module makes use of the system FAM (File Alteration Monitor) daemon to implement file change notifications for Windows clients. FAM is generally present only on IRIX and some BSD systems. @@ -42,7 +42,7 @@ - fam_notify + notify_fam
svn commit: samba r22777 - in branches: SAMBA_3_0/source SAMBA_3_0/source/modules SAMBA_3_0_25/source SAMBA_3_0_25/source/modules SAMBA_3_0_26/source SAMBA_3_0_26/source/modules
Author: obnox Date: 2007-05-10 13:31:15 + (Thu, 10 May 2007) New Revision: 22777 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22777 Log: Fix for [Bug 4543] - POSIX ACL support on FreeBSD. This adds vfs_posixacl to the list of static modules and makes use of HAVE_ACL_GET_PERM_NP. This is just a quick fix. FreeBSD acl support is still hardcoded in configure.in, but actually this could be detected in a unified test for freebsd, linux, *, as suggested in the bugreport. This has still to be checked and elaborated. Michael Modified: branches/SAMBA_3_0/source/configure.in branches/SAMBA_3_0/source/modules/vfs_posixacl.c branches/SAMBA_3_0_25/source/configure.in branches/SAMBA_3_0_25/source/modules/vfs_posixacl.c branches/SAMBA_3_0_26/source/configure.in branches/SAMBA_3_0_26/source/modules/vfs_posixacl.c Changeset: Modified: branches/SAMBA_3_0/source/configure.in === --- branches/SAMBA_3_0/source/configure.in 2007-05-10 12:41:20 UTC (rev 22776) +++ branches/SAMBA_3_0/source/configure.in 2007-05-10 13:31:15 UTC (rev 22777) @@ -5303,6 +5303,7 @@ AC_MSG_RESULT(Using FreeBSD posix ACLs) AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether FreeBSD POSIX ACLs are available]) AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available]) + default_static_modules="$default_static_modules vfs_posixacl" ;; *linux*) AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"]) Modified: branches/SAMBA_3_0/source/modules/vfs_posixacl.c === --- branches/SAMBA_3_0/source/modules/vfs_posixacl.c2007-05-10 12:41:20 UTC (rev 22776) +++ branches/SAMBA_3_0/source/modules/vfs_posixacl.c2007-05-10 13:31:15 UTC (rev 22777) @@ -200,9 +200,15 @@ return False; } ace->a_perm = 0; +#ifdef HAVE_ACL_GET_PERM_NP + ace->a_perm |= (acl_get_perm_np(permset, ACL_READ) ? SMB_ACL_READ : 0); + ace->a_perm |= (acl_get_perm_np(permset, ACL_WRITE) ? SMB_ACL_WRITE : 0); + ace->a_perm |= (acl_get_perm_np(permset, ACL_EXECUTE) ? SMB_ACL_EXECUTE : 0); +#else ace->a_perm |= (acl_get_perm(permset, ACL_READ) ? SMB_ACL_READ : 0); ace->a_perm |= (acl_get_perm(permset, ACL_WRITE) ? SMB_ACL_WRITE : 0); ace->a_perm |= (acl_get_perm(permset, ACL_EXECUTE) ? SMB_ACL_EXECUTE : 0); +#endif return True; } Modified: branches/SAMBA_3_0_25/source/configure.in === --- branches/SAMBA_3_0_25/source/configure.in 2007-05-10 12:41:20 UTC (rev 22776) +++ branches/SAMBA_3_0_25/source/configure.in 2007-05-10 13:31:15 UTC (rev 22777) @@ -5140,6 +5140,7 @@ AC_MSG_RESULT(Using FreeBSD posix ACLs) AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether FreeBSD POSIX ACLs are available]) AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available]) + default_static_modules="$default_static_modules vfs_posixacl" ;; *linux*) AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"]) Modified: branches/SAMBA_3_0_25/source/modules/vfs_posixacl.c === --- branches/SAMBA_3_0_25/source/modules/vfs_posixacl.c 2007-05-10 12:41:20 UTC (rev 22776) +++ branches/SAMBA_3_0_25/source/modules/vfs_posixacl.c 2007-05-10 13:31:15 UTC (rev 22777) @@ -200,9 +200,15 @@ return False; } ace->a_perm = 0; +#ifdef HAVE_ACL_GET_PERM_NP + ace->a_perm |= (acl_get_perm_np(permset, ACL_READ) ? SMB_ACL_READ : 0); + ace->a_perm |= (acl_get_perm_np(permset, ACL_WRITE) ? SMB_ACL_WRITE : 0); + ace->a_perm |= (acl_get_perm_np(permset, ACL_EXECUTE) ? SMB_ACL_EXECUTE : 0); +#else ace->a_perm |= (acl_get_perm(permset, ACL_READ) ? SMB_ACL_READ : 0); ace->a_perm |= (acl_get_perm(permset, ACL_WRITE) ? SMB_ACL_WRITE : 0); ace->a_perm |= (acl_get_perm(permset, ACL_EXECUTE) ? SMB_ACL_EXECUTE : 0); +#endif return True; } Modified: branches/SAMBA_3_0_26/source/configure.in === --- branches/SAMBA_3_0_26/source/configure.in 2007-05-10 12:41:20 UTC (rev 22776) +++ branches/SAMBA_3_0_26/source/configure.in 2007-05-10 13:31:15 UTC (rev 22777) @@ -5140,6 +5140,7 @@ AC_MSG_RESULT(Using FreeBSD posix ACLs) AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether FreeBSD POSIX ACLs are available]) AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available]) + default_static_modules="$default_static_modules vfs_posixacl" ;; *linux*) AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$AC
svn commit: samba r22776 - in branches/SAMBA_3_0_RELEASE/source/nsswitch: .
Author: jerry Date: 2007-05-10 12:41:20 + (Thu, 10 May 2007) New Revision: 22776 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22776 Log: grab Simo's idmap_ldap fix (current with svn r22771) Modified: branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap_ldap.c Changeset: Modified: branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap_ldap.c === --- branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap_ldap.c 2007-05-10 10:42:13 UTC (rev 22775) +++ branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap_ldap.c 2007-05-10 12:41:20 UTC (rev 22776) @@ -818,6 +818,7 @@ talloc_set_destructor(ctx, idmap_ldap_close_destructor); dom->private_data = ctx; + dom->initialized = True; talloc_free(config_option); return NT_STATUS_OK;
svn commit: samba r22775 - in branches: SAMBA_3_0/source SAMBA_3_0/source/include SAMBA_3_0/source/lib SAMBA_3_0_26/source SAMBA_3_0_26/source/include SAMBA_3_0_26/source/lib
Author: vlendec Date: 2007-05-10 10:42:13 + (Thu, 10 May 2007) New Revision: 22775 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22775 Log: For the cluster code I've developed a wrapper around tdb to put different database backends in place dynamically. The main abstractions are db_context and db_record, it should be mainly self-describing, see include/dbwrap.h. You open the db just as you would open a tdb, this time with db_open(). If you want to fetch a record, just do the db->fetch() call, if you want to do operations on it, you need to get it with fetch_locked(). I added dbwrap_file.c (not heavily tested lately) as an example for what can be done with that abstraction, uses a file per key. So if anybody is willing to shape that up, we might have a chance on reiserfs again :-) This abstraction works fine for brlock.tdb, locking.tdb, connections.tdb and sessionid.tdb. It should work fine for the others as well, I just did not yet get around to convert them. If nobody loudly screams NO, then I will import the code that uses this soon. Volker Added: branches/SAMBA_3_0/source/include/dbwrap.h branches/SAMBA_3_0/source/lib/dbwrap.c branches/SAMBA_3_0/source/lib/dbwrap_file.c branches/SAMBA_3_0/source/lib/dbwrap_tdb.c branches/SAMBA_3_0_26/source/include/dbwrap.h branches/SAMBA_3_0_26/source/lib/dbwrap.c branches/SAMBA_3_0_26/source/lib/dbwrap_file.c branches/SAMBA_3_0_26/source/lib/dbwrap_tdb.c Modified: branches/SAMBA_3_0/source/Makefile.in branches/SAMBA_3_0/source/include/includes.h branches/SAMBA_3_0_26/source/Makefile.in branches/SAMBA_3_0_26/source/include/includes.h Changeset: Sorry, the patch is too large (1607 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22775
svn commit: samba r22774 - in branches/SAMBA_4_0/source/smb_server/smb: .
Author: metze Date: 2007-05-10 08:39:44 + (Thu, 10 May 2007) New Revision: 22774 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22774 Log: correctly initialize the smbsrv_connection when switching to SMB2 metze Modified: branches/SAMBA_4_0/source/smb_server/smb/negprot.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb/negprot.c === --- branches/SAMBA_4_0/source/smb_server/smb/negprot.c 2007-05-10 02:48:22 UTC (rev 22773) +++ branches/SAMBA_4_0/source/smb_server/smb/negprot.c 2007-05-10 08:39:44 UTC (rev 22774) @@ -436,8 +436,21 @@ static void reply_smb2(struct smbsrv_request *req, uint16_t choice) { struct smbsrv_connection *smb_conn = req->smb_conn; + NTSTATUS status; + talloc_free(smb_conn->sessions.idtree_vuid); + ZERO_STRUCT(smb_conn->sessions); + talloc_free(smb_conn->smb_tcons.idtree_tid); + ZERO_STRUCT(smb_conn->smb_tcons); + ZERO_STRUCT(smb_conn->signing); + /* reply with a SMB2 packet */ + status = smbsrv_init_smb2_connection(smb_conn); + if (!NT_STATUS_IS_OK(status)) { + smbsrv_terminate_connection(smb_conn, nt_errstr(status)); + talloc_free(req); + return; + } packet_set_callback(smb_conn->packet, smbsrv_recv_smb2_request); smb2srv_reply_smb_negprot(req); req = NULL;
Rev 274: added nonblocking varients of the two lockall functions to tdb in http://samba.org/~tridge/ctdb
revno: 274 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Thu 2007-05-10 17:43:08 +1000 message: added nonblocking varients of the two lockall functions to tdb modified: lib/tdb/common/lock.c lock.c-20070220022425-m1wibgjq7n5hahs6-7 lib/tdb/include/tdb.h tdb.h-20070125040949-7t3f5zdl1q4z9hyv-101 === modified file 'lib/tdb/common/lock.c' --- a/lib/tdb/common/lock.c 2007-05-05 07:14:33 + +++ b/lib/tdb/common/lock.c 2007-05-10 07:43:08 + @@ -288,7 +288,7 @@ /* lock/unlock entire database */ -static int _tdb_lockall(struct tdb_context *tdb, int ltype) +static int _tdb_lockall(struct tdb_context *tdb, int ltype, int op) { /* There are no locks on read-only dbs */ if (tdb->read_only || tdb->traverse_read) @@ -309,9 +309,11 @@ return TDB_ERRCODE(TDB_ERR_LOCK, -1); } - if (tdb->methods->tdb_brlock(tdb, FREELIST_TOP, ltype, F_SETLKW, + if (tdb->methods->tdb_brlock(tdb, FREELIST_TOP, ltype, op, 0, 4*tdb->header.hash_size)) { - TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_lockall failed (%s)\n", strerror(errno))); + if (op == F_SETLKW) { + TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_lockall failed (%s)\n", strerror(errno))); + } return -1; } @@ -321,6 +323,8 @@ return 0; } + + /* unlock entire db */ static int _tdb_unlockall(struct tdb_context *tdb, int ltype) { @@ -353,7 +357,13 @@ /* lock entire database with write lock */ int tdb_lockall(struct tdb_context *tdb) { - return _tdb_lockall(tdb, F_WRLCK); + return _tdb_lockall(tdb, F_WRLCK, F_SETLKW); +} + +/* lock entire database with write lock - nonblocking varient */ +int tdb_lockall_nonblock(struct tdb_context *tdb) +{ + return _tdb_lockall(tdb, F_WRLCK, F_SETLK); } /* unlock entire database with write lock */ @@ -365,7 +375,13 @@ /* lock entire database with read lock */ int tdb_lockall_read(struct tdb_context *tdb) { - return _tdb_lockall(tdb, F_RDLCK); + return _tdb_lockall(tdb, F_RDLCK, F_SETLKW); +} + +/* lock entire database with read lock - nonblock varient */ +int tdb_lockall_read_nonblock(struct tdb_context *tdb) +{ + return _tdb_lockall(tdb, F_RDLCK, F_SETLK); } /* unlock entire database with read lock */ === modified file 'lib/tdb/include/tdb.h' --- a/lib/tdb/include/tdb.h 2007-05-05 07:14:33 + +++ b/lib/tdb/include/tdb.h 2007-05-10 07:43:08 + @@ -116,8 +116,10 @@ int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *); int tdb_exists(struct tdb_context *tdb, TDB_DATA key); int tdb_lockall(struct tdb_context *tdb); +int tdb_lockall_nonblock(struct tdb_context *tdb); int tdb_unlockall(struct tdb_context *tdb); int tdb_lockall_read(struct tdb_context *tdb); +int tdb_lockall_read_nonblock(struct tdb_context *tdb); int tdb_unlockall_read(struct tdb_context *tdb); const char *tdb_name(struct tdb_context *tdb); int tdb_fd(struct tdb_context *tdb);
Rev 275: - got rid of the complex hand marshalling in the recovery controls in http://samba.org/~tridge/ctdb
revno: 275 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Thu 2007-05-10 17:43:45 +1000 message: - got rid of the complex hand marshalling in the recovery controls - fixed the re-send of ctdb calls after a generation change - fixed a reqid idr leak in controls - removed the write_record test code - use the new nonblock lockall code to prevent ctdbd from ever doing a blocking lock that could deadlock with smbd - moved more of the recovery controls into ctdb_recover.c modified: common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1 common/ctdb_client.c ctdb_client.c-20070411010216-3kd8v37k61steeya-1 common/ctdb_control.c ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1 common/ctdb_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2 common/ctdb_recover.c ctdb_recover.c-20070503002147-admmfgt1oj6gexfo-1 common/ctdb_traverse.c ctdb_traverse.c-20070503021550-ztfs5rwx8jfm8qqx-1 common/ctdb_util.c ctdb_util.c-20061128065342-to93h6eejj5kon81-3 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 tools/ctdb_control.c ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1 Diff too large for email (1011, the limit is 200).