summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2018-08-11Prevent server side overflow for message id in snmp header.rob
ok sthen@, tb@
2018-08-10Another place where we should handle AS_SET better. aspath_lenmatch()Claudio Jeker
should count through AS_SET boundaries, in other words the path 1 2 3 { 4 3 5 } 3 3 7 has an as-seq count of 4, before it was just 2. OK benno@
2018-08-10Make the AS_SET handling for source-as even simpler. It is enough to onlyClaudio Jeker
extract the rightmost AS of a segment if the segment is not an AS_SET. Then if we hit the final segment as will contain the last aggregator AS. This fixes a possible issue with a path like 1 2 3 { 4 5 } { 6 7 } which should match for source-as 3. OK benno@
2018-08-09Improve handling of source-as when an AS_SET is rightmost. In that caseClaudio Jeker
use the rightmost AS from the previous AS path segment. As suggested in rfc6472. Also fix a long standing bug of AS 42 >< 4242 matching 43 - 4241 instead of 1-41 and 4243 and upwards. Last but not least pass the filter_as struct to as_compare since that will make it easier to implement as-sets. OK benno@, OK job@ on a previous version
2018-08-09correct sizeof to use correct buffer, rather than another buffer (whichTheo de Raadt
was the same size)
2018-08-09While softreconfig is running set the poll timeout to 0 so that theClaudio Jeker
runner makes progress and does not get hold back by poll sleeping at the same time fds are still serviced first if they have data pending.
2018-08-09Make two very internal functions static. They are used to merge anClaudio Jeker
AS_PATH with a AS4_PATH and are therefor fairly special.
2018-08-08mestre and I can find no reason why the pledge has "unix". DisableTheo de Raadt
that and start listening for failure reports.
2018-08-08ntpd unveils the cert.pem "r" file (which is passed-over-socket to theTheo de Raadt
constraints process), and /usr/sbin/ntpd "x" to perform fork+exec operations.
2018-08-08Some unsigned long to unsigned int cleanup from recent ber (type) changes.rob
ok claudio@
2018-08-08Unveil the special files needed for reading AML tables, and theTheo de Raadt
directory for placement. We can only protect the directory case, since the file_prefix+sig+id case is too large to enumerate.
2018-08-08In netproc process, unveil to only expose the CA file.Theo de Raadt
ok florian
2018-08-08Move struct wire_largecommunity to rde_attr.c since it is only used internallyClaudio Jeker
2018-08-08Merge getcommunity() and getlargecommunity() into one function thatClaudio Jeker
takes a flag if it is large or not. Makes code more reusable.
2018-08-08Make the (non-)transitive handling of ext communities a bit more obvious.Claudio Jeker
2018-08-08One ; too muchClaudio Jeker
2018-08-08Update the RIB after a config reload in the background. This moves theClaudio Jeker
heavy bits into the background and so the RDE is able to process new messages more or less instantly after a configuration reload. Not all cases are covered yet but the bulk is. While the backgorund process is running no new config can be loaded. Tested by and OK benno@
2018-08-08hide rib[] internals in new rib_valid() functionSebastian Benoit
ok claudio@
2018-08-07Unveil is used at tail of initialization to allow "r" of /tftpbootTheo de Raadt
(that decides whether rarpd should reply), and /etc/ethers "r" for debug reporting.
2018-08-07Unveil fits nicely into the syslogd privsep model. Unveiled filesTheo de Raadt
include config file "r", utmp "r", /dev "rw", /bin/sh "x" for running piped commands, and the syslogd binary "x" itself for HUP re-exec upon config loads with changes. Also unveiled in the privsep process are the specific log files being written to. If a config file reload changes no files, the existing privsep process keeps running with unveil's to the relevant files (therefore it can cope with newsyslogd taking files away). If a new config file is loaded which changes the output files, the privsep process is restarted with fork+exec, and installs new unveils as needed. The safety we gain from unveil is that we've pigeonholed the privsep file-writer to exactly the files required. Help from bluhm for some edge cases.
2018-08-07Post-g2k18 fix: unbreak the optional vmd-internal vmboot loader.Reyk Floeter
The new vm_checkaccess() call didn't account for the vmboot case. OK ccardenas@ mikeb@
2018-08-07Fix paste error in "no read access to" debug message, tweak messages.Reyk Floeter
Found by mikeb@
2018-08-06space required between macro args and punctuation;Jason McIntyre
2018-08-06Reflect reality.Marc Espie
The infrastructure no longer uses -Dunsigned, but TRUSTED_PKG_PATH, which narrows the source of unsigned package to a single place, and thus is less hazardous.
2018-08-06replace the current log optionsSebastian Benoit
log updates|all with log state changes log host checks log connection [errors] The first two control the logging of host check results: either changes in host state only or all checks. The third option controls logging of connections in relay mode: Either log all connections, or only errors. Additionaly, errors will be logged with LOG_WARN and good connections will be logged with LOG_INFO, so they can be differentiated in syslog. ok and feedback from claudio@
2018-08-06Change manpage example for reserved words since the macro used is to replaceRicardo Mestre
a password and that way it would log it when the daemon is ran in verbose mode. Hint and OK claudio@
2018-08-06Validate the prefix sent in a network delete call before trying to deleteClaudio Jeker
it. We should not trust this input too much as found by Pierre Emeriaud. OK benno@
2018-08-06Pass the stale timestamp to path_remove_stale() removes a asp->peer dereferenceClaudio Jeker
2018-08-06Replace two asp->peer with prefix_peer(p) which is the same.Claudio Jeker
2018-08-06Assign peer1 and peer2 early on and use them everywhere instead of aspX->peer.Claudio Jeker
2018-08-05Since -s argument is no longer checked, during reexec, the argv size then mustRicardo Mestre
be shortened by 1. OK florian@
2018-08-05Remove cpath pledge(2) promise. We decided that not deleting the unix controlRicardo Mestre
sockets cause no harm and this way we close another attack surface by not allowing the daemon to create/delete any more files. While here also scramble pledge promises to their canonical form. OK florian@
2018-08-05Remove now unused header which I forgot to commit on previous.Ricardo Mestre
2018-08-05Remove cpath pledge(2) promise. We decided that not deleting the unix controlRicardo Mestre
sockets cause no harm and this way we close another attack surface by not allowing the daemon to create/delete any more files. OK florian@
2018-08-05Remove cpath pledge(2) promise. We decided that not deleting the unix controlRicardo Mestre
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@
2018-08-05Revert back previous and remove cpath pledge(2) promise entirely. We decidedRicardo Mestre
that not deleting the unix control sockets cause no harm and this way we close another attack surface by not allowing the daemon to create/delete any more files. tweak and OK florian@
2018-08-04Revert back previous commit, we have decided that socket files don't cause anyRicardo Mestre
harm if not deleted after the daemon is shutdown and at the same time we also tackle another attack surface by not allowing the program to create/delete any more files (by removing "cpath" promise from pledge(2)). Discussion initiated by a question from deraadt@ OK florian@
2018-08-04Leave the control socket behind on shutdown. It doesn't hurt anyone.Florian Obser
On the other hand it is much more powerful to get rid of cpath; rad is no longer allowed to change anything on the filesystem. Triggered by mestre@'s work to fix unlinking in other daemons and a question from deraadt@ OK mestre
2018-08-04I can find no reason why portmap needs rpath after initialization.Theo de Raadt
2018-08-03advertise slaacd.8;Jason McIntyre
2018-08-03sort; ok florianJason McIntyre
2018-08-03return is not a function and if (x) -> if (x != NULL)Sebastian Benoit
From Ross L Richardson, thanks ok millert@
2018-08-03fix error messages from earlier syntax changeSebastian Benoit
From Ross L Richardson ok millert@
2018-08-03correct an error message, from Ross L RichardsonSebastian Benoit
ok millert@
2018-08-03document the default in the abscence of a certificate authority.Sebastian Benoit
From Ross L Richardson
2018-08-03Document that domain certificate is optional.Sebastian Benoit
From Ross L Richardson
2018-08-03Move nexthop and nexthop flags from the rde_aspath to struct prefix.Claudio Jeker
struct prefix will be slowly becomming the hub of the rib. OK phessler@ job@
2018-08-03We can only unveil if the prefix is a directory (the input paths, and theTheo de Raadt
output directory). If prefix isn't a directory, that would require enumerating all prefix<sig>.<id> filenames and unveiling all of them which isn't reasonable... for the file case can we identify whether it starts start with '/' or not, and unveil '/' or '.' for "w"?
2018-08-03unveil _PATH_DEVDB for devname(). All other filenames are openedTheo de Raadt
before unveil/pledge.
2018-08-03Reshuffle the way bgpd does the softreload after filter changes.Claudio Jeker
Walk each rib at most once and push it from there to all RIBs or peers that need the update. Makes the logic more streight and so easier to run in background. Tested by and OK phessler@