summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd/proc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Mirror bluhm's fixes for proc.c daemons to dup /dev/null for child processesakoshibe2018-09-101-5/+16
| | | | | | in switchd(8). OK henning@ bluhm@
* Remove cpath pledge(2) promise. We decided that not deleting the unix controlmestre2018-08-051-4/+1
| | | | | | | sockets cause no harm and this way we close another attack surface by not allowing the daemon to create/delete any more files. OK akoshibe@ florian@
* sync proc.c changes from relayd/httpdbenno2017-05-291-5/+5
|
* Nuke some whitespace that keeps poking me in the eye as I try tokrw2017-01-171-2/+2
| | | | steal code.
* Stop accessing verbose and debug variables from log.c directly.reyk2017-01-091-2/+2
| | | | | | | | This replaces log_verbose() and "extern int verbose" with the two functions log_setverbose() and log_getverbose(). Pointed out by benno@ OK krw@ eric@ gilles@ (OK gilles@ for the snmpd bits as well)
* Sync switchd(8) and vmd(8) with the latest proc.c changes. This syncrzalamena2016-11-161-6/+25
| | | | | | basically imports the imsg_flush() fix from reyk@ in httpd(8). ok reyk@
* Sync proc.c file vmd(8) and switchd(8).rzalamena2016-10-111-78/+90
| | | | | | | | | New changes: * Fix msgbuf_write() usage idiom; * Add context (function name) that fatal()ed; * Use less fds on startup; ok mlarkin@, reyk@
* Sync with httpd(8) proc file. Check for dup2() usage to avoid oldd == newdrzalamena2016-10-051-2/+8
| | | | | | and remove the CLOEXEC with fcntl() if necessary. ok reyk@
* Call setsid() to create a new session for the executed processes.reyk2016-10-051-1/+5
| | | | | From deraadt@ OK rzalamena@
* sync proc.c with vmd: add p_pw to specify a non-standard user for a process.reyk2016-10-051-3/+9
| | | | OK rzalamena@
* Fix 'const char *' qualifier removal warning by casting it out withrzalamena2016-09-191-2/+2
| | | | | | uintptr_t. It is safe here to pass a 'const' to exec*(). improved by and ok millert@
* Kill p_env from proc.c. The p_env variable was not being used seriously andrzalamena2016-09-181-2/+1
| | | | | | | | it was always a copy of ps->ps_env. You might access the env variable now with: p->p_ps->ps_env. ok reyk@
* Teach switchd(8) how to fork+exec.rzalamena2016-09-141-186/+334
| | | | | | | | Note: this daemon has the -Wcast-qual compilation flag which trigger a warning that wasn't enable in httpd(8) or relayd(8). This will be fixed in a next diff and then synchronized with other daemons. ok reyk@
* Import switchd(8), a basic WIP OpenFlow implementation for OpenBSD.reyk2016-07-191-0/+648
switchd consists of two parts: 1. switchd(8) and switchctl(8), an OpenFlow controller or "vswitch". 2. switch(4), an OpenFlow-aware kernel "bridge". This the 1st part, the driver will be imported later. The code will remain disabled for a while, but it helps development to have it in the tree. switchd currently supports partial OpenFlow 1.0, but the goal is to use OpenFlow 1.3.5 instead (switch(4) already does 1.3.5). For more background information see: http://www.openbsd.org/papers/bsdcan2016-switchd.pdf https://youtu.be/Cuo0qT-lqig With help from yasuoka@ goda@ Import discussed with deraadt@