summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-18 18:39:27 -0800
committerJeremy Allison <jra@samba.org>2008-01-18 18:39:27 -0800
commitca6cf1fe94f096aac846d0111b39006bdd40b7e3 (patch)
treed1c35882130be266052b3f1b1d33232add95a86d /source3/smbd
parent145ab107b2670b3d645c6757d0a3930eaff6c4d0 (diff)
downloadsamba-ca6cf1fe94f096aac846d0111b39006bdd40b7e3.tar.gz
samba-ca6cf1fe94f096aac846d0111b39006bdd40b7e3.tar.bz2
samba-ca6cf1fe94f096aac846d0111b39006bdd40b7e3.zip
Actually test vl's new code and make it work to fix the build farm :-).
Jeremy. (This used to be commit 63defd3e9d4ba3f02f36ec5ad7b73463f31962a1)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 763b6480e3..935a881607 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3743,12 +3743,6 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
}
}
- nlink = sbuf.st_nlink;
-
- if ((nlink > 0) && delete_pending) {
- nlink -= 1;
- }
-
if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
return;
@@ -3767,6 +3761,16 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
if (!mode)
mode = FILE_ATTRIBUTE_NORMAL;
+ nlink = sbuf.st_nlink;
+
+ if (nlink && (mode&aDIR)) {
+ nlink = 1;
+ }
+
+ if ((nlink > 0) && delete_pending) {
+ nlink -= 1;
+ }
+
fullpathname = fname;
if (!(mode & aDIR))
file_size = get_file_size(sbuf);
@@ -4013,7 +4017,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,(mode&aDIR)?1:nlink);
+ SIVAL(pdata,16,nlink);
SCVAL(pdata,20,delete_pending?1:0);
SCVAL(pdata,21,(mode&aDIR)?1:0);
SSVAL(pdata,22,0); /* Padding. */
@@ -4091,7 +4095,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,(mode&aDIR)?1:nlink);
+ SIVAL(pdata,16,nlink);
SCVAL(pdata,20,delete_pending);
SCVAL(pdata,21,(mode&aDIR)?1:0);
SSVAL(pdata,22,0);