[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-test-1517-ge96cf13
Jeremy Allison
jra at samba.org
Sat Jan 19 01:37:44 GMT 2008
The branch, v3-2-test has been updated
via e96cf1309e45628f4c27d03f77a4eef5e00602df (commit)
from ab0ee6e9a6a9eee317228f0c2bde254ad9a59b85 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit e96cf1309e45628f4c27d03f77a4eef5e00602df
Author: Volker Lendecke <vl at samba.org>
Date: Thu Jan 17 17:48:33 2008 +0100
Always return nlink=1 for directories
I did not test it, but it should not affect cifsfs, there are special posix
calls that also return the stat information unfiltered.
-----------------------------------------------------------------------
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 23d6f12..763b648 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -3745,11 +3745,6 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
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;
}
@@ -4018,7 +4013,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. */
@@ -4096,7 +4091,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