[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1622-gd35a395

2009-05-14 Thread sfrench
The branch, master has been updated
   via  d35a3952f091f4eaad43d1a3756c24e35b34c5bd (commit)
  from  d73eab2b33b5f9d8227199bfc06f28ae3787cea3 (commit)

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


- Log -
commit d35a3952f091f4eaad43d1a3756c24e35b34c5bd
Author: Steve French 
Date:   Thu May 14 15:04:27 2009 -0500

Maximum password length check too short in mount.cifs

Windows allows up to 127 byte passwords, and we using a 64 byte limit
in most places and a 16 byte limit when using the "pass=" mount option

Acked-by: Jeff Layton 
Signed-off-by: Steve French 

---

Summary of changes:
 source3/client/mount.cifs.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 0c551cc..a5d99dc 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -77,7 +77,7 @@
 #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
 #endif
 
-#define MOUNT_PASSWD_SIZE 64
+#define MOUNT_PASSWD_SIZE 128
 #define DOMAIN_SIZE 64
 
 /* currently maximum length of IPv6 address string */
@@ -473,7 +473,7 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
printf("\npassword specified twice, 
ignoring second\n");
} else
got_password = 1;
-   } else if (strnlen(value, 17) < 17) {
+   } else if (strnlen(value, MOUNT_PASSWD_SIZE) < 
MOUNT_PASSWD_SIZE) {
if(got_password)
printf("\nmount.cifs warning - password 
specified twice\n");
got_password = 1;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1180-gd75df71

2009-02-24 Thread sfrench
The branch, master has been updated
   via  d75df717336e063f52af1415f99b6e16ccbf918c (commit)
  from  d8b70278e20b276566a3893d288101ff4826df61 (commit)

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


- Log -
commit d75df717336e063f52af1415f99b6e16ccbf918c
Author: Steve French 
Date:   Tue Feb 24 20:53:46 2009 -0600

Fix guest mounts
 guest session setup, login (user id) as anonymous.
This patch is for samba bugzilla bug 4640.

Signed-off-by: Shirish Pargaonkar 
Acked-by: Jeff Layton 
Signed-off-by: Steve French 

---

Summary of changes:
 source3/client/mount.cifs.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index ae8a7fd..8623d3c 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -649,7 +649,9 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
} else if (strncmp(data, "exec", 4) == 0) {
*filesys_flags &= ~MS_NOEXEC;
} else if (strncmp(data, "guest", 5) == 0) {
-   got_password=1;
+   user_name = (char *)calloc(1, 1);
+   got_user = 1;
+   got_password = 1;
} else if (strncmp(data, "ro", 2) == 0) {
*filesys_flags |= MS_RDONLY;
} else if (strncmp(data, "rw", 2) == 0) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-32-156-ga8f10f4

2009-02-24 Thread sfrench
The branch, v3-0-test has been updated
   via  a8f10f4469b31565e33669560657c2b3df68c13b (commit)
  from  510619be1897f1610d1a033c4e318002e077fdb2 (commit)

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


- Log -
commit a8f10f4469b31565e33669560657c2b3df68c13b
Author: Steve French 
Date:   Tue Feb 24 17:11:55 2009 -0600

Fix guest mounts
 guest session setup, login (user id) as anonymous.
This patch is for samba bugzilla bug 4640.

Signed-off-by: Shirish Pargaonkar 
Acked-by: Jeff Layton 
Signed-off-by: Steve French 

---

Summary of changes:
 source/client/mount.cifs.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 67e964d..d05115b 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -650,7 +650,9 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
} else if (strncmp(data, "exec", 4) == 0) {
*filesys_flags &= ~MS_NOEXEC;
} else if (strncmp(data, "guest", 5) == 0) {
-   got_password=1;
+   user_name = (char *)calloc(1, 1);
+   got_user = 1;
+   got_password = 1;
} else if (strncmp(data, "ro", 2) == 0) {
*filesys_flags |= MS_RDONLY;
} else if (strncmp(data, "rw", 2) == 0) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3486-g5e6b019

2009-02-24 Thread sfrench
The branch, v3-2-test has been updated
   via  5e6b019d70fef2ad082fc414053c131294bdeb49 (commit)
  from  e831cd78ee3cf89abee058a475540955fad423ce (commit)

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


- Log -
commit 5e6b019d70fef2ad082fc414053c131294bdeb49
Author: Steve French 
Date:   Tue Feb 24 17:10:19 2009 -0600

Fix guest mounts
 guest session setup, login (user id) as anonymous.
This patch is for samba bugzilla bug 4640.

Signed-off-by: Shirish Pargaonkar 
Acked-by: Jeff Layton 
Signed-off-by: Steve French 

---

Summary of changes:
 source/client/mount.cifs.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 67e964d..d05115b 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -650,7 +650,9 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
} else if (strncmp(data, "exec", 4) == 0) {
*filesys_flags &= ~MS_NOEXEC;
} else if (strncmp(data, "guest", 5) == 0) {
-   got_password=1;
+   user_name = (char *)calloc(1, 1);
+   got_user = 1;
+   got_password = 1;
} else if (strncmp(data, "ro", 2) == 0) {
*filesys_flags |= MS_RDONLY;
} else if (strncmp(data, "rw", 2) == 0) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5016-gdca993d

2009-02-24 Thread sfrench
The branch, v3-3-test has been updated
   via  dca993dbd100c8119dc6facda86dbe48b7d34a94 (commit)
   via  dc2f9854c400a9bde604a8c3ababb29fb3e9747f (commit)
  from  a70bb435d339df52eef56fb0c5788534252d7ab7 (commit)

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


- Log -
commit dca993dbd100c8119dc6facda86dbe48b7d34a94
Merge: dc2f9854c400a9bde604a8c3ababb29fb3e9747f 
a70bb435d339df52eef56fb0c5788534252d7ab7
Author: Steve French 
Date:   Tue Feb 24 17:09:22 2009 -0600

Merge branch 'v3-3-test' of git://git.samba.org/samba into 3-3

commit dc2f9854c400a9bde604a8c3ababb29fb3e9747f
Author: Steve French 
Date:   Tue Feb 24 17:07:12 2009 -0600

Fix guest mounts
 guest session setup, login (user id) as anonymous.
This patch is for samba bugzilla bug 4640.

Signed-off-by: Shirish Pargaonkar 
Acked-by: Jeff Layton 
Signed-off-by: Steve French 

---

Summary of changes:
 source/client/mount.cifs.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 67e964d..d05115b 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -650,7 +650,9 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
} else if (strncmp(data, "exec", 4) == 0) {
*filesys_flags &= ~MS_NOEXEC;
} else if (strncmp(data, "guest", 5) == 0) {
-   got_password=1;
+   user_name = (char *)calloc(1, 1);
+   got_user = 1;
+   got_password = 1;
} else if (strncmp(data, "ro", 2) == 0) {
*filesys_flags |= MS_RDONLY;
} else if (strncmp(data, "rw", 2) == 0) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-32-155-g510619b

2009-02-24 Thread sfrench
The branch, v3-0-test has been updated
   via  510619be1897f1610d1a033c4e318002e077fdb2 (commit)
  from  b4fc28ddffa4f9a74ca72ee6c2d30f544de5360c (commit)

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


- Log -
commit 510619be1897f1610d1a033c4e318002e077fdb2
Author: Steve French 
Date:   Tue Feb 24 14:40:59 2009 -0600

Fix mount.cifs handling of -V option (to display version)

Also sync with current mount.cifs

Acked-by: Jeff Layton 
Signed-off-by: Steve French 

---

Summary of changes:
 source/client/mount.cifs.c |  424 
 1 files changed, 228 insertions(+), 196 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 939db45..67e964d 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -1,10 +1,11 @@
 /* 
Mount helper utility for Linux CIFS VFS (virtual filesystem) client
Copyright (C) 2003,2008 Steve French  (sfre...@us.ibm.com)
+   Copyright (C) 2008 Jeremy Allison (j...@samba.org)
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
@@ -13,8 +14,7 @@
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+   along with this program.  If not, see .  */
 
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
@@ -57,6 +57,10 @@
  #endif /* _SAMBA_BUILD_ */
 #endif /* MOUNT_CIFS_VENDOR_SUFFIX */
 
+#ifdef _SAMBA_BUILD_
+#include "include/config.h"
+#endif
+
 #ifndef MS_MOVE 
 #define MS_MOVE 8192 
 #endif 
@@ -69,6 +73,16 @@
 
 #define CONST_DISCARD(type, ptr)  ((type) ((void *) (ptr)))
 
+#ifndef SAFE_FREE
+#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
+#endif
+
+#define MOUNT_PASSWD_SIZE 64
+#define DOMAIN_SIZE 64
+
+/* currently maximum length of IPv6 address string */
+#define MAX_ADDRESS_LEN INET6_ADDRSTRLEN
+
 const char *thisprogram;
 int verboseflag = 0;
 int fakemnt = 0;
@@ -89,6 +103,8 @@ char * prefixpath = NULL;
 
 /* like strncpy but does not 0 fill the buffer and always null
  *terminates. bufsize is the size of the destination buffer */
+
+#ifndef HAVE_STRLCPY
 static size_t strlcpy(char *d, const char *s, size_t bufsize)
 {
size_t len = strlen(s);
@@ -99,10 +115,13 @@ static size_t strlcpy(char *d, const char *s, size_t 
bufsize)
d[len] = 0;
return ret;
 }
+#endif
 
 /* like strncat but does not 0 fill the buffer and always null
  *terminates. bufsize is the length of the buffer, which should
  *   be one more than the maximum resulting string length */
+
+#ifndef HAVE_STRLCAT
 static size_t strlcat(char *d, const char *s, size_t bufsize)
 {
size_t len1 = strlen(d);
@@ -121,6 +140,7 @@ static size_t strlcat(char *d, const char *s, size_t 
bufsize)
}
return ret;
 }
+#endif
 
 /* BB finish BB
 
@@ -143,24 +163,22 @@ static void mount_cifs_usage(void)
printf("\nLess commonly used options:");

printf("\n\tcredentials=,guest,perm,noperm,setuids,nosetuids,rw,ro,");

printf("\n\tsep=,iocharset=,suid,nosuid,exec,noexec,serverino,");
-   
printf("\n\tdirectio,mapchars,nomapchars,nolock,servernetbiosname=");
+   
printf("\n\tmapchars,nomapchars,nolock,servernetbiosname=");
+   printf("\n\tdirectio,nounix,cifsacl,sec=,sign");
printf("\n\nOptions not needed for servers supporting CIFS Unix 
extensions");
printf("\n\t(e.g. unneeded for mounts to most Samba versions):");
printf("\n\tuid=,gid=,dir_mode=,file_mode=,sfu");
printf("\n\nRarely used options:");

printf("\n\tport=,rsize=,wsize=,unc=,ip=,");

printf("\n\tdev,nodev,nouser_xattr,netbiosname=,hard,soft,intr,");
-   printf("\n\tnointr,ignorecase,noposixpaths,noacl");
+   
printf("\n\tnointr,ignorecase,noposixpaths,noacl,prefixpath=,nobrl");
+   printf("\n\tin6_addr");
printf("\n\nOptions are described in more detail in the manual page");
printf("\n\tman 8 mount.cifs\n");
printf("\nTo display the version number of the mount helper:");
printf("\n\t%s -V\n",thisprogram);
 
-   if(mountpassword) {
-   memset(mountpassword,0,64);
-   free(mountpassword);
-   mountpassword = NULL;
-   }
+   SAFE_FREE(mountpassword);
  

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3485-ge831cd7

2009-02-24 Thread sfrench
The branch, v3-2-test has been updated
   via  e831cd78ee3cf89abee058a475540955fad423ce (commit)
  from  de96e1a82d6e92c00a0ab3020db8d7c0284aadb1 (commit)

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


- Log -
commit e831cd78ee3cf89abee058a475540955fad423ce
Author: Steve French 
Date:   Tue Feb 24 12:52:08 2009 -0600

cifs mount fix for handling -V parameter

also syncs with 3-3 mount.cifs

Acked-by: Jeff Layton 
Signed-off-by: Steve French 

---

Summary of changes:
 source/client/mount.cifs.c |   26 ++
 1 files changed, 22 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index e7397da..67e964d 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -485,7 +485,8 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
}
} else if (strncmp(data, "sec", 3) == 0) {
if (value) {
-   if (!strcmp(value, "none"))
+   if (!strncmp(value, "none", 4) ||
+   !strncmp(value, "krb5", 4))
got_password = 1;
}
} else if (strncmp(data, "ip", 2) == 0) {
@@ -533,8 +534,11 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
SAFE_FREE(out);
return 1;
}
-   } else if ((strncmp(data, "domain", 3) == 0)
-  || (strncmp(data, "workgroup", 5) == 0)) {
+   } else if ((strncmp(data, "dom" /* domain */, 3) == 0)
+  || (strncmp(data, "workg", 5) == 0)) {
+   /* note this allows for synonyms of "domain"
+  such as "DOM" and "dom" and "workgroup"
+  and "WORKGRP" etc. */
if (!value || !*value) {
printf("CIFS: invalid domain name\n");
SAFE_FREE(out);
@@ -1075,6 +1079,14 @@ int main(int argc, char ** argv)
}
mountpoint = argv[2];
} else {
+   if ((strcmp (argv[1], "--version") == 0) ||
+   ((strcmp (argv[1], "-V") == 0))) {
+   printf ("mount.cifs version: %s.%s%s\n",
+   MOUNT_CIFS_VERSION_MAJOR,
+   MOUNT_CIFS_VERSION_MINOR,
+   MOUNT_CIFS_VENDOR_SUFFIX);
+   exit (0);
+   }
mount_cifs_usage();
exit(EX_USAGE);
}
@@ -1286,7 +1298,13 @@ int main(int argc, char ** argv)
}
 
if(got_user == 0) {
-   user_name = getusername();
+   /* Note that the password will not be retrieved from the
+  USER env variable (ie user%password form) as there is
+  already a PASSWD environment varaible */
+   if (getenv("USER"))
+   user_name = strdup(getenv("USER"));
+   if (user_name == NULL)
+   user_name = getusername();
got_user = 1;
}



-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5013-gc7bf0f4

2009-02-24 Thread sfrench
The branch, v3-3-test has been updated
   via  c7bf0f4c222ae46be2a751997e03197832b494cd (commit)
   via  62d967bc389170f41eda0a5af0ad4a9a0b4a2262 (commit)
   via  467c1d137a2bfce2fedb3bc98e647e039073f13f (commit)
  from  53fea3a7aef481151c3a15d01481cb0f11ae2e8b (commit)

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


- Log -
commit c7bf0f4c222ae46be2a751997e03197832b494cd
Author: Steve French 
Date:   Tue Feb 24 12:43:12 2009 -0600

cifs mount did not properly display version string when no other parameters 
passed in.

Acked-by: Jeff Layton 

commit 62d967bc389170f41eda0a5af0ad4a9a0b4a2262
Merge: 467c1d137a2bfce2fedb3bc98e647e039073f13f 
53fea3a7aef481151c3a15d01481cb0f11ae2e8b
Author: Steve French 
Date:   Tue Feb 24 11:26:56 2009 -0600

Merge branch 'v3-3-test' of git://git.samba.org/samba into 3-3

commit 467c1d137a2bfce2fedb3bc98e647e039073f13f
Author: Steve French 
Date:   Thu Dec 4 18:22:59 2008 -0600

mount.cifs: make cifs mounts honor the USER environment variable

If the user is not specified in the mount command or in a credential
file, then we are supposed to look for the USER environment variable
(this is usually, but not always set to the username of the current
uid, but it can be overridden by the user, which we were not checking)

Fixes samba bugzilla bug# 5934

---

Summary of changes:
 source/client/mount.cifs.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index a736609..67e964d 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -1079,6 +1079,14 @@ int main(int argc, char ** argv)
}
mountpoint = argv[2];
} else {
+   if ((strcmp (argv[1], "--version") == 0) ||
+   ((strcmp (argv[1], "-V") == 0))) {
+   printf ("mount.cifs version: %s.%s%s\n",
+   MOUNT_CIFS_VERSION_MAJOR,
+   MOUNT_CIFS_VERSION_MINOR,
+   MOUNT_CIFS_VENDOR_SUFFIX);
+   exit (0);
+   }
mount_cifs_usage();
exit(EX_USAGE);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4600-ga679d0e

2008-12-05 Thread sfrench
The branch, v3-3-test has been updated
   via  a679d0e96ec54f4660537966b31ce2f56d5a1ea9 (commit)
  from  dda44029e98d581e358146443d66d3e243163f15 (commit)

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


- Log -
commit a679d0e96ec54f4660537966b31ce2f56d5a1ea9
Author: Steve French <[EMAIL PROTECTED]>
Date:   Fri Dec 5 08:33:39 2008 -0600

mount.cifs: if mount user not specified use USER environment variable

smbfs also would use the USER environment variable if the user was not
specified on the mount command and no credential file specified, and
mount.cifs man page says that we will use this environment variable
(in most cases this will not cause a behavior change, because
we were doing getuid of the current process which will usually be
the same name).

Fixes Samba bug #5934

Acked-by: Jeff Layton

---

Summary of changes:
 source/client/mount.cifs.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index da2f98b..0bc61ae 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -1293,7 +1293,13 @@ int main(int argc, char ** argv)
}
 
if(got_user == 0) {
-   user_name = getusername();
+   /* Note that the password will not be retrieved from the
+  USER env variable (ie user%password form) as there is
+  already a PASSWD environment varaible */
+   if (getenv("USER"))
+   user_name = strdup(getenv("USER"));
+   if (user_name == NULL)
+   user_name = getusername();
got_user = 1;
}



-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 420a9071e1227435aada2a52c83ee44fda7180ed

2008-12-05 Thread sfrench
The branch, master has been updated
   via  420a9071e1227435aada2a52c83ee44fda7180ed (commit)
  from  8be38511a3d87f4debbdc3a827b6ca898ccdde02 (commit)

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


- Log -
commit 420a9071e1227435aada2a52c83ee44fda7180ed
Author: Steve French <[EMAIL PROTECTED]>
Date:   Fri Dec 5 08:09:08 2008 -0600

mount.cifs: if mount user not specified use USER environment variable

smbfs also would use the USER environment variable if the user was not
specified on the mount command and no credential file specified, and
mount.cifs man page says that we will use this environment variable
(in most cases this will not cause a behavior change, because
we were doing getuid of the current process which will usually be
the same name).

Fixes Samba bug #5934

Acked-by: Jeff Layton

---

Summary of changes:
 source3/client/mount.cifs.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index da2f98b..0bc61ae 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -1293,7 +1293,13 @@ int main(int argc, char ** argv)
}
 
if(got_user == 0) {
-   user_name = getusername();
+   /* Note that the password will not be retrieved from the
+  USER env variable (ie user%password form) as there is
+  already a PASSWD environment varaible */
+   if (getenv("USER"))
+   user_name = strdup(getenv("USER"));
+   if (user_name == NULL)
+   user_name = getusername();
got_user = 1;
}



-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-3839-g3b5ad91

2008-08-27 Thread sfrench
The branch, v3-devel has been updated
   via  3b5ad9190d2ad6d2ca0a569194bdff9003bda13b (commit)
  from  f0ea0f3502037db878238942ee0729f6940e0b01 (commit)

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


- Log -
commit 3b5ad9190d2ad6d2ca0a569194bdff9003bda13b
Author: Steve French <[EMAIL PROTECTED](none)>
Date:   Wed Aug 27 17:00:00 2008 -0500

mount.cifs: unclear error message with "credentials"

Thanks to Christophe Curis for the suggestion

---

Summary of changes:
 source/client/mount.cifs.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index dd878aa..9d2b449 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -196,7 +196,7 @@ static int open_cred_file(char * file_name)
line_buf = (char *)malloc(4096);
if(line_buf == NULL) {
fclose(fs);
-   return -ENOMEM;
+   return ENOMEM;
}
 
while(fgets(line_buf,4096,fs)) {
@@ -537,7 +537,8 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
if (value && *value) {
rc = open_cred_file(value);
if(rc) {
-   printf("error %d opening credential 
file %s\n",rc, value);
+   printf("error %d (%s) opening 
credential file %s\n",
+   rc, strerror(rc), value);
return 1;
}
} else {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-2959-g539f7f1

2008-08-26 Thread sfrench
The branch, v3-2-test has been updated
   via  539f7f1a960686642dc8a3df5cb4aaabcd4d70f8 (commit)
   via  a122df5dc01ed9767c53d77a73aabd44f7c8a7ca (commit)
  from  27b1ae601542ebe2e23ab4ff81eb14f8e03a3caf (commit)

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


- Log -
commit 539f7f1a960686642dc8a3df5cb4aaabcd4d70f8
Merge: a122df5dc01ed9767c53d77a73aabd44f7c8a7ca 
27b1ae601542ebe2e23ab4ff81eb14f8e03a3caf
Author: Steve French <[EMAIL PROTECTED](none)>
Date:   Tue Aug 26 15:27:07 2008 -0500

Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test

commit a122df5dc01ed9767c53d77a73aabd44f7c8a7ca
Author: Steve French <[EMAIL PROTECTED](none)>
Date:   Tue Aug 26 13:04:44 2008 -0500

mount.cifs: unclear error message with "credentials"

Thanks to Christophe Curis for the suggestion

---

Summary of changes:
 source/client/mount.cifs.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index c24c22e..af50cd9 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -196,7 +196,7 @@ static int open_cred_file(char * file_name)
line_buf = (char *)malloc(4096);
if(line_buf == NULL) {
fclose(fs);
-   return -ENOMEM;
+   return ENOMEM;
}
 
while(fgets(line_buf,4096,fs)) {
@@ -533,7 +533,8 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
if (value && *value) {
rc = open_cred_file(value);
if(rc) {
-   printf("error %d opening credential 
file %s\n",rc, value);
+   printf("error %d (%s) opening 
credential file %s\n",
+   rc, strerror(rc), value);
return 1;
}
} else {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-3836-g8b82d79

2008-08-26 Thread sfrench
The branch, v3-3-test has been updated
   via  8b82d79f0d52aee45bf862a89868f3df483fba84 (commit)
   via  fbb78cfaa71e152c4840c92896f181926de8d58e (commit)
  from  5caabdf64ea3d8ff0ff997a565b7708986c3d9d7 (commit)

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


- Log -
commit 8b82d79f0d52aee45bf862a89868f3df483fba84
Merge: fbb78cfaa71e152c4840c92896f181926de8d58e 
5caabdf64ea3d8ff0ff997a565b7708986c3d9d7
Author: Steve French <[EMAIL PROTECTED](none)>
Date:   Tue Aug 26 15:25:55 2008 -0500

Merge branch 'v3-3-test' of git://git.samba.org/samba into 3-3

commit fbb78cfaa71e152c4840c92896f181926de8d58e
Author: Steve French <[EMAIL PROTECTED](none)>
Date:   Tue Aug 26 13:01:15 2008 -0500

mount.cifs: unclear error message with "credentials"

Thanks to Christophe Curis for the suggestion

---

Summary of changes:
 source/client/mount.cifs.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index dd878aa..9d2b449 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -196,7 +196,7 @@ static int open_cred_file(char * file_name)
line_buf = (char *)malloc(4096);
if(line_buf == NULL) {
fclose(fs);
-   return -ENOMEM;
+   return ENOMEM;
}
 
while(fgets(line_buf,4096,fs)) {
@@ -537,7 +537,8 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
if (value && *value) {
rc = open_cred_file(value);
if(rc) {
-   printf("error %d opening credential 
file %s\n",rc, value);
+   printf("error %d (%s) opening 
credential file %s\n",
+   rc, strerror(rc), value);
return 1;
}
} else {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-3538-g148a012

2008-08-05 Thread sfrench
The branch, v3-3-test has been updated
   via  148a012421cdd875167e708c5dfa771d97bf9856 (commit)
  from  24a93d03c2ca4e718968e2024604e0f398c96659 (commit)

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


- Log -
commit 148a012421cdd875167e708c5dfa771d97bf9856
Author: Steve French <[EMAIL PROTECTED]>
Date:   Tue Aug 5 15:36:11 2008 -0500

Building cifs.upcall is giving this build warning:

   client/cifs.upcall.c:205: warning: function declaration isn’t a 
prototype

This patch fixes this by properly declaring usage() args as void.

Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>
Signed-off-by: Steve French <[EMAIL PROTECTED]>

---

Summary of changes:
 source/client/cifs.upcall.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index d6c1ddc..5a2a22a 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -201,7 +201,7 @@ int cifs_resolver(const key_serial_t key, const char 
*key_descr)
 }
 
 void
-usage()
+usage(void)
 {
syslog(LOG_WARNING, "Usage: %s [-c] [-v] key_serial", prog);
fprintf(stderr, "Usage: %s [-c] [-v] key_serial\n", prog);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-3537-g24a93d0

2008-08-05 Thread sfrench
The branch, v3-3-test has been updated
   via  24a93d03c2ca4e718968e2024604e0f398c96659 (commit)
  from  92fad0fc537e75c726d5d6794dd0c4fd61edca2d (commit)

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


- Log -
commit 24a93d03c2ca4e718968e2024604e0f398c96659
Author: Steve French <[EMAIL PROTECTED]>
Date:   Tue Aug 5 13:27:07 2008 -0500

cifs.upcall: fix manpage and comments

The "cifs.resolver" key type has been changed to "dns_resolver". Fix
the comments at the top of cifs.upcall and the manpage accordingly.

Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>
Signed-off-by: Steve French <[EMAIL PROTECTED]>
---
 docs-xml/manpages-3/cifs.upcall.8.xml |4 ++--
 source/client/cifs.upcall.c   |8 
 2 files changed, 6 insertions(+), 6 deletions(-)

---

Summary of changes:
 docs-xml/manpages-3/cifs.upcall.8.xml |4 ++--
 source/client/cifs.upcall.c   |8 
 2 files changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/cifs.upcall.8.xml 
b/docs-xml/manpages-3/cifs.upcall.8.xml
index 8df776b..3c1bb24 100644
--- a/docs-xml/manpages-3/cifs.upcall.8.xml
+++ b/docs-xml/manpages-3/cifs.upcall.8.xml
@@ -72,7 +72,7 @@ to be run that way.

 

-   cifs.resolve
+   dns_resolver
This key type is for resolving hostnames into 
IP addresses


@@ -83,7 +83,7 @@ to be run that way.
 #OPERATION  TYPE   D C PROGRAM ARG1 ARG2...
 #=  =  = = ==
 create cifs.spnego* * /usr/local/sbin/cifs.upcall -c %k
-create  cifs.resolver  * * /usr/local/sbin/cifs.upcall %k
+create  dns_resolver   * * /usr/local/sbin/cifs.upcall %k
 
 
 See 
request-key.conf5
 for more info on each field.
diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index 70dae1a..d6c1ddc 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -5,11 +5,11 @@
 * Used by /sbin/request-key for handling
 * cifs upcall for kerberos authorization of access to share and
 * cifs upcall for DFS srver name resolving (IPv4/IPv6 aware).
-* You should have keyutils installed and add following line to
-* /etc/request-key.conf file
+* You should have keyutils installed and add something like the
+* following lines to /etc/request-key.conf file:
 
-create cifs.spnego * * /usr/local/sbin/cifs.upcall [-v][-c] %k
-create cifs.resolver * * /usr/local/sbin/cifs.upcall [-v] %k
+create cifs.spnego * * /usr/local/sbin/cifs.upcall %k
+create dns_resolver * * /usr/local/sbin/cifs.upcall %k
 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-3536-g92fad0f

2008-08-05 Thread sfrench
The branch, v3-3-test has been updated
   via  92fad0fc537e75c726d5d6794dd0c4fd61edca2d (commit)
  from  8195ca2132cbdba396dc35e9d04d4bdc3a8a666c (commit)

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


- Log -
commit 92fad0fc537e75c726d5d6794dd0c4fd61edca2d
Author: Steve French <[EMAIL PROTECTED]>
Date:   Tue Aug 5 13:15:46 2008 -0500

Backing out most of changeset 5222b8db3fb692e5071bfd1b41849a8eb0a17995
(so parsing for domain parameter in mount.cifs matches online help)
and rephrasing original code to make it more clear.

The check for "domain" was meant to allow for "dom" or "DOM" and the
option ("dom") described in the help (e.g. "/sbin/mount.cifs -?") is the
shorter ("dom") form.  The reason that the string we compare against
is larger was to improve readability (we could compare against "dom"
but note /* "domain" or "DOMAIN" or "dom" or "DOM" */ but it seemed
terser to just show the larger string in the strcmp target.   The
change to "workgoup" from workg* (anything which begins with "workg"
doesn't matter - it is a minor behavior change - but probably few
scripts depend on the "alias" for this option).

Rework code so that it is clearer what we are comparing against.

---

Summary of changes:
 source/client/mount.cifs.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 72ef9fe..c7009e3 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -517,8 +517,11 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
printf("CIFS: UNC name too long\n");
return 1;
}
-   } else if ((strncmp(data, "domain", 6) == 0)
-  || (strncmp(data, "workgroup", 9) == 0)) {
+   } else if ((strncmp(data, "dom" /* domain */, 3) == 0)
+  || (strncmp(data, "workg", 5) == 0)) {
+   /* note this allows for synonyms of "domain"
+  such as "DOM" and "dom" and "workgroup"
+  and "WORKGRP" etc. */
if (!value || !*value) {
printf("CIFS: invalid domain name\n");
return 1;   /* needs_arg; */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-3408-g22afe36

2008-07-24 Thread sfrench
The branch, v3-3-test has been updated
   via  22afe367fef35d4262d960973933023a0a5ce77d (commit)
   via  22c36b27c60193102b3153e073216865adb1b6c1 (commit)
  from  865ea6fcbc089a03e453709fa54ff2a39c0c168e (commit)

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


- Log -
commit 22afe367fef35d4262d960973933023a0a5ce77d
Merge: 22c36b27c60193102b3153e073216865adb1b6c1 
865ea6fcbc089a03e453709fa54ff2a39c0c168e
Author: Steve French <[EMAIL PROTECTED]>
Date:   Thu Jul 24 09:35:20 2008 -0500

Merge branch 'v3-3-test' of git+ssh://[EMAIL PROTECTED]/data/git/samba into 
v33

commit 22c36b27c60193102b3153e073216865adb1b6c1
Author: Steve French <[EMAIL PROTECTED]>
Date:   Thu Jul 24 09:32:53 2008 -0500

cifs.upcall was not recognizing the newer name "dns_resolver" key type
(as a synonym for the older "cifs.resolver" name) when resolving host
names to ip addresses for the kernel.

Acked-by: Jeff Layton

---

Summary of changes:
 source/client/cifs.upcall.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index e389326..70dae1a 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -262,7 +262,8 @@ int main(const int argc, char *const argv[])
goto out;
}
 
-   if (strncmp(buf, "cifs.resolver", sizeof("cifs.resolver")-1) == 0) {
+   if ((strncmp(buf, "cifs.resolver", sizeof("cifs.resolver")-1) == 0) ||
+   (strncmp(buf, "dns_resolver", sizeof("dns_resolver")-1) == 0)) {
rc = cifs_resolver(key, buf);
goto out;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-3395-g4b8362f

2008-07-23 Thread sfrench
The branch, v3-3-test has been updated
   via  4b8362f9777debd21c47154e786b7017fbf847f7 (commit)
  from  5ab391d466ce9ddea31f6f6bf467aa6c5f3a7efb (commit)

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


- Log -
commit 4b8362f9777debd21c47154e786b7017fbf847f7
Author: Steve French <[EMAIL PROTECTED]>
Date:   Wed Jul 23 14:25:17 2008 -0500

cifs.upcall: fix compile warning

Steve French noticed these warnings when building cifs.upcall:

   Compiling client/cifs.upcall.c
   client/cifs.upcall.c: In function 'usage':
   client/cifs.upcall.c:204: warning: declaration of 'prog' shadows a 
global declaration
   client/cifs.upcall.c:33: warning: shadowed declaration is here

Change the usage function to not take and arg and have it just use the 
global
"prog" variable. Fix a typo in the log message generated when an unknown
option is specified. Also getopt() always returns '?' when it sees an 
unknown
option so there's no point in printing it out.

Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>

---

Summary of changes:
 source/client/cifs.upcall.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index 3860f33..e389326 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -201,7 +201,7 @@ int cifs_resolver(const key_serial_t key, const char 
*key_descr)
 }
 
 void
-usage(const char *prog)
+usage()
 {
syslog(LOG_WARNING, "Usage: %s [-c] [-v] key_serial", prog);
fprintf(stderr, "Usage: %s [-c] [-v] key_serial\n", prog);
@@ -234,7 +234,7 @@ int main(const int argc, char *const argv[])
goto out;
}
default:{
-   syslog(LOG_WARNING, "unknow option: %c", c);
+   syslog(LOG_WARNING, "unknown option: %c", c);
goto out;
}
}
@@ -242,7 +242,7 @@ int main(const int argc, char *const argv[])
 
/* is there a key? */
if (argc <= optind) {
-   usage(prog);
+   usage();
goto out;
}
 


-- 
Samba Shared Repository


svn commit: samba-docs r1234 - in trunk/manpages-3: .

2008-02-05 Thread sfrench
Author: sfrench
Date: 2008-02-05 21:45:56 + (Tue, 05 Feb 2008)
New Revision: 1234

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1234

Log:
Man page updates for mount.cifs, including adding in the missing
description for the mount option for the servernetbiosname

Modified:
   trunk/manpages-3/mount.cifs.8.xml


Changeset:
Modified: trunk/manpages-3/mount.cifs.8.xml
===
--- trunk/manpages-3/mount.cifs.8.xml   2008-02-04 09:13:23 UTC (rev 1233)
+++ trunk/manpages-3/mount.cifs.8.xml   2008-02-05 21:45:56 UTC (rev 1234)
@@ -87,7 +87,7 @@
specifies the CIFS password. If this
 option is not given then the environment variable
 PASSWD is used. If the password is not specified 
-directly or indirectly via an argument to mount 
mount.cifs will prompt
+directly or indirectly via an argument to mount, 
mount.cifs will prompt
 for a password, unless the guest option is specified.
 
 
@@ -124,18 +124,44 @@
sets the uid that will own all files on
the mounted filesystem.
It may be specified as either a username or a numeric uid.
-   This parameter is ignored when the target server supports
-   the CIFS Unix extensions.
+   For mounts to servers which do support the CIFS Unix extensions, 
+such as a properly configured Samba server, the server provides
+the uid, gid and mode so this parameter should not be
+specified unless the server and client uid and gid
+numbering differ.  If the server and client are in the
+same domain (e.g. running winbind or nss_ldap) and
+the server supports the Unix Extensions then the uid
+and gid can be retrieved from the server (and uid
+and gid would not have to be specifed on the mount. 
+For servers which do not support the CIFS Unix
+extensions, the default uid (and gid) returned on lookup 
+of existing files will be the uid (gid) of the person
+who executed the mount (root, except when mount.cifs
+is configured setuid for user mounts) unless the "uid="
+(gid) mount option is specified.  For the uid (gid) of newly
+created files and directories, ie files created since
+the last mount of the server share, the expected uid
+(gid) is cached as long as the inode remains in
+memory on the client.   Also note that permission
+checks (authorization checks) on accesses to a file occur
+at the server, but there are cases in which an administrator
+may want to restrict at the client as well.  For those
+servers which do not report a uid/gid owner
+(such as Windows), permissions can also be checked at the
+client, and a crude form of client side permission checking
+can be enabled by specifying file_mode and dir_mode on
+the client.  Note that the mount.cifs helper must be
+at version 1.10 or higher to support specifying the uid
+(or gid) in non-numeric form.
+   

 

gid=arg
 
sets the gid that will own all files on
-the mounted filesystem.
-It may be specified as either a groupname or a numeric 
-gid. This parameter is ignored when the target server supports
-the CIFS Unix extensions.
+the mounted filesystem.  It may be specified as either a groupname or a 
numeric 
+gid. For other considerations see the description of uid above. 


 
@@ -150,6 +176,21 @@

 
 
+servern=arg
+
+
+   Specify the server netbios name (RFC1001 name) to use
+when attempting to setup a session to the server. Although
+   rarely needed for mounting to newer servers, this option
+is needed for mounting to some older servers (such
+as OS/2 or Windows 98 and Windows ME) since when connecting
+   over port 139 they, unlike most newer servers, do not
+support a default server name.  A server name can be up
+to 15 characters long and is usually uppercased.
+
+
+
+
 netbiosname=arg
 
 When mounting to servers via port 139, 
specifies the RFC1001
@@ -175,7 +216,7 @@

ip=arg
 
-   sets the destination IP 
address.
+   sets the destination IP address.  This option 
is set automatically if the server name portion of the requested UNC name can 
be resolved so rarely needs to be specified by the user.

 

@@ -425,13 +466,28 @@
 

   

svn commit: samba r25355 - in branches/SAMBA_3_2/source/client: .

2007-09-26 Thread sfrench
Author: sfrench
Date: 2007-09-26 18:36:38 + (Wed, 26 Sep 2007)
New Revision: 25355

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25355

Log:
IP address parsing did not allow for fully expanded ipv6 addresses
(which can be 12 bytes longer than we were allowing for).

Thanks to Dr. David Holder

Modified:
   branches/SAMBA_3_2/source/client/mount.cifs.c


Changeset:
Modified: branches/SAMBA_3_2/source/client/mount.cifs.c
===
--- branches/SAMBA_3_2/source/client/mount.cifs.c   2007-09-26 17:43:15 UTC 
(rev 25354)
+++ branches/SAMBA_3_2/source/client/mount.cifs.c   2007-09-26 18:36:38 UTC 
(rev 25355)
@@ -426,7 +426,7 @@
} else if (strncmp(data, "ip", 2) == 0) {
if (!value || !*value) {
printf("target ip address argument missing");
-   } else if (strnlen(value, 35) < 35) {
+   } else if (strnlen(value, INET6_ADDRSTRLEN) < 
INET6_ADDRSTRLEN) {
if(verboseflag)
printf("ip address %s override 
specified\n",value);
got_ip = 1;



svn commit: linux-cifs-client r112 - branches/linux-2.6-cifs-git-devel/fs/cifs branches/linux-2.6-mainline branches/linux-2.6-mainline/fs/cifs branches/linux-converged-for-old-kernels branches/linux-c

2007-09-20 Thread sfrench
Author: sfrench
Date: 2007-09-20 20:49:02 + (Thu, 20 Sep 2007)
New Revision: 112

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=112

Log:
merge with cifs 1.50c

Added:
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_dfs_ref.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/export.c
   branches/linux-2.6-mainline/README
   branches/linux-2.6-mainline/fs/cifs/export.c
   branches/linux-converged-for-old-kernels/README
   branches/linux-converged-for-old-kernels/fs/cifs/cifs_dfs_ref.c
   
branches/linux-converged-for-old-kernels/fs/make-cifs-backport-build-on-sles9.patch
Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/README
   branches/linux-2.6-cifs-git-devel/fs/cifs/TODO
   branches/linux-2.6-cifs-git-devel/fs/cifs/asn1.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_debug.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_fs_sb.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_unicode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_unicode.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_uniupr.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsencrypt.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsglob.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/fcntl.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/ioctl.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/link.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/md4.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/md5.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/misc.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/netmisc.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/nterr.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/nterr.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/ntlmssp.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/rfc1002pdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/sess.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/smbdes.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/smbencrypt.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/smberr.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/xattr.c
   branches/linux-2.6-mainline/fs/cifs/CHANGES
   branches/linux-2.6-mainline/fs/cifs/README
   branches/linux-2.6-mainline/fs/cifs/TODO
   branches/linux-2.6-mainline/fs/cifs/asn1.c
   branches/linux-2.6-mainline/fs/cifs/cifs_debug.c
   branches/linux-2.6-mainline/fs/cifs/cifs_fs_sb.h
   branches/linux-2.6-mainline/fs/cifs/cifs_unicode.c
   branches/linux-2.6-mainline/fs/cifs/cifs_unicode.h
   branches/linux-2.6-mainline/fs/cifs/cifs_uniupr.h
   branches/linux-2.6-mainline/fs/cifs/cifsencrypt.c
   branches/linux-2.6-mainline/fs/cifs/cifsfs.c
   branches/linux-2.6-mainline/fs/cifs/cifsfs.h
   branches/linux-2.6-mainline/fs/cifs/cifsglob.h
   branches/linux-2.6-mainline/fs/cifs/cifspdu.h
   branches/linux-2.6-mainline/fs/cifs/cifsproto.h
   branches/linux-2.6-mainline/fs/cifs/cifssmb.c
   branches/linux-2.6-mainline/fs/cifs/connect.c
   branches/linux-2.6-mainline/fs/cifs/dir.c
   branches/linux-2.6-mainline/fs/cifs/fcntl.c
   branches/linux-2.6-mainline/fs/cifs/file.c
   branches/linux-2.6-mainline/fs/cifs/inode.c
   branches/linux-2.6-mainline/fs/cifs/ioctl.c
   branches/linux-2.6-mainline/fs/cifs/link.c
   branches/linux-2.6-mainline/fs/cifs/md4.c
   branches/linux-2.6-mainline/fs/cifs/md5.c
   branches/linux-2.6-mainline/fs/cifs/misc.c
   branches/linux-2.6-mainline/fs/cifs/netmisc.c
   branches/linux-2.6-mainline/fs/cifs/nterr.c
   branches/linux-2.6-mainline/fs/cifs/nterr.h
   branches/linux-2.6-mainline/fs/cifs/ntlmssp.h
   branches/linux-2.6-mainline/fs/cifs/readdir.c
   branches/linux-2.6-mainline/fs/cifs/rfc1002pdu.h
   branches/linux-2.6-mainline/fs/cifs/sess.c
   branches/linux-2.6-mainline/fs/cifs/smbdes.c
   branches/linux-2.6-mainline/fs/cifs/smbencrypt.c
   branches/linux-2.6-mainline/fs/cifs/smberr.h
   branches/linux-2.6-mainline/fs/cifs/transport.c
   branches/linux-2.6-mainline/fs/cifs/xattr.c
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/README
   branches/linux-converged-for-old-kernels/fs/cifs/TODO
   branches/linux-converged-for-old-kernels/fs/cifs/asn1.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifs_debug.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifs_fs_sb.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifs_unicode.c
   branch

svn commit: samba-web r1147 - in trunk: .

2007-09-20 Thread sfrench
Author: sfrench
Date: 2007-09-20 20:30:11 + (Thu, 20 Sep 2007)
New Revision: 1147

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1147

Log:
Update cifs backport version number

Modified:
   trunk/Linux_CIFS_client.html


Changeset:
Modified: trunk/Linux_CIFS_client.html
===
--- trunk/Linux_CIFS_client.html2007-09-11 13:38:41 UTC (rev 1146)
+++ trunk/Linux_CIFS_client.html2007-09-20 20:30:11 UTC (rev 1147)
@@ -89,8 +89,8 @@
compile on 2.4 kernels, not just older 2.6. kernel 
versions). To
download replacement files for the fs/cifs directory 
which
includes a relatively recent version of the cifs vfs 
which has
-   been backported to build on various earlier kernels 
(2.6.14 or later) click http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.50.tar.gz";>cifs
-   1.50 for 2.6 kernels (released July 25th, 2007).
+   been backported to build on various earlier kernels 
(2.6.14 or later) click http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.50c.tar.gz";>cifs
+   1.50c for 2.6 kernels (released July 25th, 
2007).
CIFS VFS is licensed under the http://www.gnu.org/copyleft/gpl.html";>GNU
General Public License version 2 or later. 




svn commit: samba-web r1135 - in trunk/cifs: .

2007-07-26 Thread sfrench
Author: sfrench
Date: 2007-07-26 21:20:01 + (Thu, 26 Jul 2007)
New Revision: 1135

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1135

Log:
Update with link to new cifs backport version 1.50

Modified:
   trunk/cifs/cifs_download.html


Changeset:
Modified: trunk/cifs/cifs_download.html
===
--- trunk/cifs/cifs_download.html   2007-07-26 21:19:39 UTC (rev 1134)
+++ trunk/cifs/cifs_download.html   2007-07-26 21:20:01 UTC (rev 1135)
@@ -34,7 +34,7 @@
   cifs.ko kernel module (source code)
   http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.34a-SLES9.tar.gz";>fs/cifs/
 src 1.34a
   ftp://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.34-RHEL4a.tar.gz";>fs/cifs
 src 1.34a
-  http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.34a.tar.gz";>fs/cifs 
src 1.34a
+  http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.50.tar.gz";>fs/cifs src 
1.50
 
 
   cifs.ko kernel module (prebuilt for x86 default kernel)
@@ -122,4 +122,4 @@
 
 
 
-
\ No newline at end of file
+



svn commit: samba-web r1134 - in trunk: .

2007-07-26 Thread sfrench
Author: sfrench
Date: 2007-07-26 21:19:39 + (Thu, 26 Jul 2007)
New Revision: 1134

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1134

Log:
Update link to new cifs version (1.50).

Modified:
   trunk/Linux_CIFS_client.html


Changeset:
Modified: trunk/Linux_CIFS_client.html
===
--- trunk/Linux_CIFS_client.html2007-07-26 21:11:19 UTC (rev 1133)
+++ trunk/Linux_CIFS_client.html2007-07-26 21:19:39 UTC (rev 1134)
@@ -14,14 +14,11 @@
   
 
 LATEST UPDATES – cifs user's guide documentation is now
-available on samba.org.  cifs vfs version 1.48 is accepted into
-mainline kernel (2.6.21) which includes spectacularly better write
-performance for some common small sequential write workloads. cifs
-1.49 includes support for ipv6 and also much better mkdir performance
-to Samba 3.0.25 (which leverages the newest CIFS POSIX protocol
-extensions). A backported version of cifs 1.48 which builds on old
-kernel versions is also available.  cifs vfs 1.49 is current in the
-cifs-2.6.git tree.
+available on samba.org.  cifs vfs version 1.50 is accepted into
+mainline kernel (2.6.23-rc1) and includes improved POSIX delete
+as well as bug fixes (e.g. for NTLMv2 signing).
+A backported version of cifs 1.50 which builds on old
+kernel versions is also available. 
 


@@ -83,9 +80,7 @@
the other features being planned for future 
releases.  
The CIFS VFS has been tested with Linux 2.4.14 and 
later as well
as regular testing on Linux 2.6 (and has been in the 
kernel source
-   starting with Linux kernel 2.5.42. The CIFS client is 
no longer
-   considered "expiremental" in Linux versions 
after 2.6.7
-   (cifs version 1.19) or later. Testing has been done on 
various
+   starting with Linux kernel 2.5.42.  Testing has been 
done on various
hardware architectures including x86 and even big 
endian zSeries
hardware.   The cifs and smbfs file systems 
can coexist
on the same system and do not conflict.   
@@ -94,8 +89,8 @@
compile on 2.4 kernels, not just older 2.6. kernel 
versions). To
download replacement files for the fs/cifs directory 
which
includes a relatively recent version of the cifs vfs 
which has
-   been backported to build on various earlier kernels 
click http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.48a.tar.gz";>cifs
-   1.48a for 2.6 kernels (released April 4th, 
2007).
+   been backported to build on various earlier kernels 
(2.6.14 or later) click http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.50.tar.gz";>cifs
+   1.50 for 2.6 kernels (released July 25th, 2007).
CIFS VFS is licensed under the http://www.gnu.org/copyleft/gpl.html";>GNU
General Public License version 2 or later. 

@@ -111,4 +106,4 @@
 
 
 
-
\ No newline at end of file
+



svn commit: samba-web r1133 - in trunk: .

2007-07-26 Thread sfrench
Author: sfrench
Date: 2007-07-26 21:11:19 + (Thu, 26 Jul 2007)
New Revision: 1133

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1133

Log:
Add link to CIFS Unix Extensions wiki

Modified:
   trunk/CIFS_POSIX_extensions.html


Changeset:
Modified: trunk/CIFS_POSIX_extensions.html
===
--- trunk/CIFS_POSIX_extensions.html2007-07-09 17:12:37 UTC (rev 1132)
+++ trunk/CIFS_POSIX_extensions.html2007-07-26 21:11:19 UTC (rev 1133)
@@ -1,7 +1,7 @@
 
 
 
-CIFS POSIX Protocol/TITLE>
+CIFS POSIX Protocol
 
 
 
@@ -9,7 +9,7 @@
 
 
  
-LATEST UPDATES - CIFS POSIX Extensions presented at the 2006 Storage 
Developer Conference hosted by SNIA.
+LATEST UPDATES - CIFS POSIX Extensions presented at the 2007 Ottawa Linux 
Symposium and at Connectathon.  Overview of  the most current version will be 
presented at 2007 Storage Developer Conference in September
 
   
   
@@ -28,18 +28,20 @@
 
   
   http://us1.samba.org/samba/images/cifs-rail.jpg"; 
src="samba/images/cifs-rail.jpg">
-   http://en.wikipedia.org/wiki/CIFS";>What is the CIFS 
Protocol?
-  mailto:[EMAIL PROTECTED]@us.ibm.com">Questions to 
developers 
-  
-ftp://ftp.microsoft.com/developr/drg/cifs/";> Older 
Specifications
-   http://ubiqx.org/cifs/References.html";>Miscellaneous 
references to SMB/CIFS and loosely related protocols
-   http://samba.org/samba/ftp/cifs-cvs/snia-developer-2006-cifs-extensions.pdf";>Presentations
-http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf";>SNIA 
+
+
+http://en.wikipedia.org/wiki/CIFS";>What is the CIFS Protocol?
+http://wiki.samba.org/index.php/UNIX_Extensions";>Unix Extensions 
Documentation (wiki)
+ftp://ftp.microsoft.com/developr/drg/cifs/";> Older 
Specifications
+http://ubiqx.org/cifs/References.html";>Miscellaneous references 
to SMB/CIFS and loosely related protocols
+http://samba.org/samba/ftp/cifs-cvs/snia-developer-2006-cifs-extensions.pdf";>Presentations
+http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf";>SNIA 
 CIFS Specification 
-   http://www.ietf.org/internet-drafts/draft-crhertel-smb-url-11.txt";>SMB 
URL Specification 
+http://www.ietf.org/internet-drafts/draft-crhertel-smb-url-11.txt";>SMB 
URL Specification 
http://www.ubiqx.org/cifs/";>Implementing CIFS (Online 
Book) 
-  
+  
+mailto:[EMAIL PROTECTED]@us.ibm.com">Questions to 
developers 
+
   
   
   The CIFS POSIX Extensions are protocol extensions to enable POSIX 
compliant



svn commit: samba r23008 - in branches/SAMBA_3_0_25/source/client: .

2007-05-18 Thread sfrench
Author: sfrench
Date: 2007-05-19 02:52:14 + (Sat, 19 May 2007)
New Revision: 23008

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23008

Log:
Missing frees found by valgrind for mount.cifs

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-19 01:27:34 UTC 
(rev 23007)
+++ branches/SAMBA_3_0_25/source/client/mount.cifs.c2007-05-19 02:52:14 UTC 
(rev 23008)
@@ -621,6 +621,7 @@
 nocopy:
data = next_keyword;
}
+   free(*optionsp);
*optionsp = out;
return 0;
 }
@@ -882,8 +883,8 @@
char * ipaddr = NULL;
char * uuid = NULL;
char * mountpoint = NULL;
-   char * options;
-   char * resolved_path;
+   char * options = NULL;
+   char * resolved_path = NULL;
char * temp;
int rc;
int rsize = 0;
@@ -1079,12 +1080,15 @@
get_password_from_file(0, getenv("PASSWD_FILE"));
}
 
-if (orgoptions && parse_options(&orgoptions, &flags))
-return -1;
+if (orgoptions && parse_options(&orgoptions, &flags)) {
+rc = -1;
+   goto mount_exit;
+   }
ipaddr = parse_server(&share_name);
if((ipaddr == NULL) && (got_ip == 0)) {
printf("No ip address specified and hostname not found\n");
-   return -1;
+   rc = -1;
+   goto mount_exit;
}

/* BB save off path and pop after mount returns? */
@@ -1098,17 +1102,20 @@
}
if(chdir(mountpoint)) {
printf("mount error: can not change directory into mount target 
%s\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if(stat (".", &statbuf)) {
printf("mount error: mount point %s does not 
exist\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if (S_ISDIR(statbuf.st_mode) == 0) {
printf("mount error: mount point %s is not a 
directory\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if((getuid() != 0) && (geteuid() == 0)) {
@@ -1154,6 +1161,8 @@
optlen += strlen(ipaddr) + 4;
if(mountpassword)
optlen += strlen(mountpassword) + 6;
+   if(options)
+   free(options);
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 == NULL) {
@@ -1236,14 +1245,11 @@
}
}
default:
-   
printf("mount error %d = %s\n",errno,strerror(errno));
}
printf("Refer to the mount.cifs(8) manual page (e.g.man 
mount.cifs)\n");
-   if(mountpassword) {
-   memset(mountpassword,0,64);
-   }
-   return -1;
+   rc = -1;
+   goto mount_exit;
} else {
pmntfile = setmntent(MOUNTED, "a+");
if(pmntfile) {
@@ -1273,7 +1279,7 @@

strcat(mountent.mnt_opts,",user=");

strcat(mountent.mnt_opts,mount_user);
}
-   free(mount_user);
+   /* free(mount_user); do not free static 
mem */
}
}
mountent.mnt_freq = 0;
@@ -1286,6 +1292,8 @@
printf("could not update mount table\n");
}
}
+   rc = 0;
+mount_exit:
if(mountpassword) {
int len = strlen(mountpassword);
memset(mountpassword,0,len);
@@ -1308,6 +1316,6 @@
if(free_share_name) {
free(share_name);
}
-   return 0;
+   return rc;
 }
 



svn commit: samba r22982 - in branches/SAMBA_3_0/source/client: .

2007-05-17 Thread sfrench
Author: sfrench
Date: 2007-05-17 22:40:48 + (Thu, 17 May 2007)
New Revision: 22982

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22982

Log:
Do not prompt for password on sec=none for mount.cifs (and allow guest
option to pass to kernel code so it can know when to retry)


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-17 22:36:08 UTC 
(rev 22981)
+++ branches/SAMBA_3_0/source/client/mount.cifs.c   2007-05-17 22:40:48 UTC 
(rev 22982)
@@ -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 r22981 - in branches/SAMBA_3_0_26/source/client: .

2007-05-17 Thread sfrench
Author: sfrench
Date: 2007-05-17 22:36:08 + (Thu, 17 May 2007)
New Revision: 22981

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22981

Log:
Do not prompt for password on sec=none for mount.cifs (and allow guest
option to pass to kernel code so it can know when to retry)

Modified:
   branches/SAMBA_3_0_26/source/client/mount.cifs.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/client/mount.cifs.c
===
--- branches/SAMBA_3_0_26/source/client/mount.cifs.c2007-05-17 22:31:41 UTC 
(rev 22980)
+++ branches/SAMBA_3_0_26/source/client/mount.cifs.c2007-05-17 22:36:08 UTC 
(rev 22981)
@@ -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 r22980 - in branches/SAMBA_3_0_26/source/client: .

2007-05-17 Thread sfrench
Author: sfrench
Date: 2007-05-17 22:31:41 + (Thu, 17 May 2007)
New Revision: 22980

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22980

Log:
Add in misc frees that valgrind noticed for mount.cifs.c

Modified:
   branches/SAMBA_3_0_26/source/client/mount.cifs.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/client/mount.cifs.c
===
--- branches/SAMBA_3_0_26/source/client/mount.cifs.c2007-05-17 22:28:28 UTC 
(rev 22979)
+++ branches/SAMBA_3_0_26/source/client/mount.cifs.c2007-05-17 22:31:41 UTC 
(rev 22980)
@@ -618,6 +618,7 @@
 nocopy:
data = next_keyword;
}
+   free(*optionsp);
*optionsp = out;
return 0;
 }
@@ -879,8 +880,8 @@
char * ipaddr = NULL;
char * uuid = NULL;
char * mountpoint = NULL;
-   char * options;
-   char * resolved_path;
+   char * options = NULL;
+   char * resolved_path = NULL;
char * temp;
int rc;
int rsize = 0;
@@ -1076,12 +1077,15 @@
get_password_from_file(0, getenv("PASSWD_FILE"));
}
 
-if (orgoptions && parse_options(&orgoptions, &flags))
-return -1;
+if (orgoptions && parse_options(&orgoptions, &flags)) {
+rc = -1;
+   goto mount_exit;
+   }
ipaddr = parse_server(&share_name);
if((ipaddr == NULL) && (got_ip == 0)) {
printf("No ip address specified and hostname not found\n");
-   return -1;
+   rc = -1;
+   goto mount_exit;
}

/* BB save off path and pop after mount returns? */
@@ -1095,17 +1099,20 @@
}
if(chdir(mountpoint)) {
printf("mount error: can not change directory into mount target 
%s\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if(stat (".", &statbuf)) {
printf("mount error: mount point %s does not 
exist\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if (S_ISDIR(statbuf.st_mode) == 0) {
printf("mount error: mount point %s is not a 
directory\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if((getuid() != 0) && (geteuid() == 0)) {
@@ -1151,6 +1158,8 @@
optlen += strlen(ipaddr) + 4;
if(mountpassword)
optlen += strlen(mountpassword) + 6;
+   if(options)
+   free(options);
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 == NULL) {
@@ -1233,14 +1242,11 @@
}
}
default:
-   
printf("mount error %d = %s\n",errno,strerror(errno));
}
printf("Refer to the mount.cifs(8) manual page (e.g.man 
mount.cifs)\n");
-   if(mountpassword) {
-   memset(mountpassword,0,64);
-   }
-   return -1;
+   rc = -1;
+   goto mount_exit;
} else {
pmntfile = setmntent(MOUNTED, "a+");
if(pmntfile) {
@@ -1270,7 +1276,7 @@

strcat(mountent.mnt_opts,",user=");

strcat(mountent.mnt_opts,mount_user);
}
-   free(mount_user);
+   /* free(mount_user); do not free static 
mem */
}
}
mountent.mnt_freq = 0;
@@ -1283,6 +1289,8 @@
printf("could not update mount table\n");
}
}
+   rc = 0;
+mount_exit:
if(mountpassword) {
int len = strlen(mountpassword);
memset(mountpassword,0,len);
@@ -1305,6 +1313,6 @@
if(free_share_name) {
free(share_name);
}
-   return 0;
+   return rc;
 }
 



svn commit: samba r22979 - in branches/SAMBA_3_0/source/client: .

2007-05-17 Thread sfrench
Author: sfrench
Date: 2007-05-17 22:28:28 + (Thu, 17 May 2007)
New Revision: 22979

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22979

Log:
Revert previous checkin (which had some debug junk) and fix misc frees that
valgrind noticed

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-17 22:27:42 UTC 
(rev 22978)
+++ branches/SAMBA_3_0/source/client/mount.cifs.c   2007-05-17 22:28:28 UTC 
(rev 22979)
@@ -79,8 +79,8 @@
 static char * mountpassword = NULL;
 char * domain_name = NULL;
 char * prefixpath = NULL;
-char * servern = NULL;
 
+
 /* BB finish BB
 
 cifs_umount
@@ -128,8 +128,7 @@
struct passwd *password = getpwuid(getuid());
 
if (password) {
-   if(password->pw_name);
-   username = strdup(password->pw_name);
+   username = password->pw_name;
}
return username;
 }
@@ -420,11 +419,6 @@
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");
@@ -573,6 +567,8 @@
*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) {
@@ -809,9 +805,6 @@
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 */
@@ -888,7 +881,7 @@
char * uuid = NULL;
char * mountpoint = NULL;
char * options = NULL;
-   char * resolved_path;
+   char * resolved_path = NULL;
char * temp;
int rc;
int rsize = 0;
@@ -899,7 +892,6 @@
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;
@@ -1085,12 +1077,15 @@
get_password_from_file(0, getenv("PASSWD_FILE"));
}
 
-if (orgoptions && parse_options(&orgoptions, &flags))
-return -1;
+if (orgoptions && parse_options(&orgoptions, &flags)) {
+rc = -1;
+   goto mount_exit;
+   }
ipaddr = parse_server(&share_name);
if((ipaddr == NULL) && (got_ip == 0)) {
printf("No ip address specified and hostname not found\n");
-   return -1;
+   rc = -1;
+   goto mount_exit;
}

/* BB save off path and pop after mount returns? */
@@ -1104,17 +1099,20 @@
}
if(chdir(mountpoint)) {
printf("mount error: can not change directory into mount target 
%s\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if(stat (".", &statbuf)) {
printf("mount error: mount point %s does not 
exist\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if (S_ISDIR(statbuf.st_mode) == 0) {
printf("mount error: mount point %s is not a 
directory\n",mountpoint);
-   return -1;
+   rc = -1;
+   goto mount_exit;
}
 
if((getuid() != 0) && (geteuid() == 0)) {
@@ -11

svn commit: samba r22779 - in branches/SAMBA_3_0/source/client: .

2007-05-10 Thread sfrench
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(tem

svn commit: samba r22778 - in branches/SAMBA_3_0_25/source/client: .

2007-05-10 Thread sfrench
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 r22560 - in branches/SAMBA_3_0/source/client: .

2007-04-28 Thread sfrench
Author: sfrench
Date: 2007-04-28 16:56:35 + (Sat, 28 Apr 2007)
New Revision: 22560

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22560

Log:
Clean up frees of realloc memory in mount.cifs (thanks to Alex for
reminding me how to use Valgrind).

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-04-28 16:39:24 UTC 
(rev 22559)
+++ branches/SAMBA_3_0/source/client/mount.cifs.c   2007-04-28 16:56:35 UTC 
(rev 22560)
@@ -618,6 +618,7 @@
 nocopy:
data = next_keyword;
}
+   free(*optionsp);
*optionsp = out;
return 0;
 }
@@ -1233,14 +1234,11 @@
}
}
default:
-   
printf("mount error %d = %s\n",errno,strerror(errno));
}
printf("Refer to the mount.cifs(8) manual page (e.g.man 
mount.cifs)\n");
-   if(mountpassword) {
-   memset(mountpassword,0,64);
-   }
-   return -1;
+   rc = -1;
+   goto mount_exit;
} else {
pmntfile = setmntent(MOUNTED, "a+");
if(pmntfile) {
@@ -1283,6 +1281,8 @@
printf("could not update mount table\n");
}
}
+   rc = 0;
+mount_exit:
if(mountpassword) {
int len = strlen(mountpassword);
memset(mountpassword,0,len);
@@ -1305,6 +1305,6 @@
if(free_share_name) {
free(share_name);
}
-   return 0;
+   return rc;
 }
 



svn commit: samba-web r1106 - in trunk: .

2007-04-27 Thread sfrench
Author: sfrench
Date: 2007-04-27 13:24:18 + (Fri, 27 Apr 2007)
New Revision: 1106

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1106

Log:
Update cifs client home page to indicate new version numbers

Modified:
   trunk/Linux_CIFS_client.html


Changeset:
Modified: trunk/Linux_CIFS_client.html
===
--- trunk/Linux_CIFS_client.html2007-04-25 12:19:28 UTC (rev 1105)
+++ trunk/Linux_CIFS_client.html2007-04-27 13:24:18 UTC (rev 1106)
@@ -1,90 +1,114 @@
-
-
-
-Linux CIFS Client
-
-
-
-
-
-
- 
-LATEST UPDATES - cifs vfs version 1.45 is accepted into mainline kernel 
(2.6.18) and includes full posix byte range locking support to current Samba 
servers, and also has much improved posix locking support to other servers, 
even those which do not support the CIFS POSIX protocol extensions.  cifs 1.45 
also includes much improved support for legacy servers including OS/2 and 
Windows 9x.  A backported version of cifs 1.45 which builds on old kernel 
versions is also available. cifs vfs 1.46 is current in the cifs-2.6.git 
tree.
-
-  
-  
-  
-
-  
-  
-  CIFS VFS - 
-  
-  
-  Advanced Common Internet File System for 
-  Linux 
-  
-  
-
-
-  
-  http://us1.samba.org/samba/images/penguin.gif"; 
src="samba/images/penguin.gif">
-  mailto:[EMAIL PROTECTED]">Questions to developers 
-  
-https://bugzilla.samba.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=CifsVFS&content=";>Search
 for open bugs in bugzilla 
-Download
-CIFS Testing
-Suggested test plan (under construction)
-http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;h=7b4ac096cd114d34e623bafaed91b85ba4a95e62";>Installation 
-http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;h=8cc881694e2911d0a2eff3ca7eb5dd5efc0503d3";>Todo
 list 
-http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf";>SNIA 
-CIFS Specification 
-http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;h=72fdc10dfdd7c94327ad87efff1dec2adbb67cbd";>Authors/Thankshttp://oss.software.ibm.com/developer/opensource/linux/presentations/samba/ut_cifs.pdf";>r
-  
-  
-  
-  The CIFS VFS is a virtual file system for Linux to allow access to 
servers
-  and storage appliances compliant with the SNIA CIFS Specification version
-  1.0 or later.    Popular servers such as Samba, Windows
-  2000, Windows XP and many others support CIFS by default.   The
-  CIFS VFS provides some support for older servers based on the more
-  primitive SMB (Server Message Block) protocol (you also can use the 
Linux filesystem
-  smbfs as an alternative for accessing these).   CIFS VFS is 
designed to take
-  advantage of advanced network filesystem features such as locking, 
Unicode (advanced
-  internationalization), hardlinks, dfs (heirarchical, replicated name 
space),
-  distributed caching and uses native TCP names (rather than RFC1001, 
Netbios
-  names).  Unlike some other network filesystems all key network 
function
-  including authentication is provided in kernel (and changes to mount 
and/or
-  a mount helper file are not required in order to enable the CIFS VFS).
-  With the addition of upcoming improvements to the mount helper 
(mount.cifs)
-  the CIFS VFS will be able to take advantage of the new CIFS URL 
specification
-  though.   The Todo list includes some of the other features 
being
-  planned for future releases.   The CIFS VFS has been tested 
with
-  Linux 2.4.14 and later as well as regular testing on Linux 2.6 (and has
-  been in the kernel source starting with Linux kernel 2.5.42. The CIFS 
client
-  is no longer considered "expiremental" in Linux versions after
-  2.6.7 (cifs version 1.19) or later. Testing has been done on various 
hardware
-  architectures including x86 and even big endian zSeries 
hardware.  
-  The cifs and smbfs filesystems can coexist on the same system and do not
-  conflict. 
-   
-  The current version of the CIFS VFS has been backported to compile on 
2.4 kernels, not just older 2.6. kernel versions).  To download replacement 
files for the
-  fs/cifs directory which includes a relatively recent version of the cifs
-  vfs click http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.45.tar.gz";>1.45 for 
2.6 kernels (released August 2nd, 2006).CIFS VFS is licensed under the 
http://www.gnu.org/copyleft/gpl.html";>GNU General Public 
License 
-  version 2 or later. 
-  
-
-
-  
-  Thanks to SNIA, IBM and t

svn commit: samba r22526 - in branches/SAMBA_3_0/source/client: .

2007-04-26 Thread sfrench
Author: sfrench
Date: 2007-04-26 17:23:33 + (Thu, 26 Apr 2007)
New Revision: 22526

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22526

Log:
Support deep tree mounts after share (instead of having to specify
prepath)

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-04-26 17:22:13 UTC 
(rev 22525)
+++ branches/SAMBA_3_0/source/client/mount.cifs.c   2007-04-26 17:23:33 UTC 
(rev 22526)
@@ -78,6 +78,7 @@
 static char * user_name = NULL;
 static char * mountpassword = NULL;
 char * domain_name = NULL;
+char * prefixpath = NULL;
 
 
 /* BB finish BB
@@ -804,6 +805,11 @@
host_entry = gethostbyname(unc_name);
}
*(share - 1) = '/'; /* put the slash back */
+   if ((prefixpath = strchr(share, '/'))) {
+   *prefixpath = 0;  /* permanently 
terminate the string */
+   if (!strlen(++prefixpath))
+   prefixpath = NULL; /* this 
needs to be done explicitly */
+   }
if(got_ip) {
if(verboseflag)
printf("ip address specified 
explicitly\n");
@@ -1196,6 +1202,10 @@
strcat(options,",");
strcat(options,orgoptions);
}
+   if(prefixpath) {
+   strncat(options,",prefixpath=",12);
+   strcat(options,prefixpath); /* no need to cat the / */
+   }   
if(verboseflag)
printf("\nmount.cifs kernel mount options %s \n",options);
if(mount(share_name, mountpoint, "cifs", flags, options)) {



svn commit: samba r22525 - in branches/SAMBA_3_0_25/source/client: .

2007-04-26 Thread sfrench
Author: sfrench
Date: 2007-04-26 17:22:13 + (Thu, 26 Apr 2007)
New Revision: 22525

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22525

Log:
Allow prepath

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-04-26 12:09:25 UTC 
(rev 22524)
+++ branches/SAMBA_3_0_25/source/client/mount.cifs.c2007-04-26 17:22:13 UTC 
(rev 22525)
@@ -78,6 +78,7 @@
 static char * user_name = NULL;
 static char * mountpassword = NULL;
 char * domain_name = NULL;
+char * prefixpath = NULL;
 
 
 /* BB finish BB
@@ -804,6 +805,11 @@
host_entry = gethostbyname(unc_name);
}
*(share - 1) = '/'; /* put the slash back */
+   if ((prefixpath = strchr(share, '/'))) {
+   *prefixpath = 0;  /* permanently 
terminate the string */
+   if (!strlen(++prefixpath))
+   prefixpath = NULL; /* this 
needs to be done explicitly */
+   }
if(got_ip) {
if(verboseflag)
printf("ip address specified 
explicitly\n");
@@ -1196,6 +1202,10 @@
strcat(options,",");
strcat(options,orgoptions);
}
+   if(prefixpath) {
+   strncat(options,",prefixpath=",12);
+   strcat(options,prefixpath); /* no need to cat the / */
+   }   
if(verboseflag)
printf("\nmount.cifs kernel mount options %s \n",options);
if(mount(share_name, mountpoint, "cifs", flags, options)) {



svn commit: linux-cifs-client r111 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-04-26 Thread sfrench
Author: sfrench
Date: 2007-04-26 14:40:26 + (Thu, 26 Apr 2007)
New Revision: 111

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=111

Log:
Add missing file

Added:
   branches/linux-converged-for-old-kernels/fs/cifs/export.c


Changeset:
Added: branches/linux-converged-for-old-kernels/fs/cifs/export.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/export.c   2007-04-26 
14:40:07 UTC (rev 110)
+++ branches/linux-converged-for-old-kernels/fs/cifs/export.c   2007-04-26 
14:40:26 UTC (rev 111)
@@ -0,0 +1,52 @@
+/*
+ *   fs/cifs/export.c
+ *
+ *   Copyright (C) International Business Machines  Corp., 2007
+ *   Author(s): Steve French ([EMAIL PROTECTED])
+ *
+ *   Common Internet FileSystem (CIFS) client
+ * 
+ *   Operations related to support for exporting files via NFSD
+ *
+ *   This library is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU Lesser General Public License as published
+ *   by the Free Software Foundation; either version 2.1 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This library is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+ *   the GNU Lesser General Public License for more details.
+ *
+ *   You should have received a copy of the GNU Lesser General Public License
+ *   along with this library; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+ 
+ /* 
+  * See Documentation/filesystems/Exporting
+  * and examples in fs/exportfs
+  */
+
+#include 
+ 
+#ifdef CONFIG_CIFS_EXPERIMENTAL
+ 
+static struct dentry *cifs_get_parent(struct dentry *dentry)
+{
+   /* BB need to add code here eventually to enable export via NFSD */
+   return ERR_PTR(-EACCES);
+}
+ 
+struct export_operations cifs_export_ops = {
+   .get_parent = cifs_get_parent,
+/* Following five export operations are unneeded so far and can default */ 

+/* .get_dentry =
+   .get_name =
+   .find_exported_dentry =
+   .decode_fh = 
+   .encode_fs =  */
+ };
+ 
+#endif /* EXPERIMENTAL */
+ 



svn commit: linux-cifs-client r110 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-04-26 Thread sfrench
Author: sfrench
Date: 2007-04-26 14:40:07 + (Thu, 26 Apr 2007)
New Revision: 110

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=110

Log:
Update cifs version to 1.49

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/TODO
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/TODO
===
--- branches/linux-converged-for-old-kernels/fs/cifs/TODO   2007-04-26 
14:21:22 UTC (rev 109)
+++ branches/linux-converged-for-old-kernels/fs/cifs/TODO   2007-04-26 
14:40:07 UTC (rev 110)
@@ -1,4 +1,4 @@
-Version 1.39 November 30, 2005
+Version 1.49 April 26, 2007
 
 A Partial List of Missing Features
 ==
@@ -18,7 +18,7 @@
 
 d) Kerberos/SPNEGO session setup support - (started)
 
-e) NTLMv2 authentication (mostly implemented - double check
+e) More testing of NTLMv2 authentication (mostly implemented - double check
 that NTLMv2 signing works, also need to cleanup now unneeded SessSetup code in
 fs/cifs/connect.c)
 
@@ -27,55 +27,44 @@
 and raw NTLMSSP already. This is important when enabling
 extended security and mounting to Windows 2003 Servers
 
-f) Directory entry caching relies on a 1 second timer, rather than 
+g) Directory entry caching relies on a 1 second timer, rather than 
 using FindNotify or equivalent.  - (started)
 
-g) A few byte range testcases fail due to POSIX vs. Windows/CIFS
-style byte range lock differences.  Save byte range locks so
-reconnect can replay them.  
-
-h) Support unlock all (unlock 0,MAX_OFFSET)
-by unlocking all known byte range locks that we locked on the file.
-
-i) quota support (needs minor kernel change since quota calls
+h) quota support (needs minor kernel change since quota calls
 to make it to network filesystems or deviceless filesystems)
 
-j) investigate sync behavior (including syncpage) and check  
+i) investigate sync behavior (including syncpage) and check  
 for proper behavior of intr/nointr
 
-k) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
+j) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
 extra copy in/out of the socket buffers in some cases.
 
-l) finish support for IPv6.  This is mostly complete but
-needs a simple conversion of ipv6 to sin6_addr from the
-address in string representation.
-
-m) Better optimize open (and pathbased setfilesize) to reduce the
+k) Better optimize open (and pathbased setfilesize) to reduce the
 oplock breaks coming from windows srv.  Piggyback identical file
 opens on top of each other by incrementing reference count rather
 than resending (helps reduce server resource utilization and avoid
 spurious oplock breaks).
 
-o) Improve performance of readpages by sending more than one read
+l) Improve performance of readpages by sending more than one read
 at a time when 8 pages or more are requested. In conjuntion
 add support for async_cifs_readpages.
 
-p) Add support for storing symlink info to Windows servers 
+m) Add support for storing symlink info to Windows servers 
 in the Extended Attribute format their SFU clients would recognize.
 
-q) Finish fcntl D_NOTIFY support so kde and gnome file list windows
+n) Finish fcntl D_NOTIFY support so kde and gnome file list windows
 will autorefresh (partially complete by Asser). Needs minor kernel
 vfs change to support removing D_NOTIFY on a file.   
 
-r) Add GUI tool to configure /proc/fs/cifs settings and for display of
+o) Add GUI tool to configure /proc/fs/cifs settings and for display of
 the CIFS statistics (started)
 
-s) implement support for security and trusted categories of xattrs
+p) implement support for security and trusted categories of xattrs
 (requires minor protocol extension) to enable better support for SELINUX
 
-t) Implement O_DIRECT flag on open (already supported on mount)
+q) Implement O_DIRECT flag on open (already supported on mount)
 
-u) Create UID mapping facility so server UIDs can be mapped on a per
+r) Create UID mapping facility so server UIDs can be mapped on a per
 mount or a per server basis to client UIDs or nobody if no mapping
 exists.  This is helpful when Unix extensions are negotiated to
 allow better permission checking when UIDs differ on the server
@@ -83,19 +72,26 @@
 standard for asking the server for the corresponding name of a
 particular uid.
 
-v) Add support for CIFS Unix and also the newer POSIX extensions to the
+s) Add support for CIFS Unix and also the newer POSIX extensions to the
 server side for Samba 4.
 
-w) Finish up the dos time conversion routines needed to return old server
-time to the client (default time, of now or time 0 is used now for these 
-very old servers)
-
-x) In support for OS/2 (LANMAN 1.2 and LANMAN2.1 based SMB servers) 
+t) In support for OS/2 (LANMAN 1.2 and LANMAN2.1 based SMB servers) 
 need to add ability to set time t

svn commit: linux-cifs-client r109 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-04-26 Thread sfrench
Author: sfrench
Date: 2007-04-26 14:21:22 + (Thu, 26 Apr 2007)
New Revision: 109

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=109

Log:
Merge with cifs-converged-for-old-kernels git tree on kernel.org

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/asn1.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifs_unicode.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs24.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
   branches/linux-converged-for-old-kernels/fs/cifs/sess.c


Changeset:
Sorry, the patch is too large (1010 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=109


svn commit: linux-cifs-client r108 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2007-04-26 Thread sfrench
Author: sfrench
Date: 2007-04-26 13:39:53 + (Thu, 26 Apr 2007)
New Revision: 108

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=108

Log:
Merge with cifs git tree

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_unicode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/netmisc.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c


Changeset:
Sorry, the patch is too large (1276 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=108


svn commit: samba r21840 - in branches/SAMBA_3_0/source/client: .

2007-03-14 Thread sfrench
Author: sfrench
Date: 2007-03-14 22:15:21 + (Wed, 14 Mar 2007)
New Revision: 21840

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21840

Log:
mount.cifs compile on old libc missing bind mount #define

Thanks to Thomas Jarosch for pointing this out.


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-03-14 19:10:21 UTC 
(rev 21839)
+++ branches/SAMBA_3_0/source/client/mount.cifs.c   2007-03-14 22:15:21 UTC 
(rev 21840)
@@ -59,6 +59,10 @@
 #define MS_MOVE 8192 
 #endif 
 
+#ifndef MS_BIND
+#define MS_BIND 4096
+#endif
+
 #define CONST_DISCARD(type, ptr)  ((type) ((void *) (ptr)))
 
 const char *thisprogram;



svn commit: linux-cifs-client r107 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-03-07 Thread sfrench
Author: sfrench
Date: 2007-03-08 05:58:19 + (Thu, 08 Mar 2007)
New Revision: 107

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=107

Log:
Merge with git tree

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/Makefile
   branches/linux-converged-for-old-kernels/fs/cifs/TODO
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/dir.c
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
   branches/linux-converged-for-old-kernels/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (538 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=107


svn commit: linux-cifs-client r106 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2007-03-07 Thread sfrench
Author: sfrench
Date: 2007-03-08 05:35:21 + (Thu, 08 Mar 2007)
New Revision: 106

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=106

Log:
Merge with cifs-2.6.git

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/Makefile
   branches/linux-2.6-cifs-git-devel/fs/cifs/README
   branches/linux-2.6-cifs-git-devel/fs/cifs/TODO
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsglob.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/link.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (1053 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=106


svn commit: linux-cifs-client r105 - in branches/linux-2.6-mainline/fs/cifs: .

2007-03-07 Thread sfrench
Author: sfrench
Date: 2007-03-08 05:34:46 + (Thu, 08 Mar 2007)
New Revision: 105

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=105

Log:
merge with mainline git 

Removed:
   branches/linux-2.6-mainline/fs/cifs/cifssmb.c.orig
Modified:
   branches/linux-2.6-mainline/fs/cifs/CHANGES
   branches/linux-2.6-mainline/fs/cifs/Makefile
   branches/linux-2.6-mainline/fs/cifs/README
   branches/linux-2.6-mainline/fs/cifs/TODO
   branches/linux-2.6-mainline/fs/cifs/cifsfs.c
   branches/linux-2.6-mainline/fs/cifs/cifsfs.h
   branches/linux-2.6-mainline/fs/cifs/cifsglob.h
   branches/linux-2.6-mainline/fs/cifs/cifspdu.h
   branches/linux-2.6-mainline/fs/cifs/cifsproto.h
   branches/linux-2.6-mainline/fs/cifs/cifssmb.c
   branches/linux-2.6-mainline/fs/cifs/connect.c
   branches/linux-2.6-mainline/fs/cifs/dir.c
   branches/linux-2.6-mainline/fs/cifs/file.c
   branches/linux-2.6-mainline/fs/cifs/inode.c
   branches/linux-2.6-mainline/fs/cifs/link.c
   branches/linux-2.6-mainline/fs/cifs/readdir.c
   branches/linux-2.6-mainline/fs/cifs/smbdes.c
   branches/linux-2.6-mainline/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (5707 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=105


svn commit: linux-cifs-client r104 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-02-22 Thread sfrench
Author: sfrench
Date: 2007-02-23 05:39:42 + (Fri, 23 Feb 2007)
New Revision: 104

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=104

Log:
Merge with git tree

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/README
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/link.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/README
===
--- branches/linux-converged-for-old-kernels/fs/cifs/README 2007-02-08 
18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/README 2007-02-23 
05:39:42 UTC (rev 104)
@@ -1,5 +1,5 @@
 The CIFS VFS support for Linux supports many advanced network filesystem 
-features such as heirarchical dfs like namespace, hardlinks, locking and more. 
 
+features such as hierarchical dfs like namespace, hardlinks, locking and more. 
 
 It was designed to comply with the SNIA CIFS Technical Reference (which 
 supersedes the 1992 X/Open SMB Standard) as well as to perform best practice 
 practical interoperability with Windows 2000, Windows XP, Samba and equivalent 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c   2007-02-08 
18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c   2007-02-23 
05:39:42 UTC (rev 104)
@@ -97,8 +97,9 @@
struct inode *inode;
struct cifs_sb_info *cifs_sb;
int rc = 0;
-
-   sb->s_flags |= MS_NODIRATIME; /* and probably even noatime */
+   
+   /* BB should we make this contingent on mount parm? */
+   sb->s_flags |= MS_NODIRATIME | MS_NOATIME;
sb->s_fs_info = kzalloc(sizeof(struct cifs_sb_info),GFP_KERNEL);
cifs_sb = CIFS_SB(sb);
if(cifs_sb == NULL)
@@ -288,7 +289,10 @@
cifs_inode->vfs_inode.i_blksize = CIFS_MAX_MSGSIZE;
 #endif
cifs_inode->vfs_inode.i_blkbits = 14;  /* 2**14 = CIFS_MAX_MSGSIZE */
-   cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME;
+   
+   /* Can not set i_flags here - they get immediately overwritten
+  to zero by the VFS */
+/* cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME;*/
INIT_LIST_HEAD(&cifs_inode->openFileList);
return &cifs_inode->vfs_inode;
 }
@@ -313,6 +317,7 @@
 
if (cifs_sb) {
if (cifs_sb->tcon) {
+/* BB add prepath to mount options displayed */
seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName);
if (cifs_sb->tcon->ses) {
if (cifs_sb->tcon->ses->userName)

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h  2007-02-08 
18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h  2007-02-23 
05:39:42 UTC (rev 104)
@@ -35,9 +35,11 @@
 #define BAD_PROT 0x
 
 /* SMB command codes */
-/* Some commands have minimal (wct=0,bcc=0), or uninteresting, responses
- (ie which include no useful data other than the SMB error code itself).
- Knowing this helps avoid response buffer allocations and copy in some cases */
+/*
+ * Some commands have minimal (wct=0,bcc=0), or uninteresting, responses
+ * (ie which include no useful data other than the SMB error code itself).
+ * Knowing this helps avoid response buffer allocations and copy in some cases
+ */
 #define SMB_COM_CREATE_DIRECTORY  0x00 /* trivial response */
 #define SMB_COM_DELETE_DIRECTORY  0x01 /* trivial response */
 #define SMB_COM_CLOSE 0x04 /* triv req/rsp, timestamp ignored 
*/

Modified: branches/linux-converged-for-old-kernels/fs/cifs/file.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-08 
18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-23 
05:39:42 UTC (rev 104)
@@ -1044,8 +1044,9 @@
/* since the write may have blocked check these pointers again */
if (file->f_dentry) {
if (file->f_dentry->d_inode) {
-   file->f_dentry->d_inode->i_ctime = 
-   file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
+/*BB We could make this contingent on superblock ATIME flag too */
+/* fil

svn commit: samba r21283 - in branches/SAMBA_3_0/source/client: .

2007-02-11 Thread sfrench
Author: sfrench
Date: 2007-02-11 19:28:52 + (Sun, 11 Feb 2007)
New Revision: 21283

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21283

Log:
Do not display away debug output of cifs dfs resolver by default
per Dave Howell's suggestion 

Modified:
   branches/SAMBA_3_0/source/client/cifs_resolver.sh


Changeset:
Modified: branches/SAMBA_3_0/source/client/cifs_resolver.sh
===
--- branches/SAMBA_3_0/source/client/cifs_resolver.sh   2007-02-11 17:51:38 UTC 
(rev 21282)
+++ branches/SAMBA_3_0/source/client/cifs_resolver.sh   2007-02-11 19:28:52 UTC 
(rev 21283)
@@ -46,6 +46,6 @@
echo "cifs_resolver: resolved: $2 to $DATAA"
keyctl instantiate $1 "$DATAA" $3 || exit 1
 fi
-
-} >&/dev/ttyS0
-exit $status
+# if you want to debug the upcall, replace /dev/null (below) with ttyS0 or file
+} >&/dev/null
+exit 0 



svn commit: linux-cifs-client r103 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-02-08 Thread sfrench
Author: sfrench
Date: 2007-02-08 18:16:41 + (Thu, 08 Feb 2007)
New Revision: 103

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=103

Log:
mege with git

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
2007-02-08 18:15:57 UTC (rev 102)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
2007-02-08 18:16:41 UTC (rev 103)
@@ -70,7 +70,7 @@
 extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid);
 extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length);
 extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info 
*);
-extern int is_size_safe_to_change(struct cifsInodeInfo *);
+extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
 extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *);
 extern unsigned int smbCalcSize(struct smb_hdr *ptr);
 extern unsigned int smbCalcSize_LE(struct smb_hdr *ptr);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/file.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-08 
18:15:57 UTC (rev 102)
+++ branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-08 
18:16:41 UTC (rev 103)
@@ -2050,7 +2050,7 @@
refreshing the inode only on increases in the file size 
but this is tricky to do without racing with writebehind
page caching in the current Linux kernel design */
-int is_size_safe_to_change(struct cifsInodeInfo *cifsInode)
+int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
 {
struct cifsFileInfo *open_file = NULL;
 
@@ -2075,6 +2075,9 @@
return 1;
}
 
+   if(i_size_read(&cifsInode->vfs_inode) < end_of_file)
+   return 1;
+
return 0;
} else
return 1;

Modified: branches/linux-converged-for-old-kernels/fs/cifs/inode.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/inode.c2007-02-08 
18:15:57 UTC (rev 102)
+++ branches/linux-converged-for-old-kernels/fs/cifs/inode.c2007-02-08 
18:16:41 UTC (rev 103)
@@ -143,7 +143,7 @@
inode->i_gid = le64_to_cpu(findData.Gid);
inode->i_nlink = le64_to_cpu(findData.Nlinks);
 
-   if (is_size_safe_to_change(cifsInfo)) {
+   if (is_size_safe_to_change(cifsInfo, end_of_file)) {
/* can not safely change the file size here if the
   client is writing to it due to potential races */
i_size_write(inode, end_of_file);
@@ -494,8 +494,8 @@
/* BB add code here -
   validate if device or weird share or device type? */
}
-   if (is_size_safe_to_change(cifsInfo)) {
-   /* can not safely change the file size here if the
+   if (is_size_safe_to_change(cifsInfo, 
le64_to_cpu(pfindData->EndOfFile))) {
+   /* can not safely shrink the file size here if the
   client is writing to it due to potential races */
i_size_write(inode,le64_to_cpu(pfindData->EndOfFile));
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/readdir.c  2007-02-08 
18:15:57 UTC (rev 102)
+++ branches/linux-converged-for-old-kernels/fs/cifs/readdir.c  2007-02-08 
18:16:41 UTC (rev 103)
@@ -239,7 +239,7 @@
atomic_set(&cifsInfo->inUse, 1);
}
 
-   if (is_size_safe_to_change(cifsInfo)) {
+   if (is_size_safe_to_change(cifsInfo, end_of_file)) {
/* can not safely change the file size here if the 
client is writing to it due to potential races */
i_size_write(tmp_inode, end_of_file);
@@ -372,10 +372,10 @@
tmp_inode->i_gid = le64_to_cpu(pfindData->Gid);
tmp_inode->i_nlink = le64_to_cpu(pfindData->Nlinks);
 
-   if (is_size_safe_to_change(cifsInfo)) {
+   if (is_size_safe_to_change(cifsInfo, end_of_file)) {
/* can not safely change the file size here if the 
client is writing to it due to potential races */
-   i_size_write(tmp_inode,end_of_file);
+   i_size_write(tmp_inode, end_of

svn commit: linux-cifs-client r102 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2007-02-08 Thread sfrench
Author: sfrench
Date: 2007-02-08 18:15:57 + (Thu, 08 Feb 2007)
New Revision: 102

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=102

Log:
merge with git

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES   2007-02-08 18:02:39 UTC 
(rev 101)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES   2007-02-08 18:15:57 UTC 
(rev 102)
@@ -1,6 +1,8 @@
 Version 1.47
 
 Fix oops in list_del during mount caused by unaligned string.
+Fix file corruption which could occur on some large file
+copies caused by writepages page i/o completion bug.
 Seek to SEEK_END forces check for update of file size for non-cached
 files.
 

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h 2007-02-08 18:02:39 UTC 
(rev 101)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h 2007-02-08 18:15:57 UTC 
(rev 102)
@@ -796,6 +796,8 @@
__u16  ByteCount;
 } __attribute__((packed)) OPENX_RSP; 
 
+/* For encoding of POSIX Open Request - see trans2 function 0x209 data struct 
*/
+
 /* Legacy write request for older servers */
 typedef struct smb_com_writex_req {
 struct smb_hdr hdr; /* wct = 12 */
@@ -2096,6 +2098,19 @@
 
 /* end of POSIX ACL definitions */
 
+typedef struct {
+   __u32 OpenFlags; /* same as NT CreateX */
+   __u32 PosixOpenFlags;
+   __u32 Mode;
+   __u16 Level; /* reply level requested (see QPathInfo levels) */
+   __u16 Pad;  /* reserved - MBZ */
+} __attribute__((packed)) OPEN_PSX_REQ; /* level 0x209 SetPathInfo data */
+
+typedef struct {
+   /* reply varies based on requested level */
+} __atribute__((packed)) OPEN_PSX_RSP; /* level 0x209 SetPathInfo data */
+
+
 struct file_internal_info {
__u64  UniqueId; /* inode number */
 } __attribute__((packed));  /* level 0x3ee */

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h   2007-02-08 
18:02:39 UTC (rev 101)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h   2007-02-08 
18:15:57 UTC (rev 102)
@@ -57,7 +57,7 @@
int * /* bytes returned */);
 extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length);
 extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info 
*);
-extern int is_size_safe_to_change(struct cifsInodeInfo *);
+extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
 extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *);
 extern unsigned int smbCalcSize(struct smb_hdr *ptr);
 extern unsigned int smbCalcSize_LE(struct smb_hdr *ptr);

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/file.c2007-02-08 18:02:39 UTC 
(rev 101)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/file.c2007-02-08 18:15:57 UTC 
(rev 102)
@@ -1954,7 +1954,7 @@
refreshing the inode only on increases in the file size 
but this is tricky to do without racing with writebehind
page caching in the current Linux kernel design */
-int is_size_safe_to_change(struct cifsInodeInfo *cifsInode)
+int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
 {
struct cifsFileInfo *open_file = NULL;
 
@@ -1976,6 +1976,9 @@
return 1;
}
 
+   if(i_size_read(&cifsInode->vfs_inode) < end_of_file)
+   return 1;
+
return 0;
} else
return 1;

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c   2007-02-08 18:02:39 UTC 
(rev 101)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c   2007-02-08 18:15:57 UTC 
(rev 102)
@@ -140,7 +140,7 @@
inode->i_gid = le64_to_cpu(findData.Gid);
inode->i_nlink = le64_to_cpu(findData.Nlinks);
 
-   if (is_size_safe_to_change(cifsInfo)) {
+   if (is_size_safe_to_change(cifsInfo, end_of_file)) {
/* can not safely change the file size here if the
   client is writing to it due to potential rac

svn commit: linux-cifs-client r101 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-02-08 Thread sfrench
Author: sfrench
Date: 2007-02-08 18:02:39 + (Thu, 08 Feb 2007)
New Revision: 101

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=101

Log:
merge with git

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c   2007-02-08 
18:02:13 UTC (rev 100)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c   2007-02-08 
18:02:39 UTC (rev 101)
@@ -284,7 +284,9 @@
file data or metadata */
cifs_inode->clientCanCacheRead = FALSE;
cifs_inode->clientCanCacheAll = FALSE;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
cifs_inode->vfs_inode.i_blksize = CIFS_MAX_MSGSIZE;
+#endif
cifs_inode->vfs_inode.i_blkbits = 14;  /* 2**14 = CIFS_MAX_MSGSIZE */
cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME;
INIT_LIST_HEAD(&cifs_inode->openFileList);
@@ -539,6 +541,16 @@
 #endif
 }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
+   unsigned long nr_segs, loff_t pos)
+{
+struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
+ssize_t written;
+
+written = generic_file_aio_write(iocb, iov, nr_segs, pos);
+#else
+
 static ssize_t cifs_file_writev(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *ppos)
 {
@@ -558,6 +570,7 @@
ssize_t written;
 
written = generic_file_aio_write(iocb, buf, count, pos);
+#endif
if (!CIFS_I(inode)->clientCanCacheAll)
filemap_fdatawrite(inode->i_mapping);
return written;
@@ -654,8 +667,10 @@
 const struct file_operations cifs_file_ops = {
.read = do_sync_read,
.write = do_sync_write,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
.readv = generic_file_readv,
.writev = cifs_file_writev,
+#endif
.aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write,
.open = cifs_open,
@@ -698,8 +713,10 @@
 const struct file_operations cifs_file_nobrl_ops = {
.read = do_sync_read,
.write = do_sync_write,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
.readv = generic_file_readv,
.writev = cifs_file_writev,
+#endif
.aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write,
.open = cifs_open,
@@ -775,8 +792,7 @@
 static void
 cifs_destroy_inodecache(void)
 {
-   if (kmem_cache_destroy(cifs_inode_cachep))
-   printk(KERN_WARNING "cifs_inode_cache: error freeing\n");
+   kmem_cache_destroy(cifs_inode_cachep);
 }
 
 static int
@@ -858,13 +874,9 @@
 cifs_destroy_request_bufs(void)
 {
mempool_destroy(cifs_req_poolp);
-   if (kmem_cache_destroy(cifs_req_cachep))
-   printk(KERN_WARNING
-  "cifs_destroy_request_cache: error not all structures 
were freed\n");
+   kmem_cache_destroy(cifs_req_cachep);
mempool_destroy(cifs_sm_req_poolp);
-   if (kmem_cache_destroy(cifs_sm_req_cachep))
-   printk(KERN_WARNING
- "cifs_destroy_request_cache: cifs_small_rq free error\n");
+   kmem_cache_destroy(cifs_sm_req_cachep);
 }
 
 static int
@@ -901,13 +913,8 @@
 cifs_destroy_mids(void)
 {
mempool_destroy(cifs_mid_poolp);
-   if (kmem_cache_destroy(cifs_mid_cachep))
-   printk(KERN_WARNING
-  "cifs_destroy_mids: error not all structures were 
freed\n");
-
-   if (kmem_cache_destroy(cifs_oplock_cachep))
-   printk(KERN_WARNING
-  "error not all oplock structures were freed\n");
+   kmem_cache_destroy(cifs_mid_cachep);
+   kmem_cache_destroy(cifs_oplock_cachep);
 }
 
 static int cifs_oplock_thread(void * dummyarg)



svn commit: linux-cifs-client r100 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2007-02-08 Thread sfrench
Author: sfrench
Date: 2007-02-08 18:02:13 + (Thu, 08 Feb 2007)
New Revision: 100

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=100

Log:
merge with git

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/smbdes.c


Changeset:
Sorry, the patch is too large (346 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=100


svn commit: samba-docs r1020 - in trunk/linux-client: .

2007-02-07 Thread sfrench
Author: sfrench
Date: 2007-02-07 21:53:58 + (Wed, 07 Feb 2007)
New Revision: 1020

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1020

Log:
minor updates to linux client user guide

Modified:
   trunk/linux-client/linux-cifs-client-guide.odt


Changeset:
Modified: trunk/linux-client/linux-cifs-client-guide.odt
===
(Binary files differ)



svn commit: samba-docs r1019 - in trunk: . linux-client

2007-02-07 Thread sfrench
Author: sfrench
Date: 2007-02-07 20:57:05 + (Wed, 07 Feb 2007)
New Revision: 1019

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1019

Log:
Add documentation for linux cifs client

Added:
   trunk/linux-client/
   trunk/linux-client/linux-cifs-client-guide.odt


Changeset:
Added: trunk/linux-client/linux-cifs-client-guide.odt
===
(Binary files differ)


Property changes on: trunk/linux-client/linux-cifs-client-guide.odt
___
Name: svn:mime-type
   + application/octet-stream



svn commit: samba r21224 - in branches/SAMBA_3_0/source/client: .

2007-02-07 Thread sfrench
Author: sfrench
Date: 2007-02-07 20:16:02 + (Wed, 07 Feb 2007)
New Revision: 21224

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21224

Log:
Initial checkin of cifs_host_name resolver helper script
(needed by /sbin keyctl utils to finish the upcall)

Added:
   branches/SAMBA_3_0/source/client/cifs_resolver.sh


Changeset:
Added: branches/SAMBA_3_0/source/client/cifs_resolver.sh
===
--- branches/SAMBA_3_0/source/client/cifs_resolver.sh   2007-02-07 19:43:44 UTC 
(rev 21223)
+++ branches/SAMBA_3_0/source/client/cifs_resolver.sh   2007-02-07 20:16:02 UTC 
(rev 21224)
@@ -0,0 +1,51 @@
+#!/bin/sh
+###
+#
+# Written by Igor Mammedov ([EMAIL PROTECTED])
+# Modified by Steve French <[EMAIL PROTECTED]>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version
+# 2 of the License, or (at your option) any later version.
+#
+###
+#
+# linux-cifs-client dns name resolver helper
+# called by cifs kernel module upcall to key API to resolve server name 
+# to IP when module connects to DFS link.  We may eventually make this
+# C code, but this is a good starting point.
+# You should have appropriate kernel and keyutils installed.
+# CIFS DFS Support will require Linux kernel module 
+#  cifs.ko version 1.48 or later.  
+#
+# Consult the CIFS client users guide for more details
+#   http://www.samba.org/samba/ftp/cifs-cvs/linux-cifs-client-guide.pdf
+#
+# Put the following string in /etc/request-key.conf without comment sign :)
+#create  cifs_resolver   *   *   /sbin/cifs_resolver.sh %k %d 
%S
+#
+# Put this script into /sbin directory
+# Call:  /sbin/cifs_resolver.sh   
+#
+#  - is server name to resolve
+#
+
+status=0
+{
+echo "cifs_resolver: resolving: $2"
+
+DATAA=`/usr/bin/host $2`
+status=$?
+
+if [ "x$status" != "x0" ]; then
+   echo "cifs_resolver: failed to resolve: $2"
+   exit $status
+else 
+   DATAA=`echo "$DATAA" | sed 's/.*has address //'`
+   echo "cifs_resolver: resolved: $2 to $DATAA"
+   keyctl instantiate $1 "$DATAA" $3 || exit 1
+fi
+
+} >&/dev/ttyS0
+exit $status



svn commit: linux-cifs-client r99 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-02-06 Thread sfrench
Author: sfrench
Date: 2007-02-07 07:25:18 + (Wed, 07 Feb 2007)
New Revision: 99

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=99

Log:
Fix minor build break

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c   2007-02-07 
07:12:17 UTC (rev 98)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c   2007-02-07 
07:25:18 UTC (rev 99)
@@ -33,9 +33,6 @@
 #include 
 #include 
 #include 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
-#include 
-#endif /* 2.6.19 */
 #include "cifsfs.h"
 #include "cifspdu.h"
 #define DECLARE_GLOBALS_HERE
@@ -46,8 +43,11 @@
 #include 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
 #include 
-#endif
-#define CIFS_MAGIC_NUMBER 0xFF534D42   /* the first four bytes of SMB PDUs */
+#endif /* 2.6.9 */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
+#include 
+#endif /* 2.6.19 */
+#define CIFS_MAGIC_NUMBER 0xFF534D42/* the first four bytes of SMB PDUs */
 
 #ifdef CONFIG_CIFS_QUOTA
 static struct quotactl_ops cifs_quotactl_ops;
@@ -572,10 +572,16 @@
/* some applications poll for the file length in this strange
   way so we must seek to end on non-oplocked files by
   setting the revalidate time to zero */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 19)
if(file->f_path.dentry->d_inode)
CIFS_I(file->f_path.dentry->d_inode)->time = 0;
 
retval = cifs_revalidate(file->f_path.dentry);
+#else
+   if(file->f_dentry->d_inode)
+   CIFS_I(file->f_dentry->d_inode)->time = 0;
+   retval = cifs_revalidate(file->f_dentry);
+#endif
if (retval < 0)
return (loff_t)retval;
}



svn commit: linux-cifs-client r98 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-02-06 Thread sfrench
Author: sfrench
Date: 2007-02-07 07:12:17 + (Wed, 07 Feb 2007)
New Revision: 98

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=98

Log:
cifs client with ifdefs for backlevel kernels now basically up to date
although still missing a few minor things from mainline cifs that 
would be necessary for successful compiling on 2.6.20

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/cifs_debug.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/misc.c
   branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
   branches/linux-converged-for-old-kernels/fs/cifs/sess.c
   branches/linux-converged-for-old-kernels/fs/cifs/smbdes.c
   branches/linux-converged-for-old-kernels/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (667 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=98


svn commit: samba r21204 - in branches/SAMBA_3_0/source/include: .

2007-02-06 Thread sfrench
Author: sfrench
Date: 2007-02-06 23:25:02 + (Tue, 06 Feb 2007)
New Revision: 21204

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21204

Log:
Add define for new QFS Info for "who am i"

Modified:
   branches/SAMBA_3_0/source/include/trans2.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/trans2.h
===
--- branches/SAMBA_3_0/source/include/trans2.h  2007-02-06 23:02:27 UTC (rev 
21203)
+++ branches/SAMBA_3_0/source/include/trans2.h  2007-02-06 23:25:02 UTC (rev 
21204)
@@ -507,6 +507,21 @@
(NB statfs field flags can come from FILE_SYSTEM_DEVICE_INFO call)  
 */
 
+#define SMB_QUERY_POSIX_WHO_AM_I  0x202 /* QFS Info */
+/* returns:
+__u32 flags;  0 = Authenticated user 1 = GUEST 
+__u32 mask;  which flags bits server understands ie 0x0001 
+__u64 unix_user_id;
+__u64 unix_user_gid;
+__u32 number_of_supplementary_gids;  may be zero 
+__u32 number_of_sids;  may be zero
+__u32 length_of_sid_array;  in bytes - may be zero 
+__u32 pad;  reserved - MBZ 
+__u64 gid_array[0];  may be empty 
+__u8 * psid_list  may be empty
+*/
+
+
 /* ... more as we think of them :-). */
 
 /* SMB POSIX ACL definitions. */



svn commit: linux-cifs-client r97 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-02-05 Thread sfrench
Author: sfrench
Date: 2007-02-06 04:09:38 + (Tue, 06 Feb 2007)
New Revision: 97

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=97

Log:
Merge with cifs backport-for old kernels - getting closer

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
===
--- branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2007-02-06 
03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2007-02-06 
04:09:38 UTC (rev 97)
@@ -5,7 +5,8 @@
 EINVAL on readdir when filldir fails due to overwritten blocksize
 (fixes FC problem).  Return error in rename 2nd attempt retry (ie report
 if rename by handle also fails, after rename by path fails, we were
-not reporting whether the retry worked or not).
+not reporting whether the retry worked or not). Fix NTLMv2 to
+work to Windows servers (mount with option "sec=ntlmv2").
 
 Version 1.45
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c  
2007-02-06 03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c  
2007-02-06 04:09:38 UTC (rev 97)
@@ -372,8 +372,10 @@
buf->time = cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
get_random_bytes(&buf->client_chal, sizeof(buf->client_chal));
buf->reserved2 = 0;
-   buf->names[0].type = 0;
+   buf->names[0].type = cpu_to_le16(NTLMSSP_DOMAIN_TYPE);
buf->names[0].length = 0;
+   buf->names[1].type = 0;
+   buf->names[1].length = 0;
 
/* calculate buf->ntlmv2_hash */
rc = calc_ntlmv2_hash(ses, nls_cp);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h 2007-02-06 
03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h 2007-02-06 
04:09:38 UTC (rev 97)
@@ -69,6 +69,14 @@
 #define XATTR_DOS_ATTRIB "user.DOSATTRIB"
 #endif
 
+#ifndef SLAB_NOFS
+#define SLAB_NOFS GFP_NOFS
+#endif
+
+#ifndef SLAB_KERNEL
+#define SLAB_KERNEL GFP_KERNEL
+#endif
+
 /*
  * This information is kept on every Server we know about.
  *

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h  2007-02-06 
03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h  2007-02-06 
04:09:38 UTC (rev 97)
@@ -589,6 +589,12 @@
 
 /* format of NLTMv2 Response ie "case sensitive password" hash when NTLMv2 */
 
+#define NTLMSSP_SERVER_TYPE1
+#define NTLMSSP_DOMAIN_TYPE2
+#define NTLMSSP_FQ_DOMAIN_TYPE 3
+#define NTLMSSP_DNS_DOMAIN_TYPE4
+#define NTLMSSP_DNS_PARENT_TYPE5
+
 struct ntlmssp2_name {
__le16 type;
__le16 length;
@@ -602,7 +608,7 @@
__le64  time;
__u64  client_chal; /* random */
__u32  reserved2;
-   struct ntlmssp2_name names[1];
+   struct ntlmssp2_name names[2];
/* array of name entries could follow ending in minimum 4 byte struct */
 } __attribute__((packed));
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/inode.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/inode.c2007-02-06 
03:20:54 UTC (rev 96)
+++ branches/linux-converged-for-old-kernels/fs/cifs/inode.c2007-02-06 
04:09:38 UTC (rev 97)
@@ -164,9 +164,9 @@
 
if (num_of_bytes < end_of_file)
cFYI(1, ("allocation size less than end of file"));
-   cFYI(1,
-("Size %ld and blocks %ld",
- (unsigned long) inode->i_size, inode->i_blocks));
+   cFYI(1, ("Size %ld and blocks %llu",
+   (unsigned long) inode->i_size,
+   (unsigned long long)inode->i_blocks));
if (S_ISREG(inode->i_mode)) {
cFYI(1, ("File inode"));
inode->i_op = &cifs_file_inode_ops;

Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
===

svn commit: linux-cifs-client r96 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-02-05 Thread sfrench
Author: sfrench
Date: 2007-02-06 03:20:54 + (Tue, 06 Feb 2007)
New Revision: 96

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=96

Log:
merge with cifs for backlevel kernels git
Now current with mainline fixes up to early December

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/link.c
   branches/linux-converged-for-old-kernels/fs/cifs/sess.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
===
--- branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2007-02-06 
03:00:26 UTC (rev 95)
+++ branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2007-02-06 
03:20:54 UTC (rev 96)
@@ -3,7 +3,9 @@
 Support deep tree mounts.  Better support OS/2, Win9x (DOS) time stamps.
 Allow null user to be specified on mount ("username="). Do not return
 EINVAL on readdir when filldir fails due to overwritten blocksize
-(fixes FC problem)
+(fixes FC problem).  Return error in rename 2nd attempt retry (ie report
+if rename by handle also fails, after rename by path fails, we were
+not reporting whether the retry worked or not).
 
 Version 1.45
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/file.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-06 
03:00:26 UTC (rev 95)
+++ branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-06 
03:20:54 UTC (rev 96)
@@ -518,10 +518,14 @@
the struct would be in each open file,
but this should give enough time to 
clear the socket */
-   cERROR(1,("close with pending writes"));
+#ifdef CONFIG_CIFS_DEBUG2
+   cFYI(1,("close delay, write pending"));
+#endif /* DEBUG2 */
msleep(timeout);
timeout *= 4;
-   } 
+   }
+   if(atomic_read(&pSMBFile->wrtPending))
+   cERROR(1,("close with pending writes"));
rc = CIFSSMBClose(xid, pTcon,
  pSMBFile->netfid);
}

Modified: branches/linux-converged-for-old-kernels/fs/cifs/inode.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/inode.c2007-02-06 
03:00:26 UTC (rev 95)
+++ branches/linux-converged-for-old-kernels/fs/cifs/inode.c2007-02-06 
03:20:54 UTC (rev 96)
@@ -321,6 +321,7 @@
struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
char *tmp_path;
char *buf = NULL;
+   int adjustTZ = FALSE;
 
pTcon = cifs_sb->tcon;
cFYI(1,("Getting info on %s", search_path));
@@ -351,6 +352,7 @@
pfindData, cifs_sb->local_nls, 
cifs_sb->mnt_cifs_flags &
  CIFS_MOUNT_MAP_SPECIAL_CHR);
+   adjustTZ = TRUE;
}

}
@@ -447,6 +449,10 @@
inode->i_ctime =
cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime));
cFYI(0, ("Attributes came in as 0x%x", attr));
+   if(adjustTZ && (pTcon->ses) && (pTcon->ses->server)) {
+   inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj;
+   inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj;
+   }
 
/* set default mode. will override for dirs below */
if (atomic_read(&cifsInfo->inUse) == 0)
@@ -889,10 +895,14 @@
kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL);
if (info_buf_source != NULL) {
info_buf_target = info_buf_source + 1;
-   rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName,
-   info_buf_source, cifs_sb_source->local_nls, 
-   cifs_sb_source->mnt_cifs_flags &
-   CIFS_MOUNT_MAP_SPECIAL_CHR);
+   if (pTcon->ses->capabilities & CAP_UNIX)
+   rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName,
+ 

svn commit: linux-cifs-client r95 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2007-02-05 Thread sfrench
Author: sfrench
Date: 2007-02-06 03:00:26 + (Tue, 06 Feb 2007)
New Revision: 95

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=95

Log:
Merge with git tree.
Now current to November 1st mainline patches and earlier
and should build on somewhat newer (2.6.17 and 2.6.18) not just
older 2.6 kernels

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/misc.c
   branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Sorry, the patch is too large (682 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=95


svn commit: linux-cifs-client r94 - in branches/linux-2.6-mainline/fs/cifs: .

2007-01-30 Thread sfrench
Author: sfrench
Date: 2007-01-31 00:27:33 + (Wed, 31 Jan 2007)
New Revision: 94

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=94

Log:
Files missing from this branch (cifsacl.h and sess.c) - they were
already in the other branch but had not been added to the branch
representing the mainline kernel version of cifs vfs.

Added:
   branches/linux-2.6-mainline/fs/cifs/cifsacl.h
   branches/linux-2.6-mainline/fs/cifs/sess.c


Changeset:
Sorry, the patch is too large (594 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=94


svn commit: linux-cifs-client r93 - in branches: linux-2.6-cifs-git-devel/fs/cifs linux-2.6-mainline/fs/cifs

2007-01-24 Thread sfrench
Author: sfrench
Date: 2007-01-25 05:04:14 + (Thu, 25 Jan 2007)
New Revision: 93

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=93

Log:
merge cifs 1.47 from mainline from cifs to svn

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/README
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_debug.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsencrypt.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/fcntl.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/ioctl.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/link.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/misc.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/netmisc.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/sess.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c
   branches/linux-2.6-mainline/fs/cifs/CHANGES
   branches/linux-2.6-mainline/fs/cifs/README
   branches/linux-2.6-mainline/fs/cifs/cifs_debug.c
   branches/linux-2.6-mainline/fs/cifs/cifsencrypt.c
   branches/linux-2.6-mainline/fs/cifs/cifsfs.c
   branches/linux-2.6-mainline/fs/cifs/cifsfs.h
   branches/linux-2.6-mainline/fs/cifs/cifsglob.h
   branches/linux-2.6-mainline/fs/cifs/cifspdu.h
   branches/linux-2.6-mainline/fs/cifs/cifsproto.h
   branches/linux-2.6-mainline/fs/cifs/cifssmb.c
   branches/linux-2.6-mainline/fs/cifs/connect.c
   branches/linux-2.6-mainline/fs/cifs/fcntl.c
   branches/linux-2.6-mainline/fs/cifs/file.c
   branches/linux-2.6-mainline/fs/cifs/inode.c
   branches/linux-2.6-mainline/fs/cifs/ioctl.c
   branches/linux-2.6-mainline/fs/cifs/link.c
   branches/linux-2.6-mainline/fs/cifs/misc.c
   branches/linux-2.6-mainline/fs/cifs/netmisc.c
   branches/linux-2.6-mainline/fs/cifs/readdir.c
   branches/linux-2.6-mainline/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (3813 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=93


svn commit: samba-web r1051 - in trunk: .

2006-10-27 Thread sfrench
Author: sfrench
Date: 2006-10-27 19:10:16 + (Fri, 27 Oct 2006)
New Revision: 1051

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1051

Log:
Refer to correct project page

Modified:
   trunk/ecryptfs.html


Changeset:
Modified: trunk/ecryptfs.html
===
--- trunk/ecryptfs.html 2006-10-27 18:00:16 UTC (rev 1050)
+++ trunk/ecryptfs.html 2006-10-27 19:10:16 UTC (rev 1051)
@@ -1,63 +1,11 @@
 
 
-Linux CIFS Client
+Enterprise-class Cryptographic Filesystem for Linux
 
-
 
 
 
 
  
-LATEST UPDATES - initial posting
-
-  
-  
-  
-
-  
-  
-  eCryptFS - 
-  
-  
-  Enterprise Cryptographic Virtual File System for Linux 
-  
-  
-
-
-  
-  http://us1.samba.org/samba/images/penguin.gif"; 
src="samba/images/penguin.gif">
-  mailto:[EMAIL PROTECTED]">Questions to developers
-  Documentation
-http://broken";>Installation 
-http://broken";>Todo/Bug 
-list 
-http://broken";>Authors/Thanks 
-http://www.finux.org/Reprints/Reprint-Halcrow-OLS2004.pdf";>Linux 
Cryptographic Filesystems Paper
-  
-  Downloads
-  
-http://broken";>Latest 2.6 Release (gz)
-http://ecrypts.bkbits.net/";>Most current 2.6 source at 
ecryptfs.bkbits.net (requires installation of
-BitKeeper)
-  
-  
-  
-  The eCrypt file system module for Linux allows  eCrypt fs has been
-  tested with Linux version ... The eCrypt fs is designed for Linux version
-  2.6 or later and is not supported on Linux 2.4 kernels.
-   
-  The current 2.6 version of the eCrypt VFS is ??? which was released in
-  November , ??? 2004.eCrypts VFS is licensed under the http://www.gnu.org/copyleft/gpl.html";>GNU General Public 
License 
-  version 2 or later. 
-  
-
-
-  
-  Thanks to the IBM Linux Technology Center (and to Erez 
Zadok and the FiST
-  team for helpful infrastructure and ideas)
-  
-
-  
-
+LATEST UPDATES - ecryptfs is in 2.6.19 (and later) Linux Kernels.   See the 
project page at http://ecryptfs.sourceforge.net/
 



svn commit: linux-cifs-client r92 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-02 06:05:44 + (Mon, 02 Oct 2006)
New Revision: 92

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=92

Log:
Merge latest fix from GK

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-10-02 
06:04:39 UTC (rev 91)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-10-02 
06:05:44 UTC (rev 92)
@@ -97,10 +97,10 @@
 extern struct inode_operations cifs_symlink_inode_ops;
 
 /* Functions related to files and directories */
-extern struct file_operations cifs_file_ops;
-extern struct file_operations cifs_file_direct_ops; /* if directio mount */
-extern struct file_operations cifs_file_nobrl_ops;
-extern struct file_operations cifs_file_direct_nobrl_ops; /* if directio mount 
*/
+extern const struct file_operations cifs_file_ops;
+extern const struct file_operations cifs_file_direct_ops; /* if directio mount 
*/
+extern const struct file_operations cifs_file_nobrl_ops;
+extern const struct file_operations cifs_file_direct_nobrl_ops; /* if directio 
mount */
 extern int cifs_open(struct inode *inode, struct file *file);
 extern int cifs_close(struct inode *inode, struct file *file);
 extern int cifs_closedir(struct inode *inode, struct file *file);
@@ -112,7 +112,7 @@
 extern int cifs_fsync(struct file *, struct dentry *, int);
 extern int cifs_flush(struct file *);
 extern int cifs_file_mmap(struct file * , struct vm_area_struct *);
-extern struct file_operations cifs_dir_ops;
+extern const struct file_operations cifs_dir_ops;
 extern int cifs_dir_open(struct inode *inode, struct file *file);
 extern int cifs_readdir(struct file *file, void *direntry, filldir_t filldir);
 extern int cifs_dir_notify(struct file *, unsigned long arg);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h  2006-10-02 
06:04:39 UTC (rev 91)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h  2006-10-02 
06:05:44 UTC (rev 92)
@@ -418,6 +418,8 @@
 
 /* Dialect index is 13 for LANMAN */
 
+#define MIN_TZ_ADJ (15 * 60) /* minimum grid for timezones in seconds */
+
 typedef struct lanman_neg_rsp {
struct smb_hdr hdr; /* wct = 13 */
__le16 DialectIndex;
@@ -687,7 +689,7 @@
 typedef struct smb_com_close_req {
struct smb_hdr hdr; /* wct = 3 */
__u16 FileID;
-   __u32 LastWriteTime;/* should be zero */
+   __u32 LastWriteTime;/* should be zero or -1 */
__u16 ByteCount;/* 0 */
 } __attribute__((packed)) CLOSE_REQ;
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c  2006-10-02 
06:04:39 UTC (rev 91)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c  2006-10-02 
06:05:44 UTC (rev 92)
@@ -477,7 +477,7 @@
} else if((pSMBr->hdr.WordCount == 13)
&& ((pSMBr->DialectIndex == LANMAN_PROT)
|| (pSMBr->DialectIndex == LANMAN2_PROT))) {
-   int tmp, adjust;
+   __s16 tmp;
struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr;
 
if((secFlags & CIFSSEC_MAY_LANMAN) || 
@@ -503,14 +503,16 @@
server->maxRw = 0;/* we do not need to use raw anyway */
server->capabilities = CAP_MPX_MODE;
}
-   tmp = le16_to_cpu(rsp->ServerTimeZone);
-   if (tmp == (int)0x) {
+   tmp = (__s16)le16_to_cpu(rsp->ServerTimeZone);
+   if (tmp == -1) {
/* OS/2 often does not set timezone therefore
 * we must use server time to calc time zone.
-* Could deviate slightly from the right zone. Not easy
-* to adjust, since timezones are not always a multiple
-* of 60 (sometimes 30 minutes - are there smaller?)
+* Could deviate slightly from the right zone.
+* Smallest defined timezone difference is 15 minutes
+* (i.e. Nepal).  Rounding up/down is done to match
+* this requirement.
 */
+   int val, seconds, remain, result;
struct timespec ts, utc;
utc = CURRENT_TIME;
  

svn commit: linux-cifs-client r91 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-02 06:04:39 + (Mon, 02 Oct 2006)
New Revision: 91

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=91

Log:
Merge latest fix from GK

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h 2006-10-01 19:58:24 UTC 
(rev 90)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h 2006-10-02 06:04:39 UTC 
(rev 91)
@@ -409,6 +409,8 @@
 
 /* Dialect index is 13 for LANMAN */
 
+#define MIN_TZ_ADJ (15 * 60) /* minimum grid for timezones in seconds */
+
 typedef struct lanman_neg_rsp {
struct smb_hdr hdr; /* wct = 13 */
__le16 DialectIndex;
@@ -678,7 +680,7 @@
 typedef struct smb_com_close_req {
struct smb_hdr hdr; /* wct = 3 */
__u16 FileID;
-   __u32 LastWriteTime;/* should be zero */
+   __u32 LastWriteTime;/* should be zero or -1 */
__u16 ByteCount;/* 0 */
 } __attribute__((packed)) CLOSE_REQ;
 

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-10-01 19:58:24 UTC 
(rev 90)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-10-02 06:04:39 UTC 
(rev 91)
@@ -450,7 +450,7 @@
} else if((pSMBr->hdr.WordCount == 13)
&& ((pSMBr->DialectIndex == LANMAN_PROT)
|| (pSMBr->DialectIndex == LANMAN2_PROT))) {
-   int tmp, adjust;
+   __s16 tmp;
struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr;
 
if((secFlags & CIFSSEC_MAY_LANMAN) || 
@@ -476,14 +476,16 @@
server->maxRw = 0;/* we do not need to use raw anyway */
server->capabilities = CAP_MPX_MODE;
}
-   tmp = le16_to_cpu(rsp->ServerTimeZone);
-   if (tmp == (int)0x) {
+   tmp = (__s16)le16_to_cpu(rsp->ServerTimeZone);
+   if (tmp == -1) {
/* OS/2 often does not set timezone therefore
 * we must use server time to calc time zone.
-* Could deviate slightly from the right zone. Not easy
-* to adjust, since timezones are not always a multiple
-* of 60 (sometimes 30 minutes - are there smaller?)
+* Could deviate slightly from the right zone.
+* Smallest defined timezone difference is 15 minutes
+* (i.e. Nepal).  Rounding up/down is done to match
+* this requirement.
 */
+   int val, seconds, remain, result;
struct timespec ts, utc;
utc = CURRENT_TIME;
ts = cnvrtDosUnixTm(le16_to_cpu(rsp->SrvTime.Date),
@@ -491,12 +493,18 @@
cFYI(1,("SrvTime: %d sec since 1970 (utc: %d) diff: %d",
(int)ts.tv_sec, (int)utc.tv_sec, 
(int)(utc.tv_sec - ts.tv_sec)));
-   tmp = (int)(utc.tv_sec - ts.tv_sec);
-   adjust = tmp < 0 ? -29 : 29;
-   tmp = ((tmp + adjust) / 60) * 60;
-   server->timeAdj = tmp;
+   val = (int)(utc.tv_sec - ts.tv_sec);
+   seconds = val < 0 ? -val : val;
+   result = (seconds / MIN_TZ_ADJ) * MIN_TZ_ADJ;
+   remain = seconds % MIN_TZ_ADJ;
+   if(remain >= (MIN_TZ_ADJ / 2))
+   result += MIN_TZ_ADJ;
+   if(val < 0)
+   result = - result;
+   server->timeAdj = result;
} else {
-   server->timeAdj = tmp * 60; /* also in seconds */
+   server->timeAdj = (int)tmp;
+   server->timeAdj *= 60; /* also in seconds */
}
cFYI(1,("server->timeAdj: %d seconds", server->timeAdj));
 
@@ -559,7 +567,8 @@
cFYI(0, ("Max buf = %d", ses->server->maxBuf));
GETU32(ses->server->sessid) = le32_to_cpu(pSMBr->SessionKey);
server->capabilities = le32_to_cpu(pSMBr->Capabilities);
-   server->timeAdj = le16_to_cpu(pSMBr->ServerTimeZone) * 60;  
+   server->timeAdj = (int)(__s16)le16_to_cpu(pSMBr->ServerTimeZone);
+   server->t

svn commit: linux-cifs-client r90 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-01 19:58:24 + (Sun, 01 Oct 2006)
New Revision: 90

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=90

Log:
Make FindNext work to os/2 (fill in resume key properly)

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c 2006-10-01 19:57:43 UTC 
(rev 89)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c 2006-10-01 19:58:24 UTC 
(rev 90)
@@ -946,6 +946,7 @@
filename = &pFindData->FileName[0];
/* one byte length, no name conversion */
len = (unsigned int)pFindData->FileNameLength;
+   cifsFile->srch_inf.resume_key = pFindData->ResumeKey;
} else {
cFYI(1,("Unknown findfirst level %d",level));
return -EINVAL;



svn commit: linux-cifs-client r89 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-01 19:57:43 + (Sun, 01 Oct 2006)
New Revision: 89

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=89

Log:
Make search resume work to os2

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/readdir.c  2006-10-01 
19:55:14 UTC (rev 88)
+++ branches/linux-converged-for-old-kernels/fs/cifs/readdir.c  2006-10-01 
19:57:43 UTC (rev 89)
@@ -954,6 +954,7 @@
filename = &pFindData->FileName[0];
/* one byte length, no name conversion */
len = (unsigned int)pFindData->FileNameLength;
+   cifsFile->srch_inf.resume_key = pFindData->ResumeKey;
} else {
cFYI(1,("Unknown findfirst level %d",level));
return -EINVAL;



svn commit: linux-cifs-client r88 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-01 19:55:14 + (Sun, 01 Oct 2006)
New Revision: 88

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=88

Log:
address space ops do have to be const after all

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-10-01 
19:28:30 UTC (rev 87)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-10-01 
19:55:14 UTC (rev 88)
@@ -61,8 +61,8 @@
 #endif
 #endif
 
-extern struct address_space_operations cifs_addr_ops;
-extern struct address_space_operations cifs_addr_ops_smallbuf;
+extern const struct address_space_operations cifs_addr_ops;
+extern const struct address_space_operations cifs_addr_ops_smallbuf;
 
 /* Functions related to super block operations */
 extern struct super_operations cifs_super_ops;



svn commit: linux-cifs-client r87 - in branches: linux-2.6-cifs-git-devel/fs/cifs linux-converged-for-old-kernels/fs/cifs

2006-10-01 Thread sfrench
Author: sfrench
Date: 2006-10-01 19:28:30 + (Sun, 01 Oct 2006)
New Revision: 87

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=87

Log:
merge with git

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsglob.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/cifs_fs_sb.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c
   branches/linux-converged-for-old-kernels/fs/cifs/dir.c
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/link.c
   branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
   branches/linux-converged-for-old-kernels/fs/cifs/sess.c
   branches/linux-converged-for-old-kernels/fs/cifs/xattr.c


Changeset:
Sorry, the patch is too large (876 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=87


svn commit: linux-cifs-client r86 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-09-30 Thread sfrench
Author: sfrench
Date: 2006-10-01 02:42:30 + (Sun, 01 Oct 2006)
New Revision: 86

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=86

Log:
Missing file

Added:
   branches/linux-2.6-cifs-git-devel/fs/cifs/sess.c


Changeset:
Sorry, the patch is too large (544 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=86


svn commit: linux-cifs-client r85 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-09-29 Thread sfrench
Author: sfrench
Date: 2006-09-30 04:15:27 + (Sat, 30 Sep 2006)
New Revision: 85

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=85

Log:
merge with cifs-2.6 git (includes better legacy server support)

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifs_fs_sb.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsacl.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsencrypt.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsglob.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/link.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/md5.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/md5.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/misc.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/netmisc.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/smbdes.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/smbencrypt.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/xattr.c


Changeset:
Sorry, the patch is too large (1093 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=85


svn commit: linux-cifs-client r84 - in branches/linux-2.6-mainline/fs/cifs: .

2006-09-29 Thread sfrench
Author: sfrench
Date: 2006-09-30 01:11:03 + (Sat, 30 Sep 2006)
New Revision: 84

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=84

Log:
sync with mainline

Modified:
   branches/linux-2.6-mainline/fs/cifs/CHANGES
   branches/linux-2.6-mainline/fs/cifs/Makefile
   branches/linux-2.6-mainline/fs/cifs/README
   branches/linux-2.6-mainline/fs/cifs/asn1.c
   branches/linux-2.6-mainline/fs/cifs/cifs_debug.c
   branches/linux-2.6-mainline/fs/cifs/cifs_debug.h
   branches/linux-2.6-mainline/fs/cifs/cifs_fs_sb.h
   branches/linux-2.6-mainline/fs/cifs/cifs_unicode.c
   branches/linux-2.6-mainline/fs/cifs/cifsencrypt.c
   branches/linux-2.6-mainline/fs/cifs/cifsencrypt.h
   branches/linux-2.6-mainline/fs/cifs/cifsfs.c
   branches/linux-2.6-mainline/fs/cifs/cifsfs.h
   branches/linux-2.6-mainline/fs/cifs/cifsglob.h
   branches/linux-2.6-mainline/fs/cifs/cifspdu.h
   branches/linux-2.6-mainline/fs/cifs/cifsproto.h
   branches/linux-2.6-mainline/fs/cifs/cifssmb.c
   branches/linux-2.6-mainline/fs/cifs/connect.c
   branches/linux-2.6-mainline/fs/cifs/dir.c
   branches/linux-2.6-mainline/fs/cifs/fcntl.c
   branches/linux-2.6-mainline/fs/cifs/file.c
   branches/linux-2.6-mainline/fs/cifs/inode.c
   branches/linux-2.6-mainline/fs/cifs/link.c
   branches/linux-2.6-mainline/fs/cifs/md5.c
   branches/linux-2.6-mainline/fs/cifs/md5.h
   branches/linux-2.6-mainline/fs/cifs/misc.c
   branches/linux-2.6-mainline/fs/cifs/netmisc.c
   branches/linux-2.6-mainline/fs/cifs/ntlmssp.h
   branches/linux-2.6-mainline/fs/cifs/readdir.c
   branches/linux-2.6-mainline/fs/cifs/smbdes.c
   branches/linux-2.6-mainline/fs/cifs/smbencrypt.c
   branches/linux-2.6-mainline/fs/cifs/smberr.h
   branches/linux-2.6-mainline/fs/cifs/transport.c
   branches/linux-2.6-mainline/fs/cifs/xattr.c


Changeset:
Sorry, the patch is too large (6899 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=84


svn commit: samba-web r1046 - in trunk: .

2006-09-27 Thread sfrench
Author: sfrench
Date: 2006-09-27 22:57:36 + (Wed, 27 Sep 2006)
New Revision: 1046

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1046

Log:
Update title of CIFS POSIX web page

Modified:
   trunk/CIFS_POSIX_extensions.html


Changeset:
Modified: trunk/CIFS_POSIX_extensions.html
===
--- trunk/CIFS_POSIX_extensions.html2006-09-27 18:18:46 UTC (rev 1045)
+++ trunk/CIFS_POSIX_extensions.html2006-09-27 22:57:36 UTC (rev 1046)
@@ -1,7 +1,7 @@
 
 
 
-Linux CIFS Client
+CIFS POSIX Protocol/TITLE>
 
 
 



svn commit: samba-web r1045 - in trunk: .

2006-09-27 Thread sfrench
Author: sfrench
Date: 2006-09-27 18:18:46 + (Wed, 27 Sep 2006)
New Revision: 1045

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1045

Log:
update CIFS POSIX protocol web page

Modified:
   trunk/CIFS_POSIX_extensions.html


Changeset:
Modified: trunk/CIFS_POSIX_extensions.html
===
--- trunk/CIFS_POSIX_extensions.html2006-09-26 18:19:39 UTC (rev 1044)
+++ trunk/CIFS_POSIX_extensions.html2006-09-27 18:18:46 UTC (rev 1045)
@@ -29,12 +29,12 @@
   
   http://us1.samba.org/samba/images/cifs-rail.jpg"; 
src="samba/images/cifs-rail.jpg">
http://en.wikipedia.org/wiki/CIFS";>What is the CIFS 
Protocol?
-  mailto:[EMAIL PROTECTED]@us.ibm.com">Questions to 
developers 
+  mailto:[EMAIL PROTECTED]@us.ibm.com">Questions to 
developers 
   
 ftp://ftp.microsoft.com/developr/drg/cifs/";> Older 
Specifications
http://ubiqx.org/cifs/References.html";>Miscellaneous 
references to SMB/CIFS and loosely related protocols
-   Presentations
+   http://samba.org/samba/ftp/cifs-cvs/snia-developer-2006-cifs-extensions.pdf";>Presentations
 http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf";>SNIA 
 CIFS Specification 
http://www.ietf.org/internet-drafts/draft-crhertel-smb-url-11.txt";>SMB 
URL Specification 
@@ -50,22 +50,22 @@
   extensions are already implemented in multiple clients and servers.
   
    
-  
30 Second History of the SMB/CIFS Protocol

1984 Initial SMB Specification Published by IBM based on the work 
of Dr. Bary Feigenbaum and team
1985-1992 SMB Protocol extended by IBM, 3Com, Intel and Microsoft, 
and becomes the default filesystem protocol for DOS, OS/2 and Windows operating 
systems among others.
1992 X/Open publishes an updated version of the SMB standard: 
Protocols for X/Open PC Interworking: SMB Version 2 (CAE 209)
1994-1995 IBM Extends SMB to include support for DCE/Kerberos
-   1996 With the slow speed of HTTP for certain workloads, two key 
network filesystem protocols begin to become more "internet friendly." Sun 
announces WebNFS and Microsoft extends and renames SMB (announcing CIFS - "The 
Common Internet File System Protocol."  More formal documentation is developed 
describing the complex SMB/CIFS protocol in detail.
-   1996-2006 Annual CIFS Deveper Conferences are held to improve on 
interoperability.
+   1996 With the slow speed of HTTP for certain workloads, two key 
network filesystem protocols begin to become more "internet friendly." Sun 
announces WebNFS and Microsoft extends and renames SMB (announcing CIFS - "The 
Common Internet File System Protocol").  More formal CIFS documentation is 
written describing the complex SMB/CIFS protocol in detail.
+   1996-2006 Annual CIFS Deveper Conferences are held to improve 
interoperability.
1999-2001 SCO and HP add/document optional Unix Extensions to CIFS 
Protocol, Thursby adds/documents optional Macintosh extensions.
2002 After multiyear effort involving many companies including 
Microsoft, IBM and NetApp, The Storage Network Industry Association releases 
the SNIA CIFS Technical Reference (which also includes Unix and Mac protocol 
extensions for CIFS)
2003 NFSv4 (RFC 3530) released borrowing many ideas from CIFS
2004 Work begins on an improved set of extensions to the CIFS 
Protocol for better support of POSIX clients.
2006 Samba client and server and Linux client implement CIFS POSIX 
Extensions

-   
+   
+  
 
 
   



svn commit: samba-web r1044 - in trunk: .

2006-09-26 Thread sfrench
Author: sfrench
Date: 2006-09-26 18:19:39 + (Tue, 26 Sep 2006)
New Revision: 1044

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1044

Log:
update CIFS POSIX Extensions web page

Modified:
   trunk/CIFS_POSIX_extensions.html


Changeset:
Modified: trunk/CIFS_POSIX_extensions.html
===
--- trunk/CIFS_POSIX_extensions.html2006-09-26 16:05:24 UTC (rev 1043)
+++ trunk/CIFS_POSIX_extensions.html2006-09-26 18:19:39 UTC (rev 1044)
@@ -20,23 +20,25 @@
   CIFS VFS - 
   
   
-  Protocol extensions to the Common Internet File System for better 
POSIX file i/o semantics
+  Protocol extensions to the Common Internet File System for better 
POSIX file I/O semantics
    
   
   
 
 
   
-  http://us1.samba.org/samba/images/penguin.gif"; 
src="samba/images/penguin.gif">
+  http://us1.samba.org/samba/images/cifs-rail.jpg"; 
src="samba/images/cifs-rail.jpg">
+   http://en.wikipedia.org/wiki/CIFS";>What is the CIFS 
Protocol?
   mailto:[EMAIL PROTECTED]@us.ibm.com">Questions to 
developers 
   
-https://bugzilla.samba.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=CifsVFS&content=";>Search
 for open bugs in bugzilla 
-Older Specifications
+ftp://ftp.microsoft.com/developr/drg/cifs/";> Older 
Specifications
+   http://ubiqx.org/cifs/References.html";>Miscellaneous 
references to SMB/CIFS and loosely related protocols
Presentations
 http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf";>SNIA 
 CIFS Specification 
-
href="http://oss.software.ibm.com/developer/opensource/linux/presentations/samba/ut_cifs.pdf";>r
+   http://www.ietf.org/internet-drafts/draft-crhertel-smb-url-11.txt";>SMB 
URL Specification 
+   http://www.ubiqx.org/cifs/";>Implementing CIFS (Online 
Book) 
   
   
   
@@ -44,11 +46,26 @@
   operating systems to better interoperate with CIFS servers 
   and storage appliances by extending the SNIA CIFS Specification version
   1.0.    Popular servers such as Samba, Windows
-  2000, Windows XP and many others support CIFS by default.   
These
+  2000, Windows XP and many others support CIFS by default.  These
   extensions are already implemented in multiple clients and servers.
   
    
   
+   30 Second History of the SMB/CIFS Protocol
+   
+   1984 Initial SMB Specification Published by IBM based on the work 
of Dr. Bary Feigenbaum and team
+   1985-1992 SMB Protocol extended by IBM, 3Com, Intel and Microsoft, 
and becomes the default filesystem protocol for DOS, OS/2 and Windows operating 
systems among others.
+   1992 X/Open publishes an updated version of the SMB standard: 
Protocols for X/Open PC Interworking: SMB Version 2 (CAE 209)
+   1994-1995 IBM Extends SMB to include support for DCE/Kerberos
+   1996 With the slow speed of HTTP for certain workloads, two key 
network filesystem protocols begin to become more "internet friendly." Sun 
announces WebNFS and Microsoft extends and renames SMB (announcing CIFS - "The 
Common Internet File System Protocol."  More formal documentation is developed 
describing the complex SMB/CIFS protocol in detail.
+   1996-2006 Annual CIFS Deveper Conferences are held to improve on 
interoperability.
+   1999-2001 SCO and HP add/document optional Unix Extensions to CIFS 
Protocol, Thursby adds/documents optional Macintosh extensions.
+   2002 After multiyear effort involving many companies including 
Microsoft, IBM and NetApp, The Storage Network Industry Association releases 
the SNIA CIFS Technical Reference (which also includes Unix and Mac protocol 
extensions for CIFS)
+   2003 NFSv4 (RFC 3530) released borrowing many ideas from CIFS
+   2004 Work begins on an improved set of extensions to the CIFS 
Protocol for better support of POSIX clients.
+   2006 Samba client and server and Linux client implement CIFS POSIX 
Extensions
+   
+   
 
 
   



svn commit: samba-web r1043 - in trunk/images: .

2006-09-26 Thread sfrench
Author: sfrench
Date: 2006-09-26 16:05:24 + (Tue, 26 Sep 2006)
New Revision: 1043

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1043

Log:
Add small image for cifs web page

Added:
   trunk/images/cifs-rail.jpg


Changeset:
Added: trunk/images/cifs-rail.jpg
===
(Binary files differ)


Property changes on: trunk/images/cifs-rail.jpg
___
Name: svn:mime-type
   + application/octet-stream



svn commit: samba-web r1041 - in trunk: .

2006-09-23 Thread sfrench
Author: sfrench
Date: 2006-09-24 04:13:50 + (Sun, 24 Sep 2006)
New Revision: 1041

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1041

Log:
Check in scratch version of CIFS POSIX Extensions protocol reference page

Added:
   trunk/CIFS_POSIX_extensions.html


Changeset:
Added: trunk/CIFS_POSIX_extensions.html
===
--- trunk/CIFS_POSIX_extensions.html2006-09-22 18:19:54 UTC (rev 1040)
+++ trunk/CIFS_POSIX_extensions.html2006-09-24 04:13:50 UTC (rev 1041)
@@ -0,0 +1,63 @@
+
+
+
+Linux CIFS Client
+
+
+
+
+
+
+ 
+LATEST UPDATES - CIFS POSIX Extensions presented at the 2006 Storage 
Developer Conference hosted by SNIA.
+
+  
+  
+  
+
+  
+  
+  CIFS VFS - 
+  
+  
+  Protocol extensions to the Common Internet File System for better 
POSIX file i/o semantics
+   
+  
+  
+
+
+  
+  http://us1.samba.org/samba/images/penguin.gif"; 
src="samba/images/penguin.gif">
+  mailto:[EMAIL PROTECTED]@us.ibm.com">Questions to 
developers 
+  
+https://bugzilla.samba.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=CifsVFS&content=";>Search
 for open bugs in bugzilla 
+Older Specifications
+   Presentations
+http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf";>SNIA 
+CIFS Specification 
+
href="http://oss.software.ibm.com/developer/opensource/linux/presentations/samba/ut_cifs.pdf";>r
+  
+  
+  
+  The CIFS POSIX Extensions are protocol extensions to enable POSIX 
compliant
+  operating systems to better interoperate with CIFS servers 
+  and storage appliances by extending the SNIA CIFS Specification version
+  1.0.    Popular servers such as Samba, Windows
+  2000, Windows XP and many others support CIFS by default.   
These
+  extensions are already implemented in multiple clients and servers.
+  
+   
+  
+
+
+  
+  Thanks to SNIA, IBM and the Samba Team
+   http://us1.samba.org/samba/images/samba_banner.gif";> 
+  for their assistance 
+  and support.
+
+  
+
+
+


Property changes on: trunk/CIFS_POSIX_extensions.html
___
Name: svn:executable
   + *



svn commit: linux-cifs-client r82 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-09-17 Thread sfrench
Author: sfrench
Date: 2006-09-17 23:45:49 + (Sun, 17 Sep 2006)
New Revision: 82

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=82

Log:
More 2.4 build fixes from Yehuda

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs24.c
   branches/linux-converged-for-old-kernels/fs/cifs/transport.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs24.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs24.c 2006-09-14 
21:20:14 UTC (rev 81)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs24.c 2006-09-17 
23:45:49 UTC (rev 82)
@@ -40,7 +40,9 @@
 #include "cifs_debug.h"
 #include "cifs_fs_sb.h"
 #include 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25))
 #include 
+#endif
 #define CIFS_MAGIC_NUMBER 0xFF534D42   /* the first four bytes of SMB PDUs */
 
 #ifdef CONFIG_CIFS_QUOTA
@@ -63,16 +65,16 @@
 extern struct task_struct * dnotifyThread; /* remove sparse warning */
 struct task_struct * dnotifyThread = NULL;
 unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
-module_param(CIFSMaxBufSize, int, 0);
+MODULE_PARM(CIFSMaxBufSize, "i");
 MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). 
Default: 16384 Range: 8192 to 130048");
 unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL;
-module_param(cifs_min_rcv, int, 0);
+MODULE_PARM(cifs_min_rcv, "i");
 MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 
64");
 unsigned int cifs_min_small = 30;
-module_param(cifs_min_small, int, 0);
+MODULE_PARM(cifs_min_small, "i");
 MODULE_PARM_DESC(cifs_min_small,"Small network buffers in pool. Default: 30 
Range: 2 to 256");
 unsigned int cifs_max_pending = CIFS_MAX_REQ;
-module_param(cifs_max_pending, int, 0);
+MODULE_PARM(cifs_max_pending, "i");
 MODULE_PARM_DESC(cifs_max_pending,"Simultaneous requests to server. Default: 
50 Range: 2 to 256");
 
 static DECLARE_COMPLETION(cifs_oplock_exited);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/transport.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/transport.c
2006-09-14 21:20:14 UTC (rev 81)
+++ branches/linux-converged-for-old-kernels/fs/cifs/transport.c
2006-09-17 23:45:49 UTC (rev 82)
@@ -314,7 +314,10 @@
break;
 
if (rc >= total_len) {
-   WARN_ON(rc > total_len);
+   if(rc > total_len) {
+   cERROR(1,("unexpected length received"));
+   dump_stack();
+   }
break;
}
if(rc == 0) {



svn commit: samba-web r1038 - in trunk: .

2006-09-16 Thread sfrench
Author: sfrench
Date: 2006-09-17 01:17:25 + (Sun, 17 Sep 2006)
New Revision: 1038

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1038

Log:
minor updates to cifs vfs web page

Modified:
   trunk/Linux_CIFS_client.html


Changeset:
Modified: trunk/Linux_CIFS_client.html
===
--- trunk/Linux_CIFS_client.html2006-09-17 00:46:25 UTC (rev 1037)
+++ trunk/Linux_CIFS_client.html2006-09-17 01:17:25 UTC (rev 1038)
@@ -70,9 +70,7 @@
   The cifs and smbfs filesystems can coexist on the same system and do not
   conflict. 
    
-  The current 2.4 version of the CIFS VFS is http://us1.samba.org/samba/ftp/cifs-cvs/cifs-1.20c-2.4.tar.gz";>1.20c 
which was released in Jul , 2004 and the current 2.6.17-rc2 Linux version
-  of the cifs vfs is version 1.45. To download replacement files for the
+  The current version of the CIFS VFS has been backported to compile on 
2.4 kernels, not just older 2.6. kernel versions).  To download replacement 
files for the
   fs/cifs directory which includes a relatively recent version of the cifs
   vfs click http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.45.tar.gz";>1.45 for 
2.6 kernels (released August 2nd, 2006).CIFS VFS is licensed under the 
http://www.gnu.org/copyleft/gpl.html";>GNU General Public 
License 



svn commit: samba-web r1037 - in trunk: .

2006-09-16 Thread sfrench
Author: sfrench
Date: 2006-09-17 00:46:25 + (Sun, 17 Sep 2006)
New Revision: 1037

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1037

Log:
update cifs vfs versions in linux cifs webpage

Modified:
   trunk/Linux_CIFS_client.html


Changeset:
Modified: trunk/Linux_CIFS_client.html
===
--- trunk/Linux_CIFS_client.html2006-09-05 12:43:53 UTC (rev 1036)
+++ trunk/Linux_CIFS_client.html2006-09-17 00:46:25 UTC (rev 1037)
@@ -9,8 +9,7 @@
 
 
  
-LATEST UPDATES - mount.cifs mount helper now updated in Samba svn to version
-1.10. cifs vfs version 1.42 is accepted into mainline kernel. cifs vfs 1.42c 
is current in the cifs-2.6-stable.git tree.  Experimental CIFS Advisory locking 
code available in cifs client (1.42a or later) and Samba server (trunk).
+LATEST UPDATES - cifs vfs version 1.45 is accepted into mainline kernel 
(2.6.18) and includes full posix byte range locking support to current Samba 
servers, and also has much improved posix locking support to other servers, 
even those which do not support the CIFS POSIX protocol extensions.  cifs 1.45 
also includes much improved support for legacy servers including OS/2 and 
Windows 9x.  A backported version of cifs 1.45 which builds on old kernel 
versions is also available. cifs vfs 1.46 is current in the cifs-2.6.git 
tree.
 
   
   
@@ -50,10 +49,10 @@
   and storage appliances compliant with the SNIA CIFS Specification version
   1.0 or later.    Popular servers such as Samba, Windows
   2000, Windows XP and many others support CIFS by default.   The
-  CIFS VFS does not provide support for older servers based on the 
more
-  primitive SMB (Server Message Block) protocol (you can use the Linux 
filesystem
-  smbfs for these).   CIFS VFS is designed to take advantage of
-  advanced network filesystem features such as locking, Unicode (advanced
+  CIFS VFS provides some support for older servers based on the more
+  primitive SMB (Server Message Block) protocol (you also can use the 
Linux filesystem
+  smbfs as an alternative for accessing these).   CIFS VFS is 
designed to take
+  advantage of advanced network filesystem features such as locking, 
Unicode (advanced
   internationalization), hardlinks, dfs (heirarchical, replicated name 
space),
   distributed caching and uses native TCP names (rather than RFC1001, 
Netbios
   names).  Unlike some other network filesystems all key network 
function
@@ -73,9 +72,9 @@
    
   The current 2.4 version of the CIFS VFS is http://us1.samba.org/samba/ftp/cifs-cvs/cifs-1.20c-2.4.tar.gz";>1.20c 
which was released in Jul , 2004 and the current 2.6.17-rc2 Linux version
-  of the cifs vfs is version 1.42. To download replacement files for the
+  of the cifs vfs is version 1.45. To download replacement files for the
   fs/cifs directory which includes a relatively recent version of the cifs
-  vfs click http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.42b.tar.gz";>1.42b for 
2.6 kernels (released April 10th, 2006).CIFS VFS is licensed under the 
http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.45.tar.gz";>1.45 for 
2.6 kernels (released August 2nd, 2006).CIFS VFS is licensed under the 
http://www.gnu.org/copyleft/gpl.html";>GNU General Public 
License 
   version 2 or later. 
   



svn commit: samba r18570 - in branches/SAMBA_4_0/source: ntvfs/cifs_posix_cli script/tests

2006-09-15 Thread sfrench
Author: sfrench
Date: 2006-09-15 21:39:38 + (Fri, 15 Sep 2006)
New Revision: 18570

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18570

Log:
Fix up function names in cifs unix/posix extensions backend. Enable tiny quick 
test for torture for them

Added:
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/cifsposix.h
Removed:
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/cvfs.h
Modified:
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/README
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/svfs_util.c
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
   branches/SAMBA_4_0/source/script/tests/mktestsetup.sh
   branches/SAMBA_4_0/source/script/tests/tests_quick.sh


Changeset:
Sorry, the patch is too large (1129 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18570


svn commit: samba r18564 - in branches/SAMBA_4_0/source: ntvfs ntvfs/cifs_posix_cli script/tests

2006-09-15 Thread sfrench
Author: sfrench
Date: 2006-09-15 19:24:38 + (Fri, 15 Sep 2006)
New Revision: 18564

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18564

Log:
update for cifs unix/posix extensions stub version to build and beginnings of 
smbtorture test for it

Added:
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
Removed:
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/vfs_simple.c
Modified:
   branches/SAMBA_4_0/source/ntvfs/cifs_posix_cli/svfs_util.c
   branches/SAMBA_4_0/source/ntvfs/config.mk
   branches/SAMBA_4_0/source/script/tests/mktestsetup.sh
   branches/SAMBA_4_0/source/script/tests/tests_quick.sh


Changeset:
Sorry, the patch is too large (2134 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18564


svn commit: linux-cifs-client r81 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-09-14 Thread sfrench
Author: sfrench
Date: 2006-09-14 21:20:14 + (Thu, 14 Sep 2006)
New Revision: 81

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=81

Log:
Merge updated cifs 2.4 backport patches from Yehuda Sadeh Weinraub

Added:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs24.c
Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Sorry, the patch is too large (1077 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=81


svn commit: linux-cifs-client r80 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-22 Thread sfrench
Author: sfrench
Date: 2006-08-22 22:01:16 + (Tue, 22 Aug 2006)
New Revision: 80

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=80

Log:
Nearly done cifs ifdefs for 2.4 kernel

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
   branches/linux-converged-for-old-kernels/fs/cifs/file.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h 2006-08-22 
17:23:48 UTC (rev 79)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h 2006-08-22 
22:01:16 UTC (rev 80)
@@ -332,7 +332,9 @@
unsigned clientCanCacheRead:1; /* read oplock */
unsigned clientCanCacheAll:1;  /* read and writebehind oplock */
unsigned oplockPending:1;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
struct inode vfs_inode;
+#endif
 };
 
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)

Modified: branches/linux-converged-for-old-kernels/fs/cifs/file.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/file.c 2006-08-22 
17:23:48 UTC (rev 79)
+++ branches/linux-converged-for-old-kernels/fs/cifs/file.c 2006-08-22 
22:01:16 UTC (rev 80)
@@ -35,6 +35,7 @@
 #include 
 #include 
 #endif
+#include 
 #ifndef FL_SLEEP
 #define FL_SLEEP 0
 #endif
@@ -1071,7 +1072,7 @@
read_unlock(&GlobalSMBSeslock);
if((open_file->invalidHandle) && 
   (!open_file->closePend) /* BB fixme -since the 
second clause can not be true remove it BB */) {
-   rc = cifs_reopen_file(&cifs_inode->vfs_inode, 
+   rc = 
cifs_reopen_file(open_file->pfile->f_dentry->d_inode, 
  open_file->pfile, FALSE);
/* if it fails, try another handle - might be */
/* dangerous to hold up writepages with retry */
@@ -1988,7 +1989,7 @@
be closable if needed */
atomic_dec(&open_file->wrtPending);
 
-   cifs_sb = CIFS_SB(cifsInode->vfs_inode.i_sb);
+   cifs_sb = CIFS_SB(open_file->pfile->f_dentry->d_inode->i_sb);
if ( cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO ) {
/* since no page cache to corrupt on directio 
we can change size safely */



svn commit: linux-cifs-client r79 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-22 Thread sfrench
Author: sfrench
Date: 2006-08-22 17:23:48 + (Tue, 22 Aug 2006)
New Revision: 79

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=79

Log:
more cifs 2.4 kernel merges

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/file.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c   2006-08-22 
16:37:23 UTC (rev 78)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c   2006-08-22 
17:23:48 UTC (rev 79)
@@ -181,7 +181,6 @@
 }
 #endif
 
-
 static int
 cifs_statfs(struct super_block *sb, struct kstatfs *buf)
 {

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-08-22 
16:37:23 UTC (rev 78)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-08-22 
17:23:48 UTC (rev 79)
@@ -61,8 +61,8 @@
 #endif
 #endif
 
-extern struct address_space_operations cifs_addr_ops;
-extern struct address_space_operations cifs_addr_ops_smallbuf;
+extern const struct address_space_operations cifs_addr_ops;
+extern const struct address_space_operations cifs_addr_ops_smallbuf;
 
 /* Functions related to super block operations */
 extern struct super_operations cifs_super_ops;
@@ -97,10 +97,10 @@
 extern struct inode_operations cifs_symlink_inode_ops;
 
 /* Functions related to files and directories */
-extern struct file_operations cifs_file_ops;
-extern struct file_operations cifs_file_direct_ops; /* if directio mount */
-extern struct file_operations cifs_file_nobrl_ops;
-extern struct file_operations cifs_file_direct_nobrl_ops; /* if directio mount 
*/
+extern const struct file_operations cifs_file_ops;
+extern const struct file_operations cifs_file_direct_ops; /* if directio mount 
*/
+extern const struct file_operations cifs_file_nobrl_ops;
+extern const struct file_operations cifs_file_direct_nobrl_ops; /* if directio 
mount */
 extern int cifs_open(struct inode *inode, struct file *file);
 extern int cifs_close(struct inode *inode, struct file *file);
 extern int cifs_closedir(struct inode *inode, struct file *file);
@@ -112,7 +112,7 @@
 extern int cifs_fsync(struct file *, struct dentry *, int);
 extern int cifs_flush(struct file *);
 extern int cifs_file_mmap(struct file * , struct vm_area_struct *);
-extern struct file_operations cifs_dir_ops;
+extern const struct file_operations cifs_dir_ops;
 extern int cifs_dir_open(struct inode *inode, struct file *file);
 extern int cifs_readdir(struct file *file, void *direntry, filldir_t filldir);
 extern int cifs_dir_notify(struct file *, unsigned long arg);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/file.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/file.c 2006-08-22 
16:37:23 UTC (rev 78)
+++ branches/linux-converged-for-old-kernels/fs/cifs/file.c 2006-08-22 
17:23:48 UTC (rev 79)
@@ -341,7 +341,7 @@
return rc;
 }
 
-/* Try to reaquire byte range locks that were released when session */
+/* Try to reacquire byte range locks that were released when session */
 /* to server was lost */
 static int cifs_relock_file(struct cifsFileInfo *cifsFile)
 {
@@ -2035,7 +2035,7 @@
return 0;
 }
 
-struct address_space_operations cifs_addr_ops = {
+const struct address_space_operations cifs_addr_ops = {
.readpage = cifs_readpage,
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
.readpages = cifs_readpages,
@@ -2058,7 +2058,7 @@
  * contain the header plus one complete page of data.  Otherwise, we need
  * to leave cifs_readpages out of the address space operations.
  */
-struct address_space_operations cifs_addr_ops_smallbuf = {
+const struct address_space_operations cifs_addr_ops_smallbuf = {
.readpage = cifs_readpage,
.writepage = cifs_writepage,
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 14)



svn commit: linux-cifs-client r78 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-22 Thread sfrench
Author: sfrench
Date: 2006-08-22 16:37:23 + (Tue, 22 Aug 2006)
New Revision: 78

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=78

Log:
Merge more 2.4 cifs build ifdefs

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/inode.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Sorry, the patch is too large (258 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=78


svn commit: linux-cifs-client r77 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-21 Thread sfrench
Author: sfrench
Date: 2006-08-21 21:10:48 + (Mon, 21 Aug 2006)
New Revision: 77

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=77

Log:
more 2.4 cifs merge

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/readdir.c  2006-08-21 
20:37:35 UTC (rev 76)
+++ branches/linux-converged-for-old-kernels/fs/cifs/readdir.c  2006-08-21 
21:10:48 UTC (rev 77)
@@ -113,7 +113,11 @@
char * buf, int *pobject_type, int isNewInode)
 {
loff_t local_size;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
struct timespec local_mtime;
+#else
+   time_t local_mtime;
+#endif
 
struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(tmp_inode->i_sb);
@@ -210,7 +214,11 @@
if (is_size_safe_to_change(cifsInfo)) {
/* can not safely change the file size here if the 
client is writing to it due to potential races */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
i_size_write(tmp_inode, end_of_file);
+#else
+   tmp_inode->i_size = end_of_file;
+#endif
 
/* 512 bytes (2**9) is the fake blocksize that must be used */
/* for this calculation, even though the reported blocksize is larger */
@@ -255,7 +263,11 @@
} else {
/* file may have changed on server */
cFYI(1, ("invalidate inode, readdir detected change"));
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
invalidate_remote_inode(tmp_inode);
+#else
+   invalidate_inode_pages(tmp_inode);
+#endif
}
} else if (S_ISDIR(tmp_inode->i_mode)) {
cFYI(1, ("Directory inode"));
@@ -275,7 +287,11 @@
FILE_UNIX_INFO *pfindData, int *pobject_type, int isNewInode)
 {
loff_t local_size;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
struct timespec local_mtime;
+#else
+   time_t local_mtime;
+#endif
 
struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(tmp_inode->i_sb);
@@ -340,7 +356,11 @@
if (is_size_safe_to_change(cifsInfo)) {
/* can not safely change the file size here if the 
client is writing to it due to potential races */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
i_size_write(tmp_inode,end_of_file);
+#else
+   tmp_inode->i_size = end_of_file;
+#endif
 
/* 512 bytes (2**9) is the fake blocksize that must be used */
/* for this calculation, not the real blocksize */
@@ -379,7 +399,11 @@
} else {
/* file may have changed on server */
cFYI(1, ("invalidate inode, readdir detected change"));
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
invalidate_remote_inode(tmp_inode);
+#else
+   invalidate_inode_pages(tmp_inode);
+#endif
}
} else if (S_ISDIR(tmp_inode->i_mode)) {
cFYI(1, ("Directory inode"));



svn commit: linux-cifs-client r76 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-21 Thread sfrench
Author: sfrench
Date: 2006-08-21 20:37:35 + (Mon, 21 Aug 2006)
New Revision: 76

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=76

Log:
another 2.4 cifs build fix

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/transport.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/transport.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/transport.c
2006-08-21 17:08:04 UTC (rev 75)
+++ branches/linux-converged-for-old-kernels/fs/cifs/transport.c
2006-08-21 20:37:35 UTC (rev 76)
@@ -27,13 +27,19 @@
 #include 
 #include 
 #include 
-#include 
 #include "cifspdu.h"
 #include "cifsglob.h"
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
+#include 
+#else
+extern kmem_cache_t *cifs_mid_cachep;
+#endif
 #include "cifsproto.h"
 #include "cifs_debug.h"
-  
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
 extern mempool_t *cifs_mid_poolp;
+#endif
 extern kmem_cache_t *cifs_oplock_cachep;
 
 static struct mid_q_entry *
@@ -49,9 +55,16 @@
cERROR(1, ("Null TCP session in AllocMidQEntry"));
return NULL;
}
-   
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
temp = (struct mid_q_entry *) mempool_alloc(cifs_mid_poolp,
SLAB_KERNEL | SLAB_NOFS);
+#else
+   temp = (struct mid_q_entry *) kmem_cache_alloc(cifs_mid_cachep,
+   SLAB_KERNEL);
+
+#endif
+
if (temp == NULL)
return temp;
else {
@@ -106,7 +119,11 @@
}
}
 #endif
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
mempool_free(midEntry, cifs_mid_poolp);
+#else
+   kmem_cache_free(cifs_mid_cachep, midEntry);
+#endif
 }
 
 struct oplock_q_entry *



svn commit: linux-cifs-client r75 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-21 Thread sfrench
Author: sfrench
Date: 2006-08-21 17:08:04 + (Mon, 21 Aug 2006)
New Revision: 75

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=75

Log:
More 2.4 build enablement of current cifs vfs.

Thanks to Yehuda Weinraub for his help on this

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/dir.c
   branches/linux-converged-for-old-kernels/fs/cifs/link.c
   branches/linux-converged-for-old-kernels/fs/cifs/sess.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
===
--- branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
2006-08-18 23:36:23 UTC (rev 74)
+++ branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
2006-08-21 17:08:04 UTC (rev 75)
@@ -3,7 +3,7 @@
 #
 O_TARGET := cifs.o
 
-obj-y := nterr.o md4.o md5.o netmisc.o smbdes.o smbencrypt.o asn1.o 
cifs_unicode.o cifsencrypt.o cifs_debug.o sess.o cifssmb.o connect.o misc.o 
dir.o inode.o link.o transport.o cifsfs.o file.o
+obj-y := nterr.o md4.o md5.o netmisc.o smbdes.o smbencrypt.o asn1.o 
cifs_unicode.o cifsencrypt.o cifs_debug.o sess.o link.o cifssmb.o connect.o 
misc.o dir.o inode.o transport.o cifsfs.o file.o
 
 obj-m := $(O_TARGET)
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c  2006-08-18 
23:36:23 UTC (rev 74)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c  2006-08-21 
17:08:04 UTC (rev 75)
@@ -136,12 +136,17 @@
while(tcon->ses->server->tcpStatus == 
CifsNeedReconnect) {
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
int timeout = 10 * HZ;
-   while ((tcon->ses->server->tcpStatus != 
CifsGood) && (timeout > 0)) {
-   timeout = 
interruptible_sleep_on_timeout(&tcon->ses->server->response_q,timeout);
+   while((tcon->ses->server->tcpStatus != CifsGood)
+   && (timeout > 0)) {
+   timeout = 
interruptible_sleep_on_timeout(
+   &tcon->ses->server->response_q,
+   timeout);
}
 #else
-   
wait_event_interruptible_timeout(tcon->ses->server->response_q,
-   (tcon->ses->server->tcpStatus == 
CifsGood), 10 * HZ);
+   wait_event_interruptible_timeout(
+   tcon->ses->server->response_q,
+   (tcon->ses->server->tcpStatus == 
CifsGood),
+   10 * HZ);
 #endif
if(tcon->ses->server->tcpStatus == 
CifsNeedReconnect) {
/* on "soft" mounts we wait once */
@@ -277,8 +282,20 @@
   reconnect, should be greater than cifs socket
   timeout which is 7 seconds */
while(tcon->ses->server->tcpStatus == 
CifsNeedReconnect) {
-   
wait_event_interruptible_timeout(tcon->ses->server->response_q,
-   (tcon->ses->server->tcpStatus == 
CifsGood), 10 * HZ);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
+   int timeout = 10 * HZ;
+   while((tcon->ses->server->tcpStatus != CifsGood)
+   && (timeout > 0)) {
+   timeout = interruptible_sleep_on_timeout
+   (&tcon->ses->server->response_q,
+timeout);
+   }
+#else
+   wait_event_interruptible_timeout(
+   tcon->ses->server->response_q,
+   (tcon->ses->server->tcpStatus == 
CifsGood),
+   10 * HZ);
+#endif
if(tcon->ses->server->tcpStatus == 
CifsNeedReconnect) {
/* on "soft" mounts we wait once */

Modified: branches/linux-converged-for-old-kernels/fs/cifs/dir.c
==

svn commit: linux-cifs-client r74 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-18 Thread sfrench
Author: sfrench
Date: 2006-08-18 23:36:23 + (Fri, 18 Aug 2006)
New Revision: 74

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=74

Log:
2.4 build fixes for cifs

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c
   branches/linux-converged-for-old-kernels/fs/cifs/xattr.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
===
--- branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
2006-08-17 21:47:38 UTC (rev 73)
+++ branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
2006-08-18 23:36:23 UTC (rev 74)
@@ -3,7 +3,7 @@
 #
 O_TARGET := cifs.o
 
-obj-y := nterr.o md4.o md5.o netmisc.o smbdes.o smbencrypt.o asn1.o 
cifs_unicode.o cifsencrypt.o cifs_debug.o cifssmb.o connect.o misc.o dir.o 
inode.o link.o transport.o cifsfs.o file.o
+obj-y := nterr.o md4.o md5.o netmisc.o smbdes.o smbencrypt.o asn1.o 
cifs_unicode.o cifsencrypt.o cifs_debug.o sess.o cifssmb.o connect.o misc.o 
dir.o inode.o link.o transport.o cifsfs.o file.o
 
 obj-m := $(O_TARGET)
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-08-17 
21:47:38 UTC (rev 73)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-08-18 
23:36:23 UTC (rev 74)
@@ -31,6 +31,11 @@
 #ifndef TRUE
 #define TRUE 1
 #endif
+
+#ifndef __user
+#define __user
+#endif
+
 #include 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
 #define current_fs_time(arg) CURRENT_TIME
@@ -49,20 +54,22 @@
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
 extern int cifs_create(struct inode *, struct dentry *, int, 
   struct nameidata *);
+extern struct dentry * cifs_lookup(struct inode *, struct dentry *,
+  struct nameidata *);
+extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t);
+extern int cifs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
 #else
 extern int cifs_create(struct inode *, struct dentry *, int);
+extern struct dentry * cifs_lookup(struct inode *, struct dentry *);
+extern int cifs_mknod(struct inode *, struct dentry *, int, int);
 #endif
-extern struct dentry * cifs_lookup(struct inode *, struct dentry *,
- struct nameidata *);
 extern int cifs_unlink(struct inode *, struct dentry *);
 extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *);
-extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t);
 extern int cifs_mkdir(struct inode *, struct dentry *, int);
 extern int cifs_rmdir(struct inode *, struct dentry *);
 extern int cifs_rename(struct inode *, struct dentry *, struct inode *,
   struct dentry *);
 extern int cifs_revalidate(struct dentry *);
-extern int cifs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
 extern int cifs_setattr(struct dentry *, struct iattr *);
 
 extern struct inode_operations cifs_file_inode_ops;

Modified: branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c  2006-08-17 
21:47:38 UTC (rev 73)
+++ branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c  2006-08-18 
23:36:23 UTC (rev 74)
@@ -911,4 +911,28 @@
/* Convert to 100ns intervals and then add the NTFS time offset. */
return (u64) t.tv_sec * 1000 + t.tv_nsec/100 + NTFS_TIME_OFFSET;
 }
+#else
+time_t
+cifs_NTtimeToUnix(__u64 ntutc)
+{
+   /* BB what about the timezone? BB */
+
+   /* Subtract the NTFS time offset, then convert to 1s intervals.  */
+   u64 t;
+
+   t = ntutc - NTFS_TIME_OFFSET;
+   do_div(t, 1000);
+   return (time_t)t;
+}
+
+/* Convert the Unix UTC into NT UTC. */
+__u64
+cifs_UnixTimeToNT(time_t t)
+{
+   __u64 dce_time;
+   /* Convert to 100ns intervals and then add the NTFS time offset. */
+   dce_time = (__u64) t * 1000;
+   dce_time += NTFS_TIME_OFFSET;
+   return dce_time;
+}
 #endif

Modified: branches/linux-converged-for-old-kernels/fs/cifs/xattr.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/xattr.c2006-08-17 
21:47:38 UTC (rev 73)
+++ branches/linux-converged-for-old-kernels/fs/cifs/xattr.c2006-08-18 
23:36:23 UTC (rev 74)
@@ -20,7 +20,10 @@
  */
 
 #include 
+#include 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
 #include 
+#endif
 #include "cifsfs.h"
 #include "cifspdu.h"
 #include "cifsglob.h"



svn commit: linux-cifs-client r73 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-17 Thread sfrench
Author: sfrench
Date: 2006-08-17 21:47:38 + (Thu, 17 Aug 2006)
New Revision: 73

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=73

Log:
Merge cifs with git tree

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/README
   branches/linux-converged-for-old-kernels/fs/cifs/xattr.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
===
--- branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2006-08-16 
19:51:48 UTC (rev 72)
+++ branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2006-08-17 
21:47:38 UTC (rev 73)
@@ -5,7 +5,8 @@
 on requests on other threads.  Improve POSIX locking emulation,
 (lock cancel now works, and unlock of merged range works even
 to Windows servers now).  Fix oops on mount to lanman servers
-(win9x, os/2 etc.) when null password.
+(win9x, os/2 etc.) when null password.  Do not send listxattr
+(SMB to query all EAs) if nouser_xattr specified.
 
 Version 1.44
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/README
===
--- branches/linux-converged-for-old-kernels/fs/cifs/README 2006-08-16 
19:51:48 UTC (rev 72)
+++ branches/linux-converged-for-old-kernels/fs/cifs/README 2006-08-17 
21:47:38 UTC (rev 73)
@@ -408,7 +408,7 @@
   user_xattrAllow getting and setting user xattrs as OS/2 EAs (extended
attributes) to the server (default) e.g. via setfattr 
and getfattr utilities. 
-  nouser_xattr  Do not allow getfattr/setfattr to get/set xattrs 
+  nouser_xattr  Do not allow getfattr/setfattr to get/set/list xattrs 
   mapchars  Translate six of the seven reserved characters (not backslash)
*?<>|:
to the remap range (above 0xF000), which also

Modified: branches/linux-converged-for-old-kernels/fs/cifs/xattr.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/xattr.c2006-08-16 
19:51:48 UTC (rev 72)
+++ branches/linux-converged-for-old-kernels/fs/cifs/xattr.c2006-08-17 
21:47:38 UTC (rev 73)
@@ -330,11 +330,15 @@
sb = direntry->d_inode->i_sb;
if(sb == NULL)
return -EIO;
-   xid = GetXid();
 
cifs_sb = CIFS_SB(sb);
pTcon = cifs_sb->tcon;
 
+   if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
+   return -EOPNOTSUPP;
+
+   xid = GetXid();
+
full_path = build_path_from_dentry(direntry);
if(full_path == NULL) {
FreeXid(xid);



svn commit: linux-cifs-client r72 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-08-16 Thread sfrench
Author: sfrench
Date: 2006-08-16 19:51:48 + (Wed, 16 Aug 2006)
New Revision: 72

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=72

Log:
Merge with mainline cifs git tree - picking up Bjoern Jacke's suggestion 
re:allowing disabling listxattr

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/README
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/dir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/xattr.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES   2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES   2006-08-16 19:51:48 UTC 
(rev 72)
@@ -2,7 +2,11 @@
 
 Do not time out lockw calls when using posix extensions. Do not
 time out requests if server still responding reasonably fast
-on requests on other threads
+on requests on other threads.  Improve POSIX locking emulation,
+(lock cancel now works, and unlock of merged range works even
+to Windows servers now).  Fix oops on mount to lanman servers
+(win9x, os/2 etc.) when null password.  Do not send listxattr
+(SMB to query all EAs) if nouser_xattr specified.
 
 Version 1.44
 

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/README
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/README2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/README2006-08-16 19:51:48 UTC 
(rev 72)
@@ -408,7 +408,7 @@
   user_xattrAllow getting and setting user xattrs as OS/2 EAs (extended
attributes) to the server (default) e.g. via setfattr 
and getfattr utilities. 
-  nouser_xattr  Do not allow getfattr/setfattr to get/set xattrs 
+  nouser_xattr  Do not allow getfattr/setfattr to get/set/list xattrs 
   mapchars  Translate six of the seven reserved characters (not backslash)
*?<>|:
to the remap range (above 0xF000), which also

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-08-16 19:51:48 UTC 
(rev 72)
@@ -477,7 +477,7 @@
/* BB get server time for time conversions and add
code to use it and timezone since this is not UTC */
 
-   if (rsp->EncryptionKeyLength == CIFS_CRYPTO_KEY_SIZE) {
+   if (rsp->EncryptionKeyLength == 
cpu_to_le16(CIFS_CRYPTO_KEY_SIZE)) {
memcpy(server->cryptKey, rsp->EncryptionKey,
CIFS_CRYPTO_KEY_SIZE);
} else if (server->secMode & SECMODE_PW_ENCRYPT) {

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c 2006-08-16 17:29:32 UTC 
(rev 71)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c 2006-08-16 19:51:48 UTC 
(rev 72)
@@ -1271,33 +1271,35 @@
 
read_lock(&GlobalSMBSeslock);
list_for_each(tmp, &GlobalTreeConnectionList) {
-   cFYI(1, ("Next tcon - "));
+   cFYI(1, ("Next tcon"));
tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
if (tcon->ses) {
if (tcon->ses->server) {
cFYI(1,
-(" old ip addr: %x == new ip %x ?",
+("old ip addr: %x == new ip %x ?",
  tcon->ses->server->addr.sockAddr.sin_addr.
  s_addr, new_target_ip_addr));
if (tcon->ses->server->addr.sockAddr.sin_addr.
s_addr == new_target_ip_addr) {
-   /* BB lock tcon and server and tcp session and increment use count 
here? */
+   /* BB lock tcon, server and tcp session and increment use count here? */
/* found a match on the TCP session */
/* BB check if reconnection needed */
-   cFYI(1,("Matched ip, old UNC: %s == 
new: %s ?",
+   cFYI(1,("IP match, old UNC: %s new: %s",
 

svn commit: linux-cifs-client r71 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-16 Thread sfrench
Author: sfrench
Date: 2006-08-16 17:29:32 + (Wed, 16 Aug 2006)
New Revision: 71

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=71

Log:
merge with cifs git tree

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c
   branches/linux-converged-for-old-kernels/fs/cifs/dir.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
===
--- branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2006-08-16 
16:39:11 UTC (rev 70)
+++ branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2006-08-16 
17:29:32 UTC (rev 71)
@@ -2,7 +2,10 @@
 
 Do not time out lockw calls when using posix extensions. Do not
 time out requests if server still responding reasonably fast
-on requests on other threads
+on requests on other threads.  Improve POSIX locking emulation,
+(lock cancel now works, and unlock of merged range works even
+to Windows servers now).  Fix oops on mount to lanman servers
+(win9x, os/2 etc.) when null password.
 
 Version 1.44
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c  
2006-08-16 16:39:11 UTC (rev 70)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsencrypt.c  
2006-08-16 17:29:32 UTC (rev 71)
@@ -277,7 +277,8 @@
return;
 
memset(password_with_pad, 0, CIFS_ENCPWD_SIZE);
-   strncpy(password_with_pad, ses->password, CIFS_ENCPWD_SIZE);
+   if(ses->password)
+   strncpy(password_with_pad, ses->password, CIFS_ENCPWD_SIZE);
 
if((ses->server->secMode & SECMODE_PW_ENCRYPT) == 0)
if(extended_security & CIFSSEC_MAY_PLNTXT) {

Modified: branches/linux-converged-for-old-kernels/fs/cifs/connect.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/connect.c  2006-08-16 
16:39:11 UTC (rev 70)
+++ branches/linux-converged-for-old-kernels/fs/cifs/connect.c  2006-08-16 
17:29:32 UTC (rev 71)
@@ -1322,33 +1322,35 @@
 
read_lock(&GlobalSMBSeslock);
list_for_each(tmp, &GlobalTreeConnectionList) {
-   cFYI(1, ("Next tcon - "));
+   cFYI(1, ("Next tcon"));
tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
if (tcon->ses) {
if (tcon->ses->server) {
cFYI(1,
-(" old ip addr: %x == new ip %x ?",
+("old ip addr: %x == new ip %x ?",
  tcon->ses->server->addr.sockAddr.sin_addr.
  s_addr, new_target_ip_addr));
if (tcon->ses->server->addr.sockAddr.sin_addr.
s_addr == new_target_ip_addr) {
-   /* BB lock tcon and server and tcp session and increment use count 
here? */
+   /* BB lock tcon, server and tcp session and increment use count here? */
/* found a match on the TCP session */
/* BB check if reconnection needed */
-   cFYI(1,("Matched ip, old UNC: %s == 
new: %s ?",
+   cFYI(1,("IP match, old UNC: %s new: %s",
  tcon->treeName, uncName));
if (strncmp
(tcon->treeName, uncName,
 MAX_TREE_SIZE) == 0) {
cFYI(1,
-("Matched UNC, old user: 
%s == new: %s ?",
+("and old usr: %s new: %s",
  tcon->treeName, uncName));
if (strncmp
(tcon->ses->userName,
 userName,
 MAX_USERNAME_SIZE) == 0) {

read_unlock(&GlobalSMBSeslock);
-   return tcon;/* also 
matched user (smb session)*/
+  

svn commit: linux-cifs-client r70 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-08-16 Thread sfrench
Author: sfrench
Date: 2006-08-16 16:39:11 + (Wed, 16 Aug 2006)
New Revision: 70

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=70

Log:
Allow cifsd to suspend if connection is lost

Make cifsd allow us to suspend if it has lost the connection with a server

Ref: http://bugzilla.kernel.org/show_bug.cgi?id=6811

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
Acked-by: Pavel Machek <[EMAIL PROTECTED]>
Signed-off-by: Steve French <[EMAIL PROTECTED]>


Also remove dead file and cleanup (line past 80th column)

Removed:
   branches/linux-converged-for-old-kernels/fs/cifs/ntlmssp.c
Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
2006-08-14 22:30:06 UTC (rev 69)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
2006-08-16 16:39:11 UTC (rev 70)
@@ -75,8 +75,8 @@
 extern int cifs_inet_pton(int, char * source, void *dst);
 extern int map_smb_to_linux_error(struct smb_hdr *smb);
 extern void header_assemble(struct smb_hdr *, char /* command */ ,
-   const struct cifsTconInfo *,
-   int /* length of fixed section (word count) in two 
byte units */);
+   const struct cifsTconInfo *, int /* length of
+   fixed section (word count) in two byte units */);
 extern int small_smb_init_no_tc(const int smb_cmd, const int wct,
struct cifsSesInfo *ses,
void ** request_buf);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/connect.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/connect.c  2006-08-14 
22:30:06 UTC (rev 69)
+++ branches/linux-converged-for-old-kernels/fs/cifs/connect.c  2006-08-16 
16:39:11 UTC (rev 70)
@@ -194,6 +194,9 @@
 
while ((server->tcpStatus != CifsExiting) && (server->tcpStatus != 
CifsGood))
{
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 12)
+   try_to_freeze();
+#endif
if(server->protocolType == IPV6) {
rc = 
ipv6_connect(&server->addr.sockAddr6,&server->ssocket);
} else {

Deleted: branches/linux-converged-for-old-kernels/fs/cifs/ntlmssp.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/ntlmssp.c  2006-08-14 
22:30:06 UTC (rev 69)
+++ branches/linux-converged-for-old-kernels/fs/cifs/ntlmssp.c  2006-08-16 
16:39:11 UTC (rev 70)
@@ -1,143 +0,0 @@
-/*
- *   fs/cifs/ntlmssp.h
- *
- *   Copyright (c) International Business Machines  Corp., 2006
- *   Author(s): Steve French ([EMAIL PROTECTED])
- *
- *   This library is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU Lesser General Public License as published
- *   by the Free Software Foundation; either version 2.1 of the License, or
- *   (at your option) any later version.
- *
- *   This library is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
- *   the GNU Lesser General Public License for more details.
- *
- *   You should have received a copy of the GNU Lesser General Public License
- *   along with this library; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "cifspdu.h"
-#include "cifsglob.h"
-#include "cifsproto.h"
-#include "cifs_unicode.h"
-#include "cifs_debug.h"
-#include "ntlmssp.h"
-#include "nterr.h"
-
-#ifdef CONFIG_CIFS_EXPERIMENTAL
-static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)
-{
-   __u32 capabilities = 0;
-
-   /* init fields common to all four types of SessSetup */
-   /* note that header is initialized to zero in header_assemble */
-   pSMB->req.AndXCommand = 0xFF;
-   pSMB->req.MaxBufferSize = cpu_to_le16(ses->server->maxBuf);
-   pSMB->req.MaxMpxCount = cpu_to_le16(ses->server->maxReq);
-
-   /* Now no need to set SMBFLG_CASELESS or obsolete CANONICAL PATH */
-
-   /* BB verify whether signing required on neg or just on auth frame 
-  (and NTLM case) */
-
-   capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS |
-   CAP_LARGE_WRITE_X | CAP_LARGE_READ_X;
-
-   if(ses->server->secMode & (

svn commit: linux-cifs-client r68 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-08-11 Thread sfrench
Author: sfrench
Date: 2006-08-11 22:04:45 + (Fri, 11 Aug 2006)
New Revision: 68

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=68

Log:
Merge with cifs git tree  (and minor tweak to jra's earlier patch to shrink it 
by
not altering header_assemble)

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsencrypt.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/misc.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifsencrypt.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifsencrypt.c 2006-07-29 
00:17:01 UTC (rev 67)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifsencrypt.c 2006-08-11 
22:04:45 UTC (rev 68)
@@ -277,7 +277,8 @@
return;
 
memset(password_with_pad, 0, CIFS_ENCPWD_SIZE);
-   strncpy(password_with_pad, ses->password, CIFS_ENCPWD_SIZE);
+   if(ses->password)
+   strncpy(password_with_pad, ses->password, CIFS_ENCPWD_SIZE);
 
if((ses->server->secMode & SECMODE_PW_ENCRYPT) == 0)
if(extended_security & CIFSSEC_MAY_PLNTXT) {

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h   2006-07-29 
00:17:01 UTC (rev 67)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h   2006-08-11 
22:04:45 UTC (rev 68)
@@ -66,9 +66,8 @@
 extern int cifs_inet_pton(int, char * source, void *dst);
 extern int map_smb_to_linux_error(struct smb_hdr *smb);
 extern void header_assemble(struct smb_hdr *, char /* command */ ,
-   const struct cifsTconInfo *,
-   __u16 mid,
-   int /* length of fixed section (word count) in two 
byte units */);
+   const struct cifsTconInfo *, int /* length of
+   fixed section (word count) in two byte units */);
 extern int small_smb_init_no_tc(const int smb_cmd, const int wct,
struct cifsSesInfo *ses,
void ** request_buf);

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-07-29 00:17:01 UTC 
(rev 67)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-08-11 22:04:45 UTC 
(rev 68)
@@ -201,8 +201,7 @@
return -ENOMEM;
}
 
-   header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,
-   tcon ? GetNextMid(tcon->ses->server) : 0, wct);
+   header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct);
 
 if(tcon != NULL)
 cifs_stats_inc(&tcon->num_smbs_sent);
@@ -346,7 +345,7 @@
*response_buf = *request_buf; 
 
header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,
-   tcon ? GetNextMid(tcon->ses->server) : 0, wct /*wct */ 
);
+   wct /*wct */ );
 
 if(tcon != NULL)
 cifs_stats_inc(&tcon->num_smbs_sent);

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c 2006-07-29 00:17:01 UTC 
(rev 67)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c 2006-08-11 22:04:45 UTC 
(rev 68)
@@ -182,6 +182,7 @@
 
while ((server->tcpStatus != CifsExiting) && (server->tcpStatus != 
CifsGood))
{
+   try_to_freeze();
if(server->protocolType == IPV6) {
rc = 
ipv6_connect(&server->addr.sockAddr6,&server->ssocket);
} else {
@@ -2042,8 +2043,9 @@
 
/* send SMBsessionSetup here */
header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX,
-   NULL /* no tCon exists yet */ , 
GetNextMid(ses->server), 13 /* wct */ );
+   NULL /* no tCon exists yet */ , 13 /* wct */ );
 
+   smb_buffer->Mid = GetNextMid(ses->server);
pSMB->req_no_secext.AndXCommand = 0xFF;
pSMB->req_no_secext.MaxBufferSize = cpu_to_le16(ses->server->maxBuf);
pSMB->req_no_secext.MaxMpxCount = cpu_to_le16(ses->server->maxReq);
@@ -2334,8 +2336,9 @@
 
/* send SMBsessionSetup here */
header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX,
-   NULL /* no tCon exists yet */ , 
GetNextMid(ses->server), 12 /* wct */

svn commit: samba-docs r982 - in trunk/smbdotconf/security: .

2006-08-08 Thread sfrench
Author: sfrench
Date: 2006-08-08 19:04:38 + (Tue, 08 Aug 2006)
New Revision: 982

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=982

Log:
Fix multiple typos/spelling mistakes

Modified:
   trunk/smbdotconf/security/security.xml


Changeset:
Modified: trunk/smbdotconf/security/security.xml
===
--- trunk/smbdotconf/security/security.xml  2006-08-08 12:42:43 UTC (rev 
981)
+++ trunk/smbdotconf/security/security.xml  2006-08-08 19:04:38 UTC (rev 
982)
@@ -201,13 +201,13 @@
 
 
This mode of operation has
-significant pitfalls, due to the fact that is activly initiates a
-man-in-the-middle attack on the remote SMB server.  In particular,
+significant pitfalls since it is more vulnerable to
+man-in-the-middle attacks and server impersonation.  In particular,
 this mode of operation can cause significant resource consuption on
 the PDC, as it must maintain an active connection for the duration
 of the user's session.  Furthermore, if this connection is lost,
-there is no way to reestablish it, and futher authenticaions to the
-Samba server may fail.  (From a single client, till it disconnects).
+there is no way to reestablish it, and futher authentications to the
+Samba server may fail (from a single client, till it disconnects).

 
From the client's point of 



svn commit: linux-cifs-client r63 - in branches: linux-2.6-cifs-git-devel/fs/cifs linux-converged-for-old-kernels/fs/cifs

2006-07-22 Thread sfrench
Author: sfrench
Date: 2006-07-22 16:48:12 + (Sat, 22 Jul 2006)
New Revision: 63

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=63

Log:
Remote junk files from cifs client tree

Removed:
   branches/linux-2.6-cifs-git-devel/fs/cifs/misc.c.orig
   branches/linux-converged-for-old-kernels/fs/cifs/Modules.symvers


Changeset:
Sorry, the patch is too large (756 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=63


svn commit: linux-cifs-client r62 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-07-16 Thread sfrench
Author: sfrench
Date: 2006-07-17 01:28:09 + (Mon, 17 Jul 2006)
New Revision: 62

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=62

Log:
make use of midState consistent as jra suggested

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c   2006-07-16 
05:07:17 UTC (rev 61)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c   2006-07-17 
01:28:09 UTC (rev 62)
@@ -448,13 +448,13 @@
for (;;) {
curr_timeout = timeout + jiffies;
wait_event(ses->server->response_q,
-   (!(midQ->midState & MID_REQUEST_SUBMITTED)) || 
+   (!(midQ->midState == MID_REQUEST_SUBMITTED)) || 
time_after(jiffies, curr_timeout) || 
((ses->server->tcpStatus != CifsGood) &&
 (ses->server->tcpStatus != CifsNew)));
 
if (time_after(jiffies, curr_timeout) &&
-   (midQ->midState & MID_REQUEST_SUBMITTED) &&
+   (midQ->midState == MID_REQUEST_SUBMITTED) &&
((ses->server->tcpStatus == CifsGood) ||
 (ses->server->tcpStatus == CifsNew))) {
 
@@ -485,7 +485,7 @@
}
} else {
wait_event(ses->server->response_q,
-   (!(midQ->midState & MID_REQUEST_SUBMITTED)) || 
+   (!(midQ->midState == MID_REQUEST_SUBMITTED)) || 
((ses->server->tcpStatus != CifsGood) &&
 (ses->server->tcpStatus != CifsNew)));
}
@@ -749,13 +749,13 @@
for (;;) {
curr_timeout = timeout + jiffies;
wait_event(ses->server->response_q,
-   (!(midQ->midState & MID_REQUEST_SUBMITTED)) || 
+   (!(midQ->midState == MID_REQUEST_SUBMITTED)) || 
time_after(jiffies, curr_timeout) || 
((ses->server->tcpStatus != CifsGood) &&
 (ses->server->tcpStatus != CifsNew)));
 
if (time_after(jiffies, curr_timeout) &&
-   (midQ->midState & MID_REQUEST_SUBMITTED) &&
+   (midQ->midState == MID_REQUEST_SUBMITTED) &&
((ses->server->tcpStatus == CifsGood) ||
 (ses->server->tcpStatus == CifsNew))) {
 
@@ -780,7 +780,7 @@
}
} else {
wait_event(ses->server->response_q,
-   (!(midQ->midState & MID_REQUEST_SUBMITTED)) || 
+   (!(midQ->midState == MID_REQUEST_SUBMITTED)) || 
((ses->server->tcpStatus != CifsGood) &&
 (ses->server->tcpStatus != CifsNew)));
}



svn commit: linux-cifs-client r61 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-07-15 Thread sfrench
Author: sfrench
Date: 2006-07-16 05:07:17 + (Sun, 16 Jul 2006)
New Revision: 61

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=61

Log:
Merge with main git tree

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c
   branches/linux-converged-for-old-kernels/fs/cifs/transport.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/CHANGES
===
--- branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2006-07-16 
04:54:08 UTC (rev 60)
+++ branches/linux-converged-for-old-kernels/fs/cifs/CHANGES2006-07-16 
05:07:17 UTC (rev 61)
@@ -1,3 +1,9 @@
+Version 1.45
+
+Do not time out lockw calls when using posix extensions. Do not
+time out requests if server still responding reasonably fast
+on requests on other threads
+
 Version 1.44
 
 Rewritten sessionsetup support, including support for legacy SMB

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-07-16 
04:54:08 UTC (rev 60)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-07-16 
05:07:17 UTC (rev 61)
@@ -112,5 +112,5 @@
 extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
 extern int cifs_ioctl (struct inode * inode, struct file * filep,
   unsigned int command, unsigned long arg);
-#define CIFS_VERSION   "1.44"
+#define CIFS_VERSION   "1.45"
 #endif /* _CIFSFS_H */

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h 2006-07-16 
04:54:08 UTC (rev 60)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsglob.h 2006-07-16 
05:07:17 UTC (rev 61)
@@ -159,8 +159,8 @@
/* 16th byte of RFC1001 workstation name is always null */
char workstation_RFC1001_name[SERVER_NAME_LEN_WITH_NULL];
__u32 sequence_number; /* needed for CIFS PDU signature */
-   char mac_signing_key[CIFS_SESS_KEY_SIZE + 16]; 
-   unsigned long last_receive_time;
+   char mac_signing_key[CIFS_SESS_KEY_SIZE + 16];
+   unsigned long lstrp; /* when we got last response from this server */
 };
 
 /*

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c  2006-07-16 
04:54:08 UTC (rev 60)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c  2006-07-16 
05:07:17 UTC (rev 61)
@@ -1494,8 +1494,8 @@
char *data_offset;
struct cifs_posix_lock *parm_data;
int rc = 0;
+   int timeout = 0;
int bytes_returned = 0;
-   int timeout = 0;
__u16 params, param_offset, offset, byte_count, count;
 
cFYI(1, ("Posix Lock"));
@@ -1514,7 +1514,6 @@
pSMB->MaxSetupCount = 0;
pSMB->Reserved = 0;
pSMB->Flags = 0;
-   pSMB->Timeout = 0;
pSMB->Reserved2 = 0;
param_offset = offsetof(struct smb_com_transaction2_sfi_req, Fid) - 4;
offset = param_offset + params;
@@ -1542,9 +1541,11 @@
parm_data->lock_type = cpu_to_le16(lock_type);
if(waitFlag) {
timeout = 3;  /* blocking operation, no timeout */
-   pSMB->Timeout = cpu_to_le32(-1);/* blocking - do not time out */
parm_data->lock_flags = cpu_to_le16(1);
-   }
+   pSMB->Timeout = cpu_to_le32(-1);
+   } else
+   pSMB->Timeout = 0;
+
parm_data->pid = cpu_to_le32(current->tgid);
parm_data->start = cpu_to_le64(pLockData->fl_start);
parm_data->length = cpu_to_le64(len);  /* normalize negative numbers */

Modified: branches/linux-converged-for-old-kernels/fs/cifs/connect.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/connect.c  2006-07-16 
04:54:08 UTC (rev 60)
+++ branches/linux-converged-for-old-kernels/fs/cifs/connect.c  2006-07-16 
05:07:17 UTC (rev 61)
@@ -609,10 +609,6 @@
 
task_to_wake = NULL;
spin_lock(&GlobalMid_Lock);
-
-   /* Note when we last received a reply - needed for timeout 
purposes. */
-   server->last_receive_time = jiffies;
-
list_for_each(tmp, &server->pending_mid_q) {
mid_entr

svn commit: linux-cifs-client r60 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-07-15 Thread sfrench
Author: sfrench
Date: 2006-07-16 04:54:08 + (Sun, 16 Jul 2006)
New Revision: 60

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=60

Log:
Merge with mainline git modified jra patch

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES
   branches/linux-2.6-cifs-git-devel/fs/cifs/asn1.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifsglob.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/connect.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/file.c
   branches/linux-2.6-cifs-git-devel/fs/cifs/transport.c


Changeset:
Sorry, the patch is too large (339 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=60


svn commit: linux-cifs-client r58 - in branches: .

2006-07-15 Thread sfrench
Author: sfrench
Date: 2006-07-15 22:05:22 + (Sat, 15 Jul 2006)
New Revision: 58

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=58

Log:
delete obsolete branches of cifs client code - they have been replaced
by cifs-for-older-kernels branch

This line, and those below, will be ignored--

Dlinux-2.6.9-RHEL4
Dlinux-2.6bk
D2.6.8-Suse-Workstation-9.2

Removed:
   branches/2.6.8-Suse-Workstation-9.2/
   branches/linux-2.6.9-RHEL4/
   branches/linux-2.6bk/


Changeset:


  1   2   3   >