[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-28-95-gf073f8b

Jeremy Allison jra at samba.org
Sat Jan 19 01:58:08 GMT 2008


The branch, v3-0-test has been updated
       via  f073f8bb8249274adeae9f43af1dbb49dcf6e755 (commit)
      from  0cbc43562e358e30ba5d431ca54c42bb2d09dc44 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit f073f8bb8249274adeae9f43af1dbb49dcf6e755
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jan 18 17:57:31 2008 -0800

    Back port vl's fix for nlink counts.
    Jeremy.

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

Summary of changes:
 source/smbd/trans2.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 0d9dac3..5464ef2 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -3301,11 +3301,6 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
 
 	nlink = sbuf.st_nlink;
 
-	if ((nlink > 0) && S_ISDIR(sbuf.st_mode)) {
-		/* NTFS does not seem to count ".." */
-		nlink -= 1;
-	}
-
 	if ((nlink > 0) && delete_pending) {
 		nlink -= 1;
 	}
@@ -3565,7 +3560,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
 			data_size = 24;
 			SOFF_T(pdata,0,allocation_size);
 			SOFF_T(pdata,8,file_size);
-			SIVAL(pdata,16,nlink);
+			SIVAL(pdata,16,(mode&aDIR)?1:nlink);
 			SCVAL(pdata,20,delete_pending?1:0);
 			SCVAL(pdata,21,(mode&aDIR)?1:0);
 			SSVAL(pdata,22,0); /* Padding. */
@@ -3637,7 +3632,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
 			pdata += 40;
 			SOFF_T(pdata,0,allocation_size);
 			SOFF_T(pdata,8,file_size);
-			SIVAL(pdata,16,nlink);
+			SIVAL(pdata,16,(mode&aDIR)?1:nlink);
 			SCVAL(pdata,20,delete_pending);
 			SCVAL(pdata,21,(mode&aDIR)?1:0);
 			SSVAL(pdata,22,0);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list