[Pkg-samba-maint] r3295 - branches/samba/lenny/debian/patches
vorlon at alioth.debian.org
vorlon at alioth.debian.org
Sat Feb 13 22:57:09 UTC 2010
Author: vorlon
Date: 2010-02-13 22:57:08 +0000 (Sat, 13 Feb 2010)
New Revision: 3295
Modified:
branches/samba/lenny/debian/patches/security-CVE-2009-3297.patch
Log:
and only apply the bits of the patch that are applicable to lenny; most of the
security patch was only needed for regressions introduced upstream post-lenny
Modified: branches/samba/lenny/debian/patches/security-CVE-2009-3297.patch
===================================================================
--- branches/samba/lenny/debian/patches/security-CVE-2009-3297.patch 2010-02-13 22:42:23 UTC (rev 3294)
+++ branches/samba/lenny/debian/patches/security-CVE-2009-3297.patch 2010-02-13 22:57:08 UTC (rev 3295)
@@ -16,73 +16,16 @@
source/client/mount.cifs.c | 34 ++++++++++++++++++++++++++--------
1 files changed, 26 insertions(+), 8 deletions(-)
-diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
-index 794b720..0fbb790 100644
---- a/source/client/mount.cifs.c
-+++ b/source/client/mount.cifs.c
-@@ -179,7 +179,7 @@ check_mountpoint(const char *progname, char *mountpoint)
- struct stat statbuf;
+Index: lenny/source/client/mount.cifs.c
+===================================================================
+--- lenny.orig/source/client/mount.cifs.c
++++ lenny/source/client/mount.cifs.c
+@@ -1363,7 +1363,7 @@
+ /* convert all '\\' to '/' in share portion so that /proc/mounts looks pretty */
+ replace_char(dev_name, '\\', '/', strlen(share_name));
- /* does mountpoint exist and is it a directory? */
-- err = stat(mountpoint, &statbuf);
-+ err = stat(".", &statbuf);
- if (err) {
- fprintf(stderr, "%s: failed to stat %s: %s\n", progname,
- mountpoint, strerror(errno));
-@@ -1384,6 +1384,14 @@ int main(int argc, char ** argv)
- }
-
- /* make sure mountpoint is legit */
-+ rc = chdir(mountpoint);
-+ if (rc) {
-+ fprintf(stderr, "Couldn't chdir to %s: %s\n", mountpoint,
-+ strerror(errno));
-+ rc = EX_USAGE;
-+ goto mount_exit;
-+ }
-+
- rc = check_mountpoint(thisprogram, mountpoint);
- if (rc)
- goto mount_exit;
-@@ -1446,13 +1454,23 @@ int main(int argc, char ** argv)
-
- /* BB save off path and pop after mount returns? */
- resolved_path = (char *)malloc(PATH_MAX+1);
-- if(resolved_path) {
-- /* Note that if we can not canonicalize the name, we get
-- another chance to see if it is valid when we chdir to it */
-- if (realpath(mountpoint, resolved_path)) {
-- mountpoint = resolved_path;
-- }
-+ if (!resolved_path) {
-+ fprintf(stderr, "Unable to allocate memory.\n");
-+ rc = EX_SYSERR;
-+ goto mount_exit;
- }
-+
-+ /* Note that if we can not canonicalize the name, we get
-+ another chance to see if it is valid when we chdir to it */
-+ if(!realpath(".", resolved_path)) {
-+ fprintf(stderr, "Unable to resolve %s to canonical path: %s\n",
-+ mountpoint, strerror(errno));
-+ rc = EX_SYSERR;
-+ goto mount_exit;
-+ }
-+
-+ mountpoint = resolved_path;
-+
- if(got_user == 0) {
- /* Note that the password will not be retrieved from the
- USER env variable (ie user%password form) as there is
-@@ -1586,7 +1604,7 @@ mount_retry:
- if (verboseflag)
- fprintf(stderr, "\n");
-
-- if (!fakemnt && mount(dev_name, mountpoint, "cifs", flags, options)) {
-+ if (!fakemnt && mount(dev_name, ".", "cifs", flags, options)) {
+- if(mount(dev_name, mountpoint, "cifs", flags, options)) {
++ if(mount(dev_name, ".", "cifs", flags, options)) {
+ /* remember to kill daemon on error */
switch (errno) {
- case ECONNREFUSED:
- case EHOSTUNREACH:
---
-1.6.6
-
+ case 0:
More information about the Pkg-samba-maint
mailing list