Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158123 Details for
Bug 244686
Uploaded files are created with wrong perms in vsftpd 1.2.1-3E.12
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Updated replacement for upload_perms patch
vsftpd-1.2.1-upload_perms.patch (text/plain), 3.06 KB, created by
Martin Poole
on 2007-06-28 13:40:55 UTC
(
hide
)
Description:
Updated replacement for upload_perms patch
Filename:
MIME Type:
Creator:
Martin Poole
Created:
2007-06-28 13:40:55 UTC
Size:
3.06 KB
patch
obsolete
>--- vsftpd-1.2.1/sysstr.h.rewrite_perms 2002-12-10 00:52:11.000000000 +0000 >+++ vsftpd-1.2.1/sysstr.h 2007-06-28 14:18:26.000000000 +0100 >@@ -24,6 +24,8 @@ > int str_create(const struct mystr* p_str); > int str_create_overwrite(const struct mystr* p_str); > int str_chmod(const struct mystr* p_str, unsigned int mode); >+int str_stat_chmod(const struct mystr* p_str, >+ const struct vsf_sysutil_statbuf* p_statbuf); > int str_stat(const struct mystr* p_str, struct vsf_sysutil_statbuf** p_ptr); > int str_lstat(const struct mystr* p_str, struct vsf_sysutil_statbuf** p_ptr); > int str_rename(const struct mystr* p_from_str, const struct mystr* p_to_str); >--- vsftpd-1.2.1/postlogin.c.rewrite_perms 2007-06-28 14:18:26.000000000 +0100 >+++ vsftpd-1.2.1/postlogin.c 2007-06-28 14:25:10.000000000 +0100 >@@ -965,6 +965,17 @@ > return; > } > >+ if ( !is_unique ) >+ { >+ new_file_fd = str_create_overwrite(p_filename); >+ if ( vsf_sysutil_retval_is_error(new_file_fd) ) >+ { >+ vsf_cmdio_write(p_sess, FTP_UPLOADFAIL, "Could not create file."); >+ return; >+ } >+ close(new_file_fd); >+ } >+ > if (exist == 0 || is_unique) > { > /* File exists or STOU - make unique file */ >@@ -1066,10 +1077,13 @@ > pasv_cleanup(p_sess); > vsf_sysutil_close(new_file_fd); > if (exist == 0 && retval == 0) >+ { > /* NOTE - might overwrite destination file. Not a concern because the same > * could be accomplished with DELE. > */ > retval = str_rename(p_filename, &p_sess->ftp_arg_str); >+ retval = str_stat_chmod( &p_sess->ftp_arg_str, p_statbuf ); >+ } > } > > static void >--- vsftpd-1.2.1/sysstr.c.rewrite_perms 2002-12-10 00:52:00.000000000 +0000 >+++ vsftpd-1.2.1/sysstr.c 2007-06-28 14:18:26.000000000 +0100 >@@ -118,6 +118,13 @@ > } > > int >+str_stat_chmod( const struct mystr* p_str, >+ const struct vsf_sysutil_statbuf* p_statbuf) >+{ >+ return vsf_sysutil_stat_chmod(str_getbuf(p_str), p_statbuf); >+} >+ >+int > str_rename(const struct mystr* p_from_str, const struct mystr* p_to_str) > { > return vsf_sysutil_rename(str_getbuf(p_from_str), str_getbuf(p_to_str)); >--- vsftpd-1.2.1/sysutil.h.rewrite_perms 2003-11-05 03:33:52.000000000 +0000 >+++ vsftpd-1.2.1/sysutil.h 2007-06-28 14:18:26.000000000 +0100 >@@ -136,6 +136,9 @@ > int vsf_sysutil_readlink(const char* p_filename, char* p_dest, > unsigned int bufsiz); > >+int vsf_sysutil_stat_chmod(const char* p_filename, >+ const struct vsf_sysutil_statbuf* p_statbuf); >+ > /* Get an exclusive lock, and blocks */ > int vsf_sysutil_lock_file(int fd); > void vsf_sysutil_unlock_file(int fd); >--- vsftpd-1.2.1/sysutil.c.rewrite_perms 2007-06-28 14:18:26.000000000 +0100 >+++ vsftpd-1.2.1/sysutil.c 2007-06-28 14:18:26.000000000 +0100 >@@ -1435,6 +1435,15 @@ > } > > int >+vsf_sysutil_stat_chmod( const char* p_filename, >+ const struct vsf_sysutil_statbuf* p_statbuf) >+{ >+ const struct stat* stat = (const struct stat*) p_statbuf; >+ unsigned int mode = stat->st_mode & 0777; >+ return chmod( p_filename, mode); >+} >+ >+int > vsf_sysutil_lock_file(int fd) > { > struct flock the_lock;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244686
:
158105
|
158110
|
158111
|
158117
| 158123