rpms/vsftpd/devel vsftpd-2.0.5-uniq_rename.patch, NONE, 1.1 vsftpd.spec, 1.59, 1.60 vsftpd-uniq_rename.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Jan 19 12:17:10 UTC 2007


Author: mbarabas

Update of /cvs/dist/rpms/vsftpd/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv27310

Modified Files:
	vsftpd.spec 
Added Files:
	vsftpd-2.0.5-uniq_rename.patch 
Removed Files:
	vsftpd-uniq_rename.patch 
Log Message:
Added lost patch uniq_rename

vsftpd-2.0.5-uniq_rename.patch:
 postlogin.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

--- NEW FILE vsftpd-2.0.5-uniq_rename.patch ---
--- vsftpd-2.0.3/postlogin.c.uniq_rename	2005-03-19 12:15:59.000000000 +0100
+++ vsftpd-2.0.3/postlogin.c	2005-07-18 15:52:20.000000000 +0200
@@ -70,7 +70,7 @@
 static void check_abor(struct vsf_session* p_sess);
 static void handle_sigurg(void* p_private);
 static void handle_upload_common(struct vsf_session* p_sess, int is_append,
-                                 int is_unique);
+                                 int is_unique, int uniq_rename);
 static void get_unique_filename(struct mystr* p_outstr,
                                 const struct mystr* p_base);
 static int data_transfer_checks_ok(struct vsf_session* p_sess);
@@ -931,11 +931,11 @@
 static void
 handle_stor(struct vsf_session* p_sess)
 {
-  handle_upload_common(p_sess, 0, 0);
+  handle_upload_common(p_sess, 0, 0, 1);
 }
 
 static void
-handle_upload_common(struct vsf_session* p_sess, int is_append, int is_unique)
+handle_upload_common(struct vsf_session* p_sess, int is_append, int is_unique, int uniq_rename)
 {
   static struct mystr s_filename;
   struct mystr* p_filename;
@@ -952,6 +952,12 @@
   p_filename = &p_sess->ftp_arg_str;
   if (is_unique)
   {
+    if (uniq_rename)
+ 		if (!vsf_access_check_file(p_filename)) 
+		{
+        	vsf_cmdio_write(p_sess, FTP_NOPERM, "Permission denied.");
+	  		return;
+		}
     get_unique_filename(&s_filename, p_filename);
     p_filename = &s_filename;
   }
@@ -1057,6 +1063,14 @@
   port_cleanup(p_sess);
   pasv_cleanup(p_sess);
   vsf_sysutil_close(new_file_fd);
+  if (is_unique && uniq_rename)
+  /* NOTE - might overwrite destination file. Not a concern because the same
+   * could be accomplished with DELE.
+   */
+  {
+	printf("I'm here\n");//vsf_cmdio_write(p_sess, FTP_TRANSFEROK, "IM HERE.");
+  	str_rename(p_filename, &p_sess->ftp_arg_str);
+  }
 }
 
 static void
@@ -1477,7 +1491,7 @@
 static void
 handle_appe(struct vsf_session* p_sess)
 {
-  handle_upload_common(p_sess, 1, 0);
+  handle_upload_common(p_sess, 1, 0, 0);
 }
 
 static void
@@ -1655,7 +1669,7 @@
 static void
 handle_stou(struct vsf_session* p_sess)
 {
-  handle_upload_common(p_sess, 0, 1);
+  handle_upload_common(p_sess, 0, 1, 0);
 }
 
 static void
@@ -1804,4 +1818,3 @@
     }
   }
 }
-


Index: vsftpd.spec
===================================================================
RCS file: /cvs/dist/rpms/vsftpd/devel/vsftpd.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- vsftpd.spec	18 Jan 2007 09:07:07 -0000	1.59
+++ vsftpd.spec	19 Jan 2007 12:17:08 -0000	1.60
@@ -3,7 +3,7 @@
 Summary: vsftpd - Very Secure Ftp Daemon
 Name: vsftpd
 Version: 2.0.5
-Release: 12%{?dist}
+Release: 13%{?dist}
 License: GPL
 Group: System Environment/Daemons
 URL: http://vsftpd.beasts.org/
@@ -39,6 +39,7 @@
 Patch24: vsftpd-2.0.5-file_stat.patch
 Patch25: vsftpd-2.0.5-confspell.patch
 Patch26: vsftpd-2.0.5-bind_denied.patch
+Patch27: vsftpd-2.0.5-uniq_rename.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 %if %{tcp_wrappers}
@@ -92,6 +93,7 @@
 %patch24 -p1 -b .file_stat
 %patch25 -p1
 %patch26 -p1 -b .bind_denied
+%patch27 -p1 -b .uniq_rename
 
 %build
 %ifarch s390x
@@ -150,6 +152,10 @@
 /var/ftp
 
 %changelog
+* Fri Jan 19 2007 Maros Barabas <mbarabas at redhat.com> - 2.0.5-13
+- add lost patch: don't die when no user config file is present 
+- Resolves #166986
+
 * Thu Jan 18 2007 Radek Vokál <rvokal at redhat.com> - 2.0.5-12
 - add dist tag
 - add buildrequires tcp_wrappers-devel


--- vsftpd-uniq_rename.patch DELETED ---




More information about the fedora-cvs-commits mailing list