[SCM] Samba Shared Repository - branch master updated

Christian Ambach ambi at samba.org
Wed Jul 11 13:29:02 MDT 2012


The branch, master has been updated
       via  73ede32 s3:vfs_gpfs: fix ACL length calculation
       via  35ab9be s3:vfs_gpfs: Check softquota before gracetime
      from  149cae8 build: fix some indentation (tabs/vs spaces) in source3/wscript

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 73ede3241e3d8c26f50fbc7bd0762c742dfb3348
Author: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
Date:   Tue Jul 3 11:39:24 2012 +0200

    s3:vfs_gpfs: fix ACL length calculation
    
    GPFS 3.5 introduces ACL enhancements which are breaking our ACL length
    calculations.
    
    Signed-off-by: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
    
    Autobuild-User(master): Christian Ambach <ambi at samba.org>
    Autobuild-Date(master): Wed Jul 11 21:28:23 CEST 2012 on sn-devel-104

commit 35ab9bea0f15d66a6b0e827804e1fc66192d0068
Author: Christof Schmitt <christof.schmitt at us.ibm.com>
Date:   Mon Jun 18 16:13:06 2012 -0700

    s3:vfs_gpfs: Check softquota before gracetime
    
    gpfs_quotactl can return a non-zero softquota gracetime even when no
    softquota has been set. This could lead to "disk full" being reported to
    a client. The easiest fix is to check for a valid softquota before
    checking the softquota gracetime.

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_gpfs.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index a165cfa..4e4df22 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -417,8 +417,8 @@ static bool gpfsacl_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl)
 	struct gpfs_acl *gacl;
 	TALLOC_CTX *mem_ctx  = talloc_tos();
 
-	gacl_len = sizeof(struct gpfs_acl) +
-		(smb_get_naces(smbacl)-1)*sizeof(gpfs_ace_v4_t);
+	gacl_len = offsetof(gpfs_acl_t, ace_v4) + smb_get_naces(smbacl) *
+		sizeof(gpfs_ace_v4_t);
 
 	gacl = (struct gpfs_acl *)TALLOC_SIZE(mem_ctx, gacl_len);
 	if (gacl == NULL) {
@@ -706,16 +706,11 @@ static struct gpfs_acl *smb2gpfs_acl(const SMB_ACL_T pacl,
 	gpfs_aclLen_t len;
 	struct gpfs_acl *result;
 	int i;
-	union gpfs_ace_union
-	{
-		gpfs_ace_v1_t  ace_v1[1]; /* when GPFS_ACL_VERSION_POSIX */
-		gpfs_ace_v4_t  ace_v4[1]; /* when GPFS_ACL_VERSION_NFS4  */
-	};
 
 	DEBUG(10, ("smb2gpfs_acl: Got ACL with %d entries\n", pacl->count));
 
-	len = sizeof(struct gpfs_acl) - sizeof(union gpfs_ace_union) +
-		(pacl->count)*sizeof(gpfs_ace_v1_t);
+	len = offsetof(gpfs_acl_t, ace_v1) + (pacl->count) *
+		sizeof(gpfs_ace_v1_t);
 
 	result = (struct gpfs_acl *)SMB_MALLOC(len);
 	if (result == NULL) {
@@ -1562,7 +1557,8 @@ static void vfs_gpfs_disk_free_quota(struct gpfs_quotaInfo qi, time_t cur_time,
 	 * When the grace time for the exceeded soft block quota has been
 	 * exceeded, the soft block quota becomes an additional hard limit.
 	 */
-	if (qi.blockGraceTime && cur_time > qi.blockGraceTime) {
+	if (qi.blockSoftLimit &&
+	    qi.blockGraceTime && cur_time > qi.blockGraceTime) {
 		/* report disk as full */
 		*dfree = 0;
 		*dsize = MIN(*dsize, usage);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list