Commit Graph

125 Commits

Author SHA1 Message Date
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
tron 16ff83dd36 FUSE seems to allow short writes without errors but PUFFS doesn't. Work
around this by returning ENOSPC in case of a short write to avoid protocol
errors. This change is based on problem analysis provided by Antti Kantee.

This fixes PR lib/45129 by myself.
2012-12-30 10:04:22 +00:00
matt fa835e8c8b These directories default to WARNS?=5 2012-03-21 05:37:42 +00:00
manu a1beaff4aa Set eofflag in puffs_fuse_node_readdir() from librefuse.
From Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:56:22 +00:00
tron c15a9046d9 Call the FUSE init operation before we try to access the file-system.
This prevents a crash in "fuse_ext2" which I previously worked around
with a patch.
2011-07-09 17:16:46 +00:00
tron d606648b9f Don't ignore "userdata" argument in "fuse_main_real". This can crash
a FUSE file-system that passes a non-NULL argument here.
2011-07-09 14:50:00 +00:00
soda fd45f5444a fuse_opt_parse() was using uninitialized struct fuse_opt_option::data,
this bug made fuse_opt_proc_t not work, if it used first ``data'' argument,
and might cause memory corruption even.
2011-03-01 11:23:42 +00:00
pooka 0eb828b571 bump major of libs NEEDING libpuffs 2010-05-21 10:53:41 +00:00
christos 0852251407 PR/41250: David H. Gutteridge: librefuse fuse_opt.h header doesn't accommodate
C++ compilation
2009-04-19 22:25:29 +00:00
msaitoh 16ed711ed3 fix typo (s/stucture/structure/) 2009-03-05 01:21:57 +00:00
lukem db4cbbf2f6 sign-compare fix 2009-01-26 04:00:40 +00:00
lukem 6bb2880ee0 fix -Wsign-compare issue 2009-01-19 09:56:06 +00:00
christos 46edb91e9f bump shared libraries. 2009-01-11 03:07:47 +00:00
dillo 2a16dc1a4e Add API version 2.6 variant of fuse_setup.
Reviewed by agc.
2008-08-01 15:54:09 +00:00
pooka 86499e8154 Remove puffs_ops from fuse_operations, no reason for it to be there. 2008-01-14 20:46:11 +00:00
pooka aa3b40df48 return -ret from statfs 2008-01-14 16:07:00 +00:00
pooka cb36cc5493 Uncommit accidentally committed PUFFS_FLAG_OPDUMP.
overextensive library verbosity noticed by riz
2007-12-27 11:39:06 +00:00
xtraeme c747551b64 puffs_fuse_node_create: if create() is specified set S_IFREG explicitly
to avoid passing unspecified mode. Fixes latest ntfs-3g... patch
from pooka tested by myself.
2007-12-12 16:37:56 +00:00
pooka 21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
pooka 6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
pooka 6b61e56541 I've written more than a fair share of this to see my name up in
lights.  Wine & women, come to me now!
2007-11-08 17:08:46 +00:00
pooka 4b0f2948e2 Pull the daemonizing code out of the library mainloop into the file
servers.  Calling daemon() (i.e. fork()ing) inside a library can
cause nice surprises for e.g. threaded programs.  As discussed with
Greg Oster & others.
2007-11-05 17:48:17 +00:00
pooka 02a45a4a7c Header cleanup: don't need defs.h to do a few includes for us. Also,
use #include <> for global headers instead of #include "".
2007-11-05 13:41:52 +00:00
pooka 8f078f842e * Fix pthread key creation to depend on if it hasn't been created before
instead of depending if a lock was succesfully acquired.  Also, add
  a comment explaining why it is such complex (for all I could guess).
* replace err()'s with abort()
* replace some abort()'s by returning failure
2007-11-05 13:38:27 +00:00
pooka 9038ffc17c Use puffs prepost ops for setting pid/lwpid instead of separate
calls in all methods.
2007-10-28 18:41:54 +00:00
pooka e955e253d7 revert 1.77, MULTITHREADED_REFUSE has problems 2007-10-23 17:19:19 +00:00
pooka c683f6f6b5 Get rid of MULTITHREADED_REFUSE for context queries. We can simply
use the pthread codepaths always.
2007-10-21 16:46:52 +00:00
pooka a3e1355fe5 Use new puffs features to provide correct caller info instead of
sometimes returning stale data.
2007-10-21 14:36:35 +00:00
xtraeme 8b2678bd7e Use a two clause license for all the code I contributed.
The envsys code will be changed later.
2007-10-06 07:21:02 +00:00
pooka 12e401bc1a Add refuse paper to SEE ALSO 2007-09-24 00:22:25 +00:00
pooka ec5345d9bc Now that we don't dump operations by default, might as well detach
from the console by default also.  (but still would be nice if someone
provided options to toggle these using the fuse options framework)
2007-08-25 12:03:59 +00:00
pooka 306d09812c In case a file system doesn't provide st_blksize, default to DEV_BSIZE. 2007-08-12 15:32:39 +00:00
pooka d8a510556e get rid of DBG= 2007-07-18 22:38:58 +00:00
pooka ff87a004d6 Don't stay on the foreground and dump operations by default.
XXX: someone(tm) should make it possible to set PUFFS_OPFLAG_DUMP
using the fuse options framework
2007-07-18 22:05:41 +00:00
pooka 08db7d7534 * add mntfromname parameter to puffs_init()
* set it in file servers
2007-07-17 11:34:51 +00:00
pooka 6596e0c995 adapt: **newnode etc. pointers -> struct puffs_newinfo 2007-07-01 18:40:15 +00:00
pooka fe7bbdec69 adapt: pid -> const struct puffs_cid * 2007-07-01 17:23:44 +00:00
pooka 1776bc7796 adapt: pcn->pcn_cred is now a pointer 2007-07-01 15:32:02 +00:00
pooka 53a4105885 Actually, keep PUFFS_KFLAG_NOCACHE and -o cache around as shorthand
to neither page- nor namecache.
2007-06-24 22:25:49 +00:00
pooka 5662e7f720 PUFFS_KFLAG_NOCACHE became two, so introduce the command line options
-o nonamecache and -o nopagecache and adapt file systems where necessary.
2007-06-24 22:18:38 +00:00
agc 8ff3509ad4 Use pthread_[gs]etspecific to store a pointer to the fuse_context
information, enabled if MULTITHREADED_REFUSE is defined at build
time. This is not enabled by default since libpuffs is not
threadsafe yet.

librefuse is still not threadsafe, but this gets rid of a whole lot of
problems in the meantime.
2007-06-12 18:57:05 +00:00
agc 8dda7dd1f3 Minor cleanup - change uses of malloc, memset to calloc.
Use EXIT_FAILURE in preference to the less informational 1.
2007-06-12 18:54:36 +00:00
agc e19f0cc8f0 Re-work the way the SET_FUSE_CONTEXT* macros are done, following
feedback from Antti.
2007-06-12 18:53:29 +00:00
agc e9dcd39bdb # use puffs_cred_getuid(3) and puffs_cred_getgid(3)
for i in `jot 100 1`; do
	echo "I must respect the abstractions which pooka put in puffs_cred(3)"
done
2007-06-11 20:54:33 +00:00
agc 2f101ca796 Set the uid, gid and pid wherever possible (i.e. where known). This gets
us far enough along that fuse-loggedfs now works with the correct command,
uid and gid being displayed.
2007-06-11 20:10:00 +00:00
wiz cd4aa9ff37 Make Nm match Dt. This makes it easier to guess what the man page is
called when you find it with man -k.
2007-06-09 10:16:25 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
agc 9cdcc01daf After we've malloc'd an area of storage, zero out this storage, "just in
case".
2007-05-24 00:55:57 +00:00
pooka 6a3281d2da Calling puffs_exit() in fuse_{exit,unmount}() is wrong, as those
shouldn't release resources.  As a quick hack to prevent double
frees etc, introduce "dead" variable into fuse channel to signal
if the backing puffs resource was already freed.  XXX: the check
is only in exit/unmount currently.

Proper fix really depends on some puffs features I still haven't
gotten around to doing.
2007-05-17 21:28:12 +00:00