Commit Graph

15508 Commits

Author SHA1 Message Date
joerg
e8bec33be1 Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
2012-01-20 14:08:04 +00:00
drochner
2b9ee4cb40 let one bit more through to SSE, to make FP_X_IMP work 2012-01-19 16:37:18 +00:00
joerg
726d8a62b9 _runetype_from_ctype is unused 2012-01-18 14:22:27 +00:00
joerg
71d0bcc69f Introduce __HAVE_NO___THREAD for sun2 and vax to disable the TLS usage.
Require __HAVE_TLS_VARIANT_I or __HAVE_TLS_VARIANT_II as well as
__lwp_getprivate_fast / __lwp_gettcb_fast to exist for libpthread.
Define VAX as going to use TLS variant I, if it is ever implemented.
2012-01-17 20:34:57 +00:00
christos
fc5fe3c352 PR/45850: Pierre Pronchery: USB multi-touch panels are not supported 2012-01-17 03:49:19 +00:00
christos
3c15bad9a7 PR/45843: Henning Petersen: Fix resource leak on error. 2012-01-16 14:57:45 +00:00
rmind
4b85474b41 - Expire all sessions on flush.
- Enable checking for zero mask in IP{4,6}MATCH after npfctl changes.
- Make locking symmetric for npf_ruleset_inspect().
- Sync function prototypes in npf(3) man page with reality.
- Rename NPF_TABLE_RBTREE to NPF_TABLE_TREE.
2012-01-15 00:49:47 +00:00
chs
9f94a5cde3 fix handling of large pages. 2012-01-10 16:01:16 +00:00
dholland
84ed28bf40 Implement quota_put and quota_delete for the fallback direct file
access backend.
2012-01-09 15:45:19 +00:00
dholland
583f7defcf Implement quota_put() and quota_delete() using code from edquota(8). 2012-01-09 15:43:19 +00:00
dholland
8d70e807c3 Implement fallback direct access to quota1-type quota files.
Uses (mostly) code from repquota. Add some missing pieces that
weren't in repquota.

Use the direct file access code for cursors if proplib reports the
quota version is 1.
2012-01-09 15:41:58 +00:00
dholland
857bee05cd Implement the libquota cursor interface, using proplib code from repquota. 2012-01-09 15:40:10 +00:00
dholland
22363307c5 Implement the schema-related functions, using proplib code from
/usr/bin/quota.
2012-01-09 15:34:34 +00:00
dholland
fa6b6291ec Handle default ID case in quota_get(), based on logic found in
/usr/bin/quota.
2012-01-09 15:32:38 +00:00
dholland
9f8b8c04bd Redo getfsquota() and getnfsquota() using the new API.
Change the previous getufsquota() to __quota_getquota() and call it
from all three functions: getfsquota(), getufsquota(), and getnfsquota().
2012-01-09 15:31:11 +00:00
dholland
2957f1ccb8 Add quota_nfs.c and implement quota_get() for nfs, using
code from getnfsquota().

Also implement quota_getmountdevice().
2012-01-09 15:29:55 +00:00
dholland
2ff48b73e6 Rework getufsquota() in terms of the new quota API. 2012-01-09 15:28:31 +00:00
dholland
8d8965ace0 Add initial versions of quota_open(), quota_close(), quota_get(),
calling proplib code mostly taken from getufsquota().

Correct the proplib refcount handling in the code from getufsquota(),
where it was (as far as I can tell) wrong.

Avoid doing illegal and unsafe casts from (struct quotaval *)
to (uint64_t *).
2012-01-09 15:27:04 +00:00
christos
6a6c8f616b PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
2012-01-09 15:25:33 +00:00
dholland
e15d192c7f Bump minor version of libquota.so. 2012-01-09 15:24:37 +00:00
dholland
bb96a16625 Add stub entry points of the entire new quota interface. These fail or
do nothing for the time being; however, putting them all in up front
avoids the need to do multiple bumps of the libquota.so version.
2012-01-09 15:22:38 +00:00
christos
89cf253562 - add strspct
- be explicit about string not being NUL terminated if bufsiz == 0
2012-01-07 18:40:55 +00:00
chs
d331b836f8 define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.
2012-01-07 16:47:42 +00:00
martin
f989e55d57 Do not force errno to EOVERFLOW when returning -1 from mktime or friends.
First, there are legitimate cases where we want to return -1 and errno == 0,
second, all paths go through time1() and/or time2sub() which explicitly
take care to set errno in cases of real overflows.
Should fix atf test failure on various ports in
lib/libc/time/t_mktime:timegm_epoch.
2012-01-07 15:19:35 +00:00
christos
acd0d5274c PR/45791: Nat Sloss: getnstr erase character weirdness
Fix processing of backspace erase char and char left.
2012-01-06 22:20:54 +00:00
drochner
2a0c9a37dc pull in from FreeBSD rev.1.41: Narrow the use of user credentials.
(call pam_get_authtok() with caller's rights rather than user's)
2012-01-06 14:04:02 +00:00
reinoud
5bd510aeaa Revert MAP_NOSYSCALLS patch. 2012-01-05 15:19:52 +00:00
yamt
41610fe7ba move the most of description to an appropriate section, HISTORY. 2012-01-05 07:05:59 +00:00
drochner
8fd6dadaf8 include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland
where possible, for consistency and compatibility to FreeBSD
(exception: KAME specific statistics gathering in netstat(1) and systat(1))
2012-01-04 16:09:40 +00:00
drochner
3712f81ced -consistently use "char *" for the compiled policy buffer in the
ipsec_*_policy() functions, as it was documented and used by clients
-remove "ipsec_policy_t" which was undocumented and only present
 in the KAME version of the ipsec.h header
-misc cleanup of historical artefacts, and to remove unnecessary
 differences between KAME ans FAST_IPSEC
2012-01-04 15:55:35 +00:00
wiz
88918228b2 Fix a sentence, following a hint by Abhinav Upadhyay. 2012-01-04 10:53:39 +00:00
christos
1b695acdbf avoid using %m in format. 2012-01-03 19:02:54 +00:00
dholland
b972515e63 Remove unnecessary cast to caddr_t. 2012-01-02 21:29:55 +00:00
dholland
677bc7fd8c stdlib.h, not malloc.h 2012-01-02 21:29:29 +00:00
wiz
b3da5e68a9 Remove trailing whitespace. 2012-01-02 18:06:37 +00:00
dholland
27eed90c42 Clarify the behavior of exit(x) for out-of-range x. PR 45769 2012-01-02 15:55:29 +00:00
christos
952b88962c a typo and missing markup 2012-01-01 23:42:03 +00:00
christos
35a585027b Improve returns description from Solar Designer. 2012-01-01 23:18:51 +00:00
riz
1874c03a4b Redo previous; remove all the casts I added, and use PRI* macros instead.
(by popular demand - makes sense, too)
2011-12-29 04:25:49 +00:00
riz
8340adc56e Cast time_t to intmax_t for printf purposes, and format with %j. Fixes
build on amd64 and probably i386 as well.
2011-12-29 01:40:32 +00:00
wiz
4c98bf7fdf Remove trailing whitespace. Avoid xr to itself. 2011-12-28 22:41:34 +00:00
christos
fd093070ff reflect current reality about return values. 2011-12-28 22:15:23 +00:00
manu
4fba06add5 Add a FUSE trace facility, with statistics collection. This should help
tracking bugs and performance issues
2011-12-28 17:33:52 +00:00
christos
0c2a9fc481 - reverse the order of printf formatting to make it easier for compilers to
check printf arguments
- add compiler checking for printf formats and fix broken ones.
From joerg@
2011-12-28 14:52:56 +00:00
christos
e7926f1e9e make __crypt static 2011-12-28 03:13:09 +00:00
christos
3b47f52ce7 clamp length to 72 (73) characters. 2011-12-28 03:12:38 +00:00
christos
dbd463652a wrap crypt() to a function that returns *0 and *1 on error. 2011-12-27 23:34:13 +00:00
christos
0d2c1e1b4f - go back to returning NULL, we are going to wrap crypt instead.
- limit length of key to 253 to prevent truncation.
2011-12-27 23:33:41 +00:00
christos
671f563b75 we want to check against "*0" not "*\0" 2011-12-27 22:01:26 +00:00
christos
91160c96e4 Instead of returning ":" on error, return "*0" or "*1" which will always result
in logged password entries, even if the calling program decides to blindly
use them. Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15/3
2011-12-27 19:36:10 +00:00
christos
97c77932e4 undo the pam bump. 2011-12-27 16:53:24 +00:00
christos
b0ca4d4eba perform the check for all salts > 2. 2011-12-27 01:20:45 +00:00
christos
aeeea54d2f Provide a safer salting method that does not turn invalid salts to '.'.
Be more sensitive to bad salts and counts. From:
http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/glibc/crypt_freesec.c
From Solar Designer
2011-12-26 22:58:45 +00:00
christos
c9260d16b9 Return ":1" on error instead of ":", so that sloppy password creation programs
don't end up confusing libc or the other way around. From Solar Designer
2011-12-26 21:51:53 +00:00
njoly
f5d424631e Remove obsolete puffs_suspend(3) xref. 2011-12-26 17:59:07 +00:00
christos
ad9882f615 avoid accessing array over its bound, from Solar Designer 2011-12-26 16:03:42 +00:00
christos
f5389e0d8c Move to the new version. 2011-12-25 23:18:25 +00:00
tsutsui
cabc3353b8 Apply fix for previous changes per request from joerg@:
http://mail-index.NetBSD.org/source-changes-d/2011/12/25/msg004454.html

XXX1: More Makefiles should be fixed otherwise they will be
      copy-and-pasted blindly again and again.
XXX2: Probably we need more explicit and simple macro to check active CC.
2011-12-25 12:32:36 +00:00
tsutsui
d1ac98d51b Specify "-fno-tree-ter" to getaddrinfo.c and gethnamaddr.c on arm and gcc45
for workaround of a possible optimazation bug.

On my W-ZERO3 and Zaurus, hostname lookup against CNAME by some commands
(ping(8), ftp(1) etc.) fails even though nslookup(8) returns a proper name
against the same CNAME, after NetBSD/arm ports has been switched to
gcc 4.5 since 201110311420Z (i.e 201110310000Z binaries worked but
201111010000Z ones not).

Building getaddrinfo.c and gethnamaddr.c in libc with "-O2 -fno-tree-ter"
(or using objects built by old gcc 4.1) seems to fix this issue.

Accroding to nonaka@, the following gcc bugzilla test case also fails
with -O2 but works with -O2 -fno-tree-ter on NetBSD/zaurus 5.99.57:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48863#c4
but CNAME lookup didn't fail on his environment even without this workaround.
2011-12-24 04:59:00 +00:00
christos
b49426a4b0 Avoid buffer overflow, reported by Colin Percival at FreeBSD 2011-12-23 16:48:16 +00:00
wiz
e62237163a New sentence, new line. Bump date for previous. 2011-12-20 16:43:14 +00:00
reinoud
d131102a3b Add a MAP_NOSYSCALLS flag to mmap. This flag prohibits executing of system
calls from the mapped region. This can be used for emulation perposed or for
extra security in the case of generated code.

Its implemented by adding mapping-attributes to each uvm_map_entry. These can
then be queried when needed.

Currently the MAP_NOSYSCALLS is only implemented for x86 but other
architectures are easy to adapt; see the sys/arch/x86/x86/syscall.c patch.
Port maintainers are encouraged to add them for their processor ports too.
When this feature is not yet implemented for an architecture the
MAP_NOSYSCALLS is simply ignored with virtually no cpu cost..
2011-12-20 15:39:35 +00:00
riastradh
dade315727 Fix error reporting in puffs_framev_enqueue_waitevent and callers.
ok christos
2011-12-19 15:36:26 +00:00
apb
f93996848b Use mktime(3) instead of hand-coded equivalent.
Don't treat negative results as errors (we should be able
to handle years before 1970).

XXX: This still fails on 1969-12-31 23:59:59.
2011-12-17 19:14:10 +00:00
joerg
41a3b9d2d6 Request always_inline for rumpclient__dofork, it won't work correctly
for vfork otherwise. Also give it the returns twice attribute to ensure
that the stack tainting is done recursively.
2011-12-16 23:19:28 +00:00
drochner
cb4d5f3dcb support ECDSA keys used by recent ssh 2011-12-16 17:37:14 +00:00
drochner
2462eb040a disallow empty passphrases per default, and implement the "nullok"
option to allow it if the administator wishes, from FreeBSD
2011-12-16 17:35:09 +00:00
drochner
705315cdf8 -remove remainders of the misguided changes in revs 1.5-1.9
-iron out more unnecessary differences to FreeBSD
2011-12-16 17:30:12 +00:00
manu
ac705b5bee Do not tell about specific errno, as all xattr copying function
retuenrs error from extattr_list_file and extattr_get_file.
2011-12-16 15:21:13 +00:00
wiz
a107b19ebf Split extattr(3) into two man pages to get rid of ugly duplicate Nd.
Work done by Abhinav Upadhyay with minimal cleanup.
2011-12-16 12:46:00 +00:00
manu
71a2942b6b Rework puffs_framebuf management toremove leaks and abusive reuses. On
exchange error, the puffs_framebuf is now freed immediatly, before
requeuing outstanding requests.
2011-12-16 05:34:54 +00:00
njoly
973e485533 Start making fs read(2) fail with EISDIR if the implementation does
not allow read on directories (kernfs, rumpfs, ptyfs and sysvbfs).
Adjust man page accordingly, and add a small corresponding vfs
testcase.
2011-12-12 19:11:21 +00:00
joerg
a5a75c0cc8 Mark rumphijack_dlsym explicitly as weak to prevent optimisations based
on pointer (non-)identity of it and rumpclient__dlsym.
2011-12-12 16:53:53 +00:00
joerg
c7d626a65f Don't use K&R syntax 2011-12-12 15:21:32 +00:00
joerg
eb47f1619a Use a constant array for the MIB. Newer LLVM decided that mib[] warranted
stack protections, with the obvious crash after the setup was done.
As a positive side effect, code size shrinks a bit.
2011-12-08 02:27:14 +00:00
skrll
79fb68b068 Deal with __MACHINE_STACK_GROWS_UP machines.
constify the other psize while I'm here.

Thanks to Christos for looking.
2011-12-06 21:15:39 +00:00
wiz
6533efb150 Do not xref to itself. 2011-12-05 10:27:40 +00:00
jym
f3effc5ec2 Improvements in secmodel(9). Document secmodel_register(9), _deregister(9)
and _eval(9).

Add secmodel_extensions(9), and indicate the new sysctl(7) to let
ordinary users control the CPU affinity (user_set_cpu_affinity).
2011-12-04 21:08:37 +00:00
drochner
7babedb72c remove the option to build this against openssl - this hasn't been used
in the NetBSD build
since the libc version of MD5Final zeroes out the context, replace
the bzero introduced in the previous commit by comments telling that
2011-11-29 17:27:10 +00:00
drochner
487c0196f3 zero out hash context after use, to avoid traces in RAM
(hint from "Solar Designer")
2011-11-29 13:18:52 +00:00
drochner
fc3deeb5d7 fix minor typo 2011-11-29 13:17:04 +00:00
joerg
93a30e6d6f Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.
2011-11-28 12:44:18 +00:00
tls
f27d6532f5 Remove arc4random() and arc4randbytes() from the kernel API. Replace
arc4random() hacks in rump with stubs that call the host arc4random() to
get numbers that are hopefully actually random (arc4random() keyed with
stack junk is not).  This should fix some of the currently failing anita
tests -- we should no longer generate duplicate "random" MAC addresses in
the test environment.
2011-11-28 08:05:05 +00:00
manu
55557eb9ac - Add missing ENOENT or ESTALL when accessing deleted node
- Fix a warning, fix style (80 chars for a line)
2011-11-28 05:33:33 +00:00
christos
3552fa1ee9 - consistency with types
- prefer sizeof(*var)
2011-11-26 23:42:27 +00:00
rmind
fc9011aa1d Add _npf_config_setsubmit() function. 2011-11-26 23:11:19 +00:00
joerg
b05af17f87 If we have to cast, do it properly. 2011-11-25 17:48:22 +00:00
dholland
51d1d7e7c4 Rename struct ufs_quota_entry -> struct quotaval. 2011-11-25 16:55:05 +00:00
dholland
58632c2b81 Use CHAR_BIT; don't hardwire 8. Fix logic slightly to work with arbitrary
CHAR_BIT. Compiler output unchanged (on amd64).
2011-11-25 16:46:56 +00:00
manu
154cec5236 Rollback previous change as it breaks autmates tests 2011-11-25 15:02:02 +00:00
tron
de9ace2de1 Add explicit casts to make lint happy and fix the NetBSD/i386 build. 2011-11-25 09:00:51 +00:00
joerg
d22a7f54f9 In wcscspn and wcspbrk, handle set size of 0 and 1 explicitly.
For larger sets, use a bloom filter to avoid the inner loop for most of
the input. The current implementation uses a simple modular hash as
first function (well suited for input e.g. in ISO Latin character sets)
and a more complex multiplicative hash as second function with a filter
size of 512 Bit. This reduces the typical run time to O(n+m).
2011-11-24 18:44:25 +00:00
manu
bd5d68a6d1 Documentation fix
Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:59:25 +00:00
manu
77ac17e5c3 Remove files specified in pcn.
When remove files using name from pnode, another link on this file
can be unlinked. E.g. "touch 1; ln 1 2; rm 2" will remove file named
"1". Thus puffs_null_node_remove should remove directory entry which
name is provided by pcn (as said in puffs_ops.3). Caller should
provide appropriately initialized pcn.

From Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:58:52 +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
manu
c068d4996c Remove pnode of overwritten file.
When puffs_null_node_rename() overwrites existing file, its pnode
must be removed, because src pnode already represents this file.

From Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:55:33 +00:00
joerg
6133e96c53 Add TLS support for m68k. 2011-11-22 15:25:28 +00:00
joerg
64680c6b13 Handle simple cases (strlen(charset) <= 1) more efficiently. 2011-11-22 00:37:09 +00:00
chs
452fee2663 gcc 4.5 on vax creates PLT stubs with an entry mask of 0xffc
rather than 0 like gcc 4.1 did, so the sneaky assembly functions
that "ret" without really returning now clobber their registers.
adjust these functions to avoid this problem.
2011-11-21 16:17:48 +00:00
joerg
7e173c1846 Clean up a bit in preparation for more serious changes 2011-11-21 15:02:48 +00:00