summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-10-18Tweak previous: call fatal(), not err(3), for consistency. err.h goes away.Jeremie Courreges-Anglas
2015-10-18regress pledge: test kill()Sebastien Marie
since "inet" has PLEDGE_SELF, and now calling kill() to self is permitted with PLEDGE_SELF, try this with "fattr"
2015-10-18regress pledge: remove cmsgSebastien Marie
it has no sens to keep it.
2015-10-18regress pledge: cpath testSebastien Marie
you need to read the directory before creating something in. add rpath
2015-10-18regress pledge: cmsg is deprecatedSebastien Marie
2015-10-18regress pledge: tweak a bit the manner to grab hte syscall numberSebastien Marie
permit debug string be present on the line
2015-10-18Need native-pledge for id.Doug Hogan
2015-10-18ld.so no longer needs or uses a bind lock, so stop setting it. ThisPhilip Guenther
eliminates a chunk of complexity from the libpthread init and the fork wrapper, as it was the bind lock that needed prebinding before use.
2015-10-18Tadpole/Sun Voyager IIi reported to work via dmesg@Jonathan Gray
2015-10-18move SS_DNS socket check from kern_plegde.c to sys_generic.cSebastien Marie
this check has nothing to do with pledge(2). make it lives in sys_ioctl() call. while here, move the (fp == NULL) check early and remove duplicate check from pledge_ioctl_check(). ok guenther@ deraadt@
2015-10-18Use offsetof() instead of adding the sizes of the preceeding struct membersPhilip Guenther
ok millert@
2015-10-18Make sure sm_rotate_bak() is only run once.Antoine Jacoutot
2015-10-18getting sloppy, lost a }Theo de Raadt
2015-10-18sorry, sdiff -o interactive mode does another spawnTheo de Raadt
2015-10-18Add "dns" to the pledges. Previously these worked because of "inet",Theo de Raadt
alas "dns" is now a mandatory statement if you want to do dns!
2015-10-18Forcibly delete /var/run/ypbind.lock to prepare for the worst cases.Theo de Raadt
ok aja
2015-10-18unrelated commit; not ready yetTheo de Raadt
2015-10-18First casualty of making pledge "dns" mandatory for dns users.Theo de Raadt
"dns" was missing, and this was relying on "inet" support..
2015-10-18Move your drink further away... When a program pledged "getpw" fails toTheo de Raadt
get a response from a YP server, it will open "/dev/tty" and spit out: 'YP server for domain %s not responding, still trying' For now allow open of /dev/tty for "getpw". I hope to re-architect the libc:YP communication protocol (strategy similar to syslog->sendsyslog, isatty->fcntl, dnssocket/dnsconnect) and then we can reevaluate this.
2015-10-18after kmem is open and setup, pledge "stdio rpath wpath cpath"Theo de Raadt
seems to be working. commiting to get feedback from people who crash.
2015-10-18Collapse some strange programmer style with too much abstraction.Theo de Raadt
2015-10-18With TIOCSTI supported in pledge "tty proc", csh is good enough to runTheo de Raadt
with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
2015-10-18A whole buncha unsigned char casts for ctype function arguments.mmcc
ok guenther@
2015-10-18Use explicit_bzero() when the memory is freed directly afterward.mmcc
ok deraadt@
2015-10-18Use explicit_bzero() when the memory is freed directly afterward.mmcc
ok deraadt@
2015-10-18TIOCSTI and TIOCSCTTY; oops got the condition backwards.Theo de Raadt
2015-10-18better placement for dnssocket/dnsconnectTheo de Raadt
2015-10-18Describe dnssocket / dnsconnect argumentsTheo de Raadt
2015-10-18Allow read/write access to /dev/tty when using "tty" pledge.Doug Hogan
Without this change, you need "rpath" and "wpath" to open /dev/tty. Some applications explicitly open /dev/tty, but deraadt@ found the most common use is indirectly via readpassphrase(). tweak and ok deraadt@ pre-tweak ok millert@, semarie@
2015-10-18create libc stubs for dnssocket() and dnsconnect()Theo de Raadt
2015-10-18syncTheo de Raadt
2015-10-18Add two new system calls: dnssocket() and dnsconnect(). This creates aTheo de Raadt
SS_DNS tagged socket which has limited functionality (for example, you cannot accept on them...) The libc resolver will switch to using these, therefore pledge can identify a DNS transaction better. ok tedu guenther kettenis beck and others
2015-10-17naddy asks me if __tfork should be allowed by "proc". yes!Theo de Raadt
We may need a better semantic later ("thread"?), but this allows progress, and people can report their experiences.
2015-10-17connect() to an AF_UNIX socket is really read/write, so tell pledge thisTheo de Raadt
is a RPATH|WPATH operation. Discussed with doug and millert
2015-10-17Allow the nasty ioctl TIOCSTI in "tty", but also require the "proc"Theo de Raadt
permission. For now, we'll tighten it down further later.
2015-10-17better wording in a commentTheo de Raadt
2015-10-17Unify TIOCGPGRP/TIOCGWINSZ/TIOCGWINSZ behaviour regarding ENOTTY return.Theo de Raadt
(both "tty" and "ioctl" allow these; they should behave the same)
2015-10-17Allow TIOCSCTTY on tty devices, if the pledge says "tty id"Theo de Raadt
worked out with nicm
2015-10-17whitespaceTheo de Raadt
2015-10-17Rename SYSEXIT() to SYSCALL_END() for consistency with most other archs.Philip Guenther
No change in resulting object files ok millert@
2015-10-17mailaddr_match() allows comparing two struct mailaddr taking into accountGilles Chehade
catchall and +-tags ok millert@ and jung@ for util.c
2015-10-17Move the last of the __DBINTERFACE_PRIVATE bits from <db.h> to libc's wrapperPhilip Guenther
and eliminate the now superfluous -D option ok kettenis@ millert@
2015-10-17Fix the code that sets up the MCH BAR on systems where the (buggy) BIOSMark Kettenis
doesn't do this for us. The code was poking registers on the wrong PCI device. We were just lucky that it worked on most systems. This should fix machines such as the Asus EeePC 701 and get rid of the error: [drm:pid0:i915_gem_detect_bit_6_swizzle] *ERROR* Couldn't read from MC HBAR. Disabling tiling. messages on that machine.
2015-10-17Tighten pledge: We only write to stdio and never to any files ifChristian Weisgerber
in cat mode (-c, zcat), or in test mode (-t), or if there are no file arguments and there is no -o outfile. Due to fts(3) we require rpath even for compress <in >out. "seems sound" deraadt@
2015-10-17Spell all "unexpected mode %u" panics in lower case, not just one of them.Stefan Sperling
2015-10-17remove some unneccessary macros; from michael reedJason McIntyre
2015-10-17add missing underscore; from theo buehlerJason McIntyre
2015-10-17Fix build with IFMEDIA_DEBUG defined; ok sthen@Stefan Sperling
2015-10-17PROTO_NORMAL for pledge(); ok guentherTheo de Raadt
2015-10-17login_token needs pledge "flock" now.Alexander Bluhm
OK millert@