Commit Graph

131 Commits

Author SHA1 Message Date
rillig dd57c37d01 mount_portal: fix lint warnings about extern and empty declarations 2023-04-04 20:39:36 +00:00
mrg 5132a436cc properly terminate a buffer after strncpy(). 2021-04-12 09:18:14 +00:00
msaitoh 8012ca3f0e Remove extra semicolon. 2020-05-14 08:34:17 +00:00
gutteridge b849d2c572 rfilter.2: fix a typo
Reported by Andrius V in PR kern/54889.
2020-03-22 23:24:08 +00:00
kre fe6f1f01c1 PR bin/54222
Don't use portal_node_reclaim() inappropriately.   It frees data we
did not allocate, but which might have been allocated by someone else.

While here, various other cleanups (avoid losing fd's if fork fails,
don't compose mangled st_mode S_IFMT values - puffs or's in what it
thinks is correct to the value we set, one case I saw was producing
0110600 for the mode, the 011 isn't any defined type at all - I'd
never seen ls print a '?' as the first char of ls -l output before!

This is still not really correct, but is I believe, better than before.
2019-05-23 11:13:17 +00:00
wiz 7a2e675187 Remove superfluous Pp. 2019-05-23 09:15:45 +00:00
kre 4ab11b0d22 Better handling of comments in portal.conf ... # now only introduces
a comment at beginning of line, or after whitespace.   This allows #
to be used as data otherwhere in the line (there is no escape mechanism).
2019-05-23 04:34:25 +00:00
kre de0c485250 KNF: blank lines after declarations, return (x) -> return x, and
eliminate spaces between cast and value being cast (most were OK already)
NFCI.
2019-05-23 02:39:06 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
christos f82096efe2 We need to provide a size for getattr for the cp example to work, so cheat
and use fstat() to do it instead of libpuffs.
2017-05-10 16:35:18 +00:00
christos cc50bb7aa6 set only the effective user id to the user id of the requesting user so that
we can go back to the original uid later.
2017-05-10 13:58:25 +00:00
kamil 33078560c6 Minor and non-functional enhancements in mount_portal(8)
Since day0 pt_exec.c shipped with a dummy stub for "exec" operation, stop
waiting longer and eliminate it now. This functionality can be achieved
with filters.

Drop FreeBSD CVS repos references. There are certainly still some mirrors
or old mirrors available, but since the project moved to SVN+GIT entirely
drop it.

Add CVS Id - where missing - to the documentation files. This helps users
to determine how recent are the files.
2017-05-09 23:26:49 +00:00
kamil 53e8e965f1 Sync example portal.conf with reality
Since day0 nobody implemented pipe, tcplisten, exec modes - eliminate them.
2017-05-09 21:42:35 +00:00
christos ab25bee7cd prevent hang on vnode EOF. 2017-05-09 21:17:54 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
christos 3e4993b396 fix unused variable warnings. 2013-10-19 01:09:58 +00:00
christos d6532d627c include the headers that you need. 2012-11-04 22:30:23 +00:00
matt cf7ed4c9cc Convert to C89 function definitions 2012-03-20 18:50:30 +00:00
riastradh dade315727 Fix error reporting in puffs_framev_enqueue_waitevent and callers.
ok christos
2011-12-19 15:36:26 +00:00
joerg baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
christos 7d4b82edad document non-literal strings 2011-08-14 11:34:11 +00:00
wiz c3ffe691ad Use pclose for popened handles. Found by cppcheck. 2011-01-04 23:36:23 +00:00
pooka 0f5249be8d Use CMSG_SPACE() for buffer when receiving file descriptors.
Doesn't break i386 and might be better for sparc64.
2009-12-19 16:01:25 +00:00
pooka a9b5fcccfc Note conversion to puffs for the kernel driver. 2009-12-05 20:34:28 +00:00
pooka 3b4bfde519 use puffs_cookie_t. no functional change. 2009-12-05 20:29:19 +00:00
pooka 8dec10527a Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
(missed new file in change batch)
2009-12-05 20:25:32 +00:00
pooka 70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00
lukem 8e2fe69844 fix sign-compare issues 2009-04-11 07:31:21 +00:00
lukem 6543a91fea Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
pooka 704e075311 Make all mount(2) return value error checks against -1. Some file
systems just checked != 0, breaking MNT_GETARGS.  Others worked with < 0,
but make them check against -1 too for consistency.  And sprinkle some
stylish line wrapping where appropriate.
2007-07-16 17:06:52 +00:00
dsl 7af7206539 Add additional 'sizeof args' parameter to mount(2). 2007-07-14 15:57:24 +00:00
pooka 01d79aae7e The kernel socket isn't used by any of the providers, and it's a bit
hard to imagine how it could be used, so get rid of it.
2007-07-02 18:07:44 +00:00
pooka 703c0341d4 basesrc is no more 2007-07-02 16:56:37 +00:00
pooka 6ff8a42783 * narrow-angle const spray
* make config read return an error if it can't read the config file
2007-07-02 16:33:05 +00:00
christos 80955a4c43 replace varstack alloc with malloc. 2006-11-09 19:41:59 +00:00
christos 5afd1c0a23 use MOPT_NULL 2006-10-16 03:37:42 +00:00
mrg 0c37c63edc change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:18:05 +00:00
skrll 7ba7efe154 Don't use cast expressions as lvalues as newer versions of gcc warn. 2006-04-21 15:00:49 +00:00
christos 1f5c810a97 Coverity CID 782: Don't dereference NULL was not going to happen, but:
1. return error instead of the trashed errno.
2. don't return -1, but return ENAMETOOLONG.
3. eliminate unused code.
2006-03-21 21:34:01 +00:00
christos 7067dcb9a4 Always check the results of getmntopts() and free them. 2006-03-21 21:11:41 +00:00
christos 2c6eadc9ce Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
2005-06-27 01:00:04 +00:00
xtraeme a8d83732cf Kill __P(), use ANSI function declarations, constify; WARNS=3. 2005-02-09 13:57:57 +00:00
erh fdd16c549b Fix PR#3617 and PR#3205: call realpath to convert mount points and paths to
device nodes into absolute paths before using them.
2005-01-31 05:19:18 +00:00
itojun 466ceae082 unifdef -DINET6. getaddrinfo will always be there, so there's no point in
keeping old code.  moreover old code does not traverse list of DNS-returned
addresses.
2004-03-01 23:01:18 +00:00
agc 276d62f603 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
salo b75abedac4 netbsd.org->NetBSD.org 2003-07-26 19:38:45 +00:00
itojun d90a2369ab use bounded string ops 2003-07-13 07:39:39 +00:00
atatat fc035bc8fd Allow _ in tags 2003-07-12 23:02:59 +00:00
jdolecek 1edd42a9d2 move getmntopts(3) to libutil, build and install also it's manpage
bump libutil minor
adjust individual mount_*/Makefile to use libutil getmntopts(3)
2003-03-22 12:43:57 +00:00