<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sbin/shutdown, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sbin/shutdown?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sbin/shutdown?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2018-08-03T17:09:22Z</updated>
<entry>
<title>Move pledge after getopt when we know whether the operation is reboot,</title>
<updated>2018-08-03T17:09:22Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2018-08-03T17:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=a5617f5ed0f796652921ad76efd0c748acc68995'/>
<id>urn:sha1:a5617f5ed0f796652921ad76efd0c748acc68995</id>
<content type='text'>
powerdown, halt, or singleuser.  Before pledge, unveil access to
/dev/console, /etc/rc for singleuser entry, execute of /usr/bin/wall
to alert users, and creation of the fastboot and nologin files.  Also
conditionally allow execute of halt, reboot, or the shell depending on mode.
Believe all scenarios were tested -- please exercise this one a bit.
</content>
</entry>
<entry>
<title>Display local timezone in all deadline estimates.</title>
<updated>2018-04-07T19:08:13Z</updated>
<author>
<name>cheloha</name>
<email>cheloha@openbsd.org</email>
</author>
<published>2018-04-07T19:08:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=7e3375798827d30b1158682b38fb3a1d5d115420'/>
<id>urn:sha1:7e3375798827d30b1158682b38fb3a1d5d115420</id>
<content type='text'>
Admins don't necessarily reside in the same timezone as the
machine.  If an admin mistakenly schedules downtime for a
machine at the wrong time this could be quite bad.

Users, too, don't necessarily reside in the same timezone as the
machine.  Saying the box is going down at "15:40" is potentially
ambiguous.

So, display the local timezone in all logs, broadcasts, printouts,
messages, etc.  Give the admin a chance to correct the mistake; give
the user a better idea of when the box is actually going down.

This also updates the process' understanding of the present time
before printing estimates.  The system's wall clock could have
changed after the shutdown was scheduled, making subsequent
broadcasts potentially misleading for users.

ok deraadt@
</content>
</entry>
<entry>
<title>Disallow "++minutes".</title>
<updated>2018-03-19T14:51:45Z</updated>
<author>
<name>cheloha</name>
<email>cheloha@openbsd.org</email>
</author>
<published>2018-03-19T14:51:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=44680ff5ad48b4c8f46d19d94ffb444febcaf341'/>
<id>urn:sha1:44680ff5ad48b4c8f46d19d94ffb444febcaf341</id>
<content type='text'>
strtonum(3) accepts a single leading '+', so if we increment timearg we
allow input with two leading pluses.  If we don't increment, we still
have a valid input for strtonum(3).

While here, use errstr to say what was wrong with timearg.

Don't increase the range for offsets yet: it exposes segfaults elsewhere
in the program that need to be addressed.

ok millert@ tb@
</content>
</entry>
<entry>
<title>Refactor the countdown loop() to simplify it.</title>
<updated>2018-03-02T02:30:15Z</updated>
<author>
<name>cheloha</name>
<email>cheloha@openbsd.org</email>
</author>
<published>2018-03-02T02:30:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=c766b91388db3d3a7648de82edbc79d7190daff8'/>
<id>urn:sha1:c766b91388db3d3a7648de82edbc79d7190daff8</id>
<content type='text'>
If we insert our offset into tlist[] and then process tlist[] like an
array we can eliminate many of the special cases and duplicate calls
in loop().

While we're at it, change struct interval and timewarn() to use time_t
to eliminate the need for some of the casting and add explicit long-long
suffixes to the constants in tlist[] to head off overflow if the code
wanders off.

With type-related input from tb@ and a style tweak from anton@.

ok tb@
</content>
</entry>
<entry>
<title>Replace popen/setjmp/pclose with a manual pipe/fork/exec/wait.</title>
<updated>2018-02-24T20:00:07Z</updated>
<author>
<name>cheloha</name>
<email>cheloha@openbsd.org</email>
</author>
<published>2018-02-24T20:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=fde1d200342a9eb4e2358c62c38e0daa9ac08c6e'/>
<id>urn:sha1:fde1d200342a9eb4e2358c62c38e0daa9ac08c6e</id>
<content type='text'>
We can limit the time we wait on wall(1) without the complexity
inherent to setjmp.

Actually wait (instead of waitpid) to pick up any straggler wall
processes from prior timewarn() calls.

With a tweak from millert@ to ensure we don't accidentally close
stdin before we exec wall.

ok millert@ tb@
</content>
</entry>
<entry>
<title>fprintf(stderr -&gt; warnx</title>
<updated>2018-02-04T04:28:41Z</updated>
<author>
<name>cheloha</name>
<email>cheloha@openbsd.org</email>
</author>
<published>2018-02-04T04:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=59eaf1c4c3f9b3d6e867df2198fd5cee9ef784b7'/>
<id>urn:sha1:59eaf1c4c3f9b3d6e867df2198fd5cee9ef784b7</id>
<content type='text'>
ok jca@ tb@
</content>
</entry>
<entry>
<title>warn format string should be literal.</title>
<updated>2017-04-03T20:59:19Z</updated>
<author>
<name>fcambus</name>
<email>fcambus@openbsd.org</email>
</author>
<published>2017-04-03T20:59:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=a2f556876585311b939162e57b5b0292e4e9283e'/>
<id>urn:sha1:a2f556876585311b939162e57b5b0292e4e9283e</id>
<content type='text'>
OK deraadt@, millert@
</content>
</entry>
<entry>
<title>Aggressively use dprintf, rather than crazy unchecked writes.  Use</title>
<updated>2016-09-01T09:50:38Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2016-09-01T09:50:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=a91c3ab5a063c974ed730684747a15474fb56789'/>
<id>urn:sha1:a91c3ab5a063c974ed730684747a15474fb56789</id>
<content type='text'>
localtime() since it tends to work better than ctime() when some
filesystems are absent.
ok guenther
</content>
</entry>
<entry>
<title>initially, pledge "stdio rpath wpath cpath getpw tty id proc exec", yes</title>
<updated>2015-11-16T18:35:31Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2015-11-16T18:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8aa0c8fbc0befba1ef2fb9f8d715fe89333de4f2'/>
<id>urn:sha1:8aa0c8fbc0befba1ef2fb9f8d715fe89333de4f2</id>
<content type='text'>
it sounds like a lot, but this will eventually run the /etc/rc scripts
to shutdown, then run reboot or halt.  After looking at getpw*, drop
pledge "getpw".  Later drop to just "stdio exec"...

This depends on new pledge semantics for revoke(2).

with help from jca
ok guenther millert semarie tedu jca
</content>
</entry>
<entry>
<title>error in strtonum() conversion; found by Nathanael Rensen</title>
<updated>2015-04-23T02:13:18Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2015-04-23T02:13:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=089371e786f28b49f75dd06329d8b4cdbaf5e2fa'/>
<id>urn:sha1:089371e786f28b49f75dd06329d8b4cdbaf5e2fa</id>
<content type='text'>
</content>
</entry>
</feed>
