Commit Graph

91 Commits

Author SHA1 Message Date
mooredan@suncup.net
41cf008523 Added command line option for debug (-d or --debug)
Sending DEBUG messages to syslog is off by default.
-d (or --debug) enables DEBUG messages to go to
syslog

Additionally, if an additional -d command line option
is given, then the -d option is passed to FUSE, upon
which FUSE outputs debug messages to STDOUT

resolves issue #120



git-svn-id: http://s3fs.googlecode.com/svn/trunk@235 df820570-a93a-0410-bd06-b72b767a4274
2010-11-12 23:18:39 +00:00
mooredan@suncup.net
b6768464af A couple of small changes to the check collateral:
- The script was looking for /root/.passwd-s3fs on my debian
machine (it worked correctly on Ubuntu). Fixed the common.sh
file to always look in the SUDO_USER's home directory

- Added the passwd_file option to the s3fs command. Since the
test runs as root, the $SUDO_USER's password file wasn't
being looked for by the program itself. Instead the normal
precedence was being followed and the /etc/passwd-s3fs file
was being used.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@234 df820570-a93a-0410-bd06-b72b767a4274
2010-11-11 21:07:45 +00:00
mooredan@suncup.net
c0ca9dd0c3 Fixed issue #123 - Check permissions on password file used
If any password file is used, regardless if it is specified
on the command line, ~/.passwd-s3fs or /etc/passwd-s3fs it
is checked for appropriate permissions.

No password file is allowed to have any others permissions

Only the /etc/passwd-s3fs file is allowed to have any
group permissions, all others are not allowed to have
any group permissions.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@233 df820570-a93a-0410-bd06-b72b767a4274
2010-11-11 05:14:16 +00:00
apetresc
ec822185da Usability improvement: use the ${SUDO_USER} environment provided by sudo to create the bucket based on the user who invoked the test using sudo. Much better this way.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@232 df820570-a93a-0410-bd06-b72b767a4274
2010-11-09 07:22:30 +00:00
apetresc
ac294bc885 Making the test bucket be based on ${USER}. This requires the bucket to already exist. S3FS doesn't report an error when mounting if it doesn't exist, so the test fails strangely in such cases.
The correct way to solve this is to consistently faily when mounting. Also offer a flag to forcefully create the bucket if it doesn't yet exist.


git-svn-id: http://s3fs.googlecode.com/svn/trunk@231 df820570-a93a-0410-bd06-b72b767a4274
2010-11-09 07:13:30 +00:00
apetresc
3022b87738 Added a simple integration test, and properly integrated it with autotools.
To run integration tests, just use: sudo make check
This will give you a report of all passes and failures.

To add an integration test, just add it to the TESTS variable in s3fs/test/Makefile.am
Make sure your test sources integration-test-common.sh and require-root.sh

Having many of these for every feature will help us avoid regressions and develop with confidence.


git-svn-id: http://s3fs.googlecode.com/svn/trunk@230 df820570-a93a-0410-bd06-b72b767a4274
2010-11-09 07:04:47 +00:00
mooredan@suncup.net
cc2e440276 Revamped the read_passwd_file function to resolve issue #114
Add support for mulitple access id/secret access keys in passwd-s3fs file

This change applies to any passwd-s3fs files.

The format of the file is more robust, error checked and extended:

  - as before, any line beginning with # is ignored
  - any empty line is ignored
  - any non-ignored line which contains a space or tab is an error
  - any non-ignored line which does not contain a : separator is an error
  
The format of the file is:

[bucket:]AccessKeyId:SecretAccessKey

The bucket can now be specified to allow for multiple credentials.
A default entry is as before:

AccessKeyId:SecretAccessKey

Only one default entry is allowed, if more than one default entry
is found, that is an error.  A default entry is not required, if the
bucket that is being mounted has its own entry.

If the user's .passwd-s3fs file is present but credentials cannot
be determined from it, then the system-wide /etc/passwd-s3fs will
be consulted (if readable by the current user).

This change is completely backward compatable with the existing
scheme and has been well tested.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@229 df820570-a93a-0410-bd06-b72b767a4274
2010-11-08 03:42:16 +00:00
mooredan@suncup.net
a80c900894 Fixes for several issues:
Issue #102 --help command line 
Issue #107 command line checking and other error checking
Issue #112 uses getopt_long now, but FUSE's own parser is still there
           some command line checking is split between main() and the
           helper function
Issue #117 command line option for credentials file
Issue #118 use of environment variables for credentials
Issue #119 support for a local passwd-s3fs file

Big checkin, many new lines of code.  

Comand line option checking is now more robust and does quite
a bit of error checking before handing the mount off to FUSE.

Cleaned up the code and made several new functions from
existing code

Many ways to supply credentials now and there is a precedance
order followed.

--help is helpful




git-svn-id: http://s3fs.googlecode.com/svn/trunk@227 df820570-a93a-0410-bd06-b72b767a4274
2010-11-07 01:39:30 +00:00
mooredan@suncup.net
08a611217a Reduced minimum versions for fuse and libxml-2
Resolves issue #110 - see issue for more details



git-svn-id: http://s3fs.googlecode.com/svn/trunk@223 df820570-a93a-0410-bd06-b72b767a4274
2010-10-30 02:32:49 +00:00
mooredan@suncup.net
ef630253d6 Added support for anonymously mounting a public bucket.
If the "public_bucket=1" option is used, then
the command line options for Access Key ID and
Secret Access Key are ignored as well as the
/etc/passwd-s3fs file

Internally, the "Authorization: AWS ..." header
line is not included in the header.

Tested on a public bucket and it appears to work.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@221 df820570-a93a-0410-bd06-b72b767a4274
2010-10-29 03:25:06 +00:00
apetresc
28e56b759d Updated the README to reflect the new compilation method.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@220 df820570-a93a-0410-bd06-b72b767a4274
2010-10-25 19:58:59 +00:00
mooredan@suncup.net
bf06d02536 Added autom4te.cache to svn ignore list
Incremented the release version number


git-svn-id: http://s3fs.googlecode.com/svn/trunk@219 df820570-a93a-0410-bd06-b72b767a4274
2010-10-25 05:06:58 +00:00
mooredan@suncup.net
6eb6b1e238 M s3fs/src/s3fs.cpp
=========================
Removed extra space in the message emitted by --version


M    s3fs/src/Makefile.am
==========================
Added the .h files to the s3fs_SOURCES. These files
were not being included in the .tar.gz file when
"make dist" was being executed.  This was sourced
as an error with the "make distcheck" target.




git-svn-id: http://s3fs.googlecode.com/svn/trunk@217 df820570-a93a-0410-bd06-b72b767a4274
2010-10-24 22:23:09 +00:00
apetresc
184a31d676 Factored out purely string-based operations into string_util
git-svn-id: http://s3fs.googlecode.com/svn/trunk@216 df820570-a93a-0410-bd06-b72b767a4274
2010-10-24 09:36:50 +00:00
apetresc
22f260e582 Beginning the refactoring my making the first separation of s3fs.cpp into s3fs.h. Many further divisions along logical boundaries will be coming soon.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@215 df820570-a93a-0410-bd06-b72b767a4274
2010-10-24 08:32:15 +00:00
mooredan@suncup.net
4dd73defab Fixed issue #19 added a --version switch
Used the compile time VERSION define
Version message conforms to GNU Coding Standards


git-svn-id: http://s3fs.googlecode.com/svn/trunk@213 df820570-a93a-0410-bd06-b72b767a4274
2010-10-21 14:23:43 +00:00
mooredan@suncup.net
0d130efe60 A bit more cleanup of the directory.
readme.txt has been moved to README

removal of Eclipse CDT project files


git-svn-id: http://s3fs.googlecode.com/svn/trunk@212 df820570-a93a-0410-bd06-b72b767a4274
2010-10-21 00:05:53 +00:00
apetresc
8e2652b233 Code reformatting so it conforms to the Google C++ style guide. I chose that one because it's generally-accepted, but any style guide is okay with me. The important thing is to no longer have the random assortment of formatting that was there before.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@211 df820570-a93a-0410-bd06-b72b767a4274
2010-10-20 07:08:50 +00:00
apetresc
a15b72145e Converting to Autotools.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@209 df820570-a93a-0410-bd06-b72b767a4274
2010-10-20 06:06:09 +00:00
mooredan@suncup.net
cb85e65591 Fixed issue #101 - mv (rename) does not update the
Content-Type metadata if the file extension changes 



git-svn-id: http://s3fs.googlecode.com/svn/trunk@208 df820570-a93a-0410-bd06-b72b767a4274
2010-10-20 02:54:01 +00:00
mooredan@suncup.net
9708cdb629 Incorporated most of the changes outlined in issue #52
This is probably wasted work though since issue #99
is going to get the build process on autotools.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@207 df820570-a93a-0410-bd06-b72b767a4274
2010-10-19 16:13:15 +00:00
mooredan@suncup.net
dbd990842b Corrected omission of word source in the dist target
git-svn-id: http://s3fs.googlecode.com/svn/trunk@206 df820570-a93a-0410-bd06-b72b767a4274
2010-10-19 15:30:04 +00:00
mooredan@suncup.net
388dbdd04f Add svn-r*.tar.gz to files to be ignored
Tricky way to generate the distribution tar.gz file
before the autotools way is implemented



git-svn-id: http://s3fs.googlecode.com/svn/trunk@204 df820570-a93a-0410-bd06-b72b767a4274
2010-10-19 05:05:59 +00:00
mooredan@suncup.net
05bc0fb42b Resolves issue #98 - s3fs fails silently for bucket with
upper case letters.

Research shows that many S3 tools do not support buckets whose
names contain uppercase characters -- s3fs appears to be no
different.  However, s3fs allows a bucket of this type to be
mounted even though access to it results in a "Input/output error"

Rather than put support in for these buckets, it's easier to
inform the user of the offending bucket name and die.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@203 df820570-a93a-0410-bd06-b72b767a4274
2010-10-19 03:23:43 +00:00
mooredan@suncup.net
788a4ff542 Fixes issue #85 and issue #55
Duplicated issue and confirm that supplied patch
resolves this issue.


git-svn-id: http://s3fs.googlecode.com/svn/trunk@202 df820570-a93a-0410-bd06-b72b767a4274
2010-10-19 01:58:33 +00:00
mooredan@suncup.net
ee3094148f Fix issue #56 : ghost folders rmdir a non-empty directory now fails as it should
git-svn-id: http://s3fs.googlecode.com/svn/trunk@201 df820570-a93a-0410-bd06-b72b767a4274
2010-10-19 01:40:18 +00:00
mooredan@suncup.net
4a04bd2764 Fixed issue #89 - Support for Reduced Redundancy with a patch from
chregu's code stream

Tested the use_rrs=1 option and confirmed that the files in the
bucket are being tagged as using RRS through Amazon's AWS cockpit



git-svn-id: http://s3fs.googlecode.com/svn/trunk@200 df820570-a93a-0410-bd06-b72b767a4274
2010-10-18 22:35:14 +00:00
mooredan@suncup.net
b578777851 made the Makefile to be more "make-like", instead
of compiling unconditionally at every invocation of
make - actually look at the dependancy


git-svn-id: http://s3fs.googlecode.com/svn/trunk@199 df820570-a93a-0410-bd06-b72b767a4274
2010-10-18 22:22:57 +00:00
mooredan@suncup.net
7a9ddf4df4 Fixed issue #72 - rsync to s3fs mount defaults to application/octet-stream
Applied supplied patch.  

The patch solves this issue by modifying the lookupMimeType function to not only 
analyze the last extension for a matching mime type, but analyze the second 
to last extension if the last extension did not result in a match.



git-svn-id: http://s3fs.googlecode.com/svn/trunk@198 df820570-a93a-0410-bd06-b72b767a4274
2010-10-18 21:29:16 +00:00
mooredan@suncup.net
b792abb702 Fixed issue # 82 - Warnings during build
Applied supplied patch


git-svn-id: http://s3fs.googlecode.com/svn/trunk@197 df820570-a93a-0410-bd06-b72b767a4274
2010-10-18 21:16:08 +00:00
mooredan@suncup.net
ca547530f8 Fix issue #66 "memset typo" with supplied patch
git-svn-id: http://s3fs.googlecode.com/svn/trunk@195 df820570-a93a-0410-bd06-b72b767a4274
2010-10-18 20:54:42 +00:00
mooredan@suncup.net
6ccbc134c6 Removed compiled binary from revision control.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@194 df820570-a93a-0410-bd06-b72b767a4274
2010-10-18 20:32:07 +00:00
rrizun
abab090301 merged in eu bucket changes from http://github.com/tractis/s3fs-fork
git-svn-id: http://s3fs.googlecode.com/svn/trunk@191 df820570-a93a-0410-bd06-b72b767a4274
2010-02-05 00:45:55 +00:00
rrizun
e6c737a567 git-svn-id: http://s3fs.googlecode.com/svn/trunk@189 df820570-a93a-0410-bd06-b72b767a4274 2010-01-12 00:55:14 +00:00
rrizun
ecb9efa5fa applied eucalyptus patch http://open.eucalyptus.com/wiki/s3fs
git-svn-id: http://s3fs.googlecode.com/svn/trunk@188 df820570-a93a-0410-bd06-b72b767a4274
2010-01-12 00:54:03 +00:00
rrizun
eadd2b17f8 git-svn-id: http://s3fs.googlecode.com/svn/trunk@187 df820570-a93a-0410-bd06-b72b767a4274 2009-12-01 02:50:15 +00:00
rrizun
7f44820fbd GNU build system
git-svn-id: http://s3fs.googlecode.com/svn/trunk@186 df820570-a93a-0410-bd06-b72b767a4274
2009-12-01 02:44:24 +00:00
rrizun
f3549de9d8 fixed stale curl handle bug; fixed 100% cpu bug
git-svn-id: http://s3fs.googlecode.com/svn/trunk@177 df820570-a93a-0410-bd06-b72b767a4274
2008-08-10 22:51:27 +00:00
rrizun
a2d7ad4225 compare mime types w/strcasecmp
git-svn-id: http://s3fs.googlecode.com/svn/trunk@166 df820570-a93a-0410-bd06-b72b767a4274
2008-05-19 17:24:25 +00:00
rrizun
66887436b5 symlinks!
git-svn-id: http://s3fs.googlecode.com/svn/trunk@152 df820570-a93a-0410-bd06-b72b767a4274
2008-05-08 23:30:37 +00:00
rrizun
9421d6b1ef use /etc/mime.types
git-svn-id: http://s3fs.googlecode.com/svn/trunk@151 df820570-a93a-0410-bd06-b72b767a4274
2008-05-08 22:42:53 +00:00
rrizun
483efff920 checkpoint: numeric uid/gid
git-svn-id: http://s3fs.googlecode.com/svn/trunk@150 df820570-a93a-0410-bd06-b72b767a4274
2008-05-04 22:14:56 +00:00
rrizun
de1cad6083 checkpoint: use x-amz-copy-source
git-svn-id: http://s3fs.googlecode.com/svn/trunk@149 df820570-a93a-0410-bd06-b72b767a4274
2008-05-04 21:10:21 +00:00
rrizun
5c96ee4563 svn keyword substitution
git-svn-id: http://s3fs.googlecode.com/svn/trunk@145 df820570-a93a-0410-bd06-b72b767a4274
2008-04-27 19:27:37 +00:00
rrizun
c826ed6387 svn id
git-svn-id: http://s3fs.googlecode.com/svn/trunk@143 df820570-a93a-0410-bd06-b72b767a4274
2008-04-27 19:17:49 +00:00
rrizun
0fd020bbdd svn id
git-svn-id: http://s3fs.googlecode.com/svn/trunk@142 df820570-a93a-0410-bd06-b72b767a4274
2008-04-27 19:13:08 +00:00
rrizun
ad28a23076 added configurable url
git-svn-id: http://s3fs.googlecode.com/svn/trunk@141 df820570-a93a-0410-bd06-b72b767a4274
2008-04-27 18:49:57 +00:00
rrizun
3f0c66f7a0 readwrite_timeout
git-svn-id: http://s3fs.googlecode.com/svn/trunk@138 df820570-a93a-0410-bd06-b72b767a4274
2008-04-16 01:50:09 +00:00
rrizun
7207948462 connect_timeout and read_write_timeout
git-svn-id: http://s3fs.googlecode.com/svn/trunk@136 df820570-a93a-0410-bd06-b72b767a4274
2008-04-16 01:48:02 +00:00
rrizun
271ccf0757 issue 14: fixed local file cache bug
git-svn-id: http://s3fs.googlecode.com/svn/trunk@130 df820570-a93a-0410-bd06-b72b767a4274
2008-04-02 00:28:00 +00:00