When vmd/vmctl switched to handling memory in bytes, seems a few places
for user VMs were missed. Additionally the first hunk removes the quota
hit if the VM will not be created.
diff --git config.c config.c
index 374d7de6629..425c901f36a 100644
--- config.c
+++ config.c
@@ -241,8 +241,10 @@ conf
On Sat, Sep 24, 2022 at 08:32:55AM -0400, Dave Voutila wrote:
>
> Matthew Martin writes:
>
> > When vmd/vmctl switched to handling memory in bytes, seems a few places
> > for user VMs were missed. Additionally the first hunk removes the quota
> > hit if
On Wed, Oct 05, 2022 at 05:03:16PM -0400, Dave Voutila wrote:
> Matthew Martin recently presented a patch on tech@ [1] fixing some missed
> scaling from when I converted vmd(8) to use bytes instead of megabytes
> everywhere. I finally found time to wade through the code it touches
On Wed, Oct 12, 2022 at 09:20:06AM -0400, Dave Voutila wrote:
>
> 1 week bump for the below. If you use this feature or currently hacking
> on it, speak up by end of week. I'm sharpening my axes.
Are the axes sharp?
> > diff refs/heads/master refs/heads/vmd-user
> > commit - bfe2092d87b190d9f89c
A user in IRC asked about route exec's exit status which seems
a reasonable thing to document.
The text is a combination of .Ex -std and env(1). Also route exec
requires a command, so fix the .Op markup.
diff --git route.8 route.8
index 887446c1420..ee5bd15fa1a 100644
--- route.8
+++ route.8
@@
On Wed, Aug 02, 2023 at 06:36:26PM -0400, A Tammy wrote:
> Not a huge fan of this complicated representation.
> > +.Ar command
> > +was invoked but failed with this exit status;
> > +see its manual page for more information.
> > +.It 126
> > +.Ar command
> > +was found but could not be invoked, or
A rule on a bridge interface that uses arp or rarp may be followed with
a literal "request" or "reply" (cf. sbin/ifconfig/brconfig.c L1041 and
1048), so the Ar macro is incorrect as it's argument is not
a placeholder.
Aside: Is there a rule for when to list alternatives with foo | bar or
foo Ns |
Sync the DNS types with IANA[1] and upstream[2]. With this the Type65
queries show up as HTTPS.
Removed the UNSPECA type parsing as IANA has that query type number
assigned to NID now.
Also added a const on ns_class2str.
1: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml
2:
On Wed, May 19, 2021 at 08:01:00AM +0100, Stuart Henderson wrote:
> For the love of $deity if we're updating this file can we please change
> these T_XXX to the ns_t_xxx used by everything else so we don't have to
> patch everything in ports using them?
In that case judging from a quick look at th
On Tue, May 18, 2021 at 10:24:00PM -0500, Matthew Martin wrote:
> Sync the DNS types with IANA[1] and upstream[2]. With this the Type65
> queries show up as HTTPS.
>
> Removed the UNSPECA type parsing as IANA has that query type number
> assigned to NID now.
>
>
isting workflows and could be considered as
in a separate thread if desired.
- Matthew Martin
diff --git include/login_cap.h include/login_cap.h
index d9a4c2c349c..1e831b6471a 100644
--- include/login_cap.h
+++ include/login_cap.h
@@ -53,7 +53,8 @@
#defineLOGIN_SETUMASK 0x002
On Sat, Jan 29, 2022 at 07:10:00PM -0500, Ted Unangst wrote:
> I believe it would be better to add setrtable to id pledge.
Makes the diff quite a bit shorter too.
diff --git include/login_cap.h include/login_cap.h
index d9a4c2c349c..1e831b6471a 100644
--- include/login_cap.h
+++ include/login_ca
Two DPRINTFs in sys/net/if_wg.c are missing a newline.
diff --git if_wg.c if_wg.c
index 13c48f42c54..a3efd577dbc 100644
--- if_wg.c
+++ if_wg.c
@@ -2156,7 +2156,7 @@ wg_output(struct ifnet *ifp, struct mbuf *m, struct
sockaddr *sa,
}
if (m->m_pkthdr.ph_loopcnt++ > M_MAXLOOP) {
Recently cclasses in lib/libc/gen/charclass.h was made const.[1]
Mark the pointer used to walk the array in ksh const as well.
1: https://marc.info/?l=openbsd-cvs&m=160256416506433&w=2
diff --git misc.c misc.c
index 9e6e9db5e76..7226f74eccf 100644
--- misc.c
+++ misc.c
@@ -713,7 +713,7 @@ do_gma
On Sat, Jan 29, 2022 at 06:25:32PM -0600, Matthew Martin wrote:
> On Sat, Jan 29, 2022 at 07:10:00PM -0500, Ted Unangst wrote:
> > I believe it would be better to add setrtable to id pledge.
ping
Also are there any opinions on adding LOGIN_SETRTABLE to doas?
diff --git include/lo
On Thu, Feb 03, 2022 at 07:53:43AM +, Jason McIntyre wrote:
> On Wed, Feb 02, 2022 at 07:46:39PM -0600, Matthew Martin wrote:
> > Two DPRINTFs in sys/net/if_wg.c are missing a newline.
> >
>
> if this is committed, the committer may also want to question the dodgy
On Fri, Feb 18, 2022 at 03:25:51PM -0500, Ted Unangst wrote:
> On 2022-02-06, Ted Unangst wrote:
> > On 2022-02-05, Matthew Martin wrote:
> > > On Sat, Jan 29, 2022 at 06:25:32PM -0600, Matthew Martin wrote:
> > > > On Sat, Jan 29, 2022 at 07:10:00PM -0500, Ted Unan
Anton spotted a doas regression failure in t-run-keepenv-path after the
change to doas for LOGIN_SETALL. Since that test runs doas in a chroot
and the setup does not create a login.conf, login_getclass in
login_cap.c will return a login_cap_t with a NULL lc_cap (and errno set
to ENOENT) on L133. se
On Sun, Mar 13, 2022 at 02:30:23PM +0100, Solene Rapenne wrote:
> Hi, I'm playing with the new rtable feature in login.conf(5) but it
> seems one use case doesn't trigger the rtable change.
>
> I have an user called alice, if I ssh locally from my user to alice
> with ssh alice@localhost, alice ha
diff --git rcctl.8 rcctl.8
index 6c3048b834c..93a76a937c1 100644
--- rcctl.8
+++ rcctl.8
@@ -64,6 +64,7 @@ can be one of
.Cm class ,
.Cm flags ,
.Cm logger ,
+.Cm rtable ,
.Cm status ,
.Cm timeout
or
const the termp and winp arguments for openpty and related. This matches
the prototypes for openpty and forkpty in glibc and musl libc.
diff --git openpty.3 openpty.3
index e0c82e00c53..080d92d8ced 100644
--- openpty.3
+++ openpty.3
@@ -47,15 +47,15 @@
.Ft int
.Fn getptmfd "void"
.Ft int
-.Fn o
On Thu, Apr 07, 2022 at 06:11:45PM -0500, Matthew Martin wrote:
> const the termp and winp arguments for openpty and related. This matches
> the prototypes for openpty and forkpty in glibc and musl libc.
ping; has an ok from tb@ [1]
1: https://marc.info/?l=openbsd-tech&m=164986161
The function is already marked __dead in passwd.c, so appears to just be
an oversight.
diff --git util.h util.h
index dd64f478e23..752f8bb9fc5 100644
--- util.h
+++ util.h
@@ -97,7 +97,7 @@ void pw_edit(int, const char *);
void pw_prompt(void);
void pw_copy(int, int, const struct passwd *,
On Tue, May 03, 2022 at 10:37:36PM -0500, Matthew Martin wrote:
> The function is already marked __dead in passwd.c, so appears to just be
> an oversight.
ping
diff --git util.h util.h
index dd64f478e23..752f8bb9fc5 100644
--- util.h
+++ util.h
@@ -97,7 +97,7 @@ void pw_edit(int, cons
int
main() {
int results[3] = { 0, 0, 0 };
for (int i = 0; i < 10; i++) {
results[arc4random_uniform_fast_simple(3)]++;
}
for (int i = 0; i < 3; i++)
printf("%d: %d\n", i, results[i]);
return 0;
}
% ./a.out
0: 24809
1: 50
I had sent a similar patch a while back. There seemed to me some
interest, but it was never comitted. Updated to apply to -current.
Apologies for the attachment; gmail still isn't sending emails sent
via mutt, but I suspect the patch in the body will be mangled.
- Matthew Martin"
On Thu, Mar 7, 2019 at 4:53 AM Stuart Henderson wrote:
>
> On 2019/03/06 22:20, Theo de Raadt wrote:
> > I'm not sure why this matters.
> >
> > Fundamentally system is fork+exec via a shell. So you write it as
> > minimal fork+exec.
> >
> > What is the particular benefit you see here, is it secur
On Fri, Mar 8, 2019 at 3:39 AM Reyk Floeter wrote:
>
> On Wed, Mar 06, 2019 at 10:42:15PM -0600, Matthew Martin wrote:
> > I had sent a similar patch a while back. There seemed to me some
> > interest, but it was never comitted. Updated to apply to -current.
> >
>
>
ping
On Fri, Mar 8, 2019 at 8:52 PM Matthew Martin wrote:
>
> On Fri, Mar 8, 2019 at 3:39 AM Reyk Floeter wrote:
> >
> > On Wed, Mar 06, 2019 at 10:42:15PM -0600, Matthew Martin wrote:
> > > I had sent a similar patch a while back. There seemed to me some
>
ping after unlock
diff --git usr.sbin/ikectl/ikeca.c usr.sbin/ikectl/ikeca.c
index bac76ab9c2f..09df5066820 100644
--- usr.sbin/ikectl/ikeca.c
+++ usr.sbin/ikectl/ikeca.c
@@ -18,11 +18,13 @@
#include
#include
+#include
#include
#include
#include
#include
#include
+#include
#incl
On Thu, Apr 25, 2019 at 08:59:56PM -0600, Theo de Raadt wrote:
> > + argv = alloca((n + 1) * sizeof(*argv));
>
> Our source tree is exceedingly sparing in the use of alloca().
> This will not do.
Was staying as close as possible to exec.c, but avoiding alloca is
preferable; replaced with re
ping
On Thu, Apr 25, 2019 at 11:21:00PM -0500, Matthew Martin wrote:
> On Thu, Apr 25, 2019 at 08:59:56PM -0600, Theo de Raadt wrote:
> > > + argv = alloca((n + 1) * sizeof(*argv));
> >
> > Our source tree is exceedingly sparing in the use of alloca().
> &
On Wed, May 08, 2019 at 04:22:16PM -0600, Theo de Raadt wrote:
> Isn't something like better -- to avoid marshalling code to convert
> arguments -> array?
>
> char *pkcs_args[] =
> PATH_OPENSSL,
> "pkcs12",
> "-export",
> "-caname",
> ca->caname,
> "-name",
>
On Sat, Jan 04, 2020 at 04:08:47PM +0100, Mark Kettenis wrote:
> I don't think this should print "configuartion OK" when there are no
> errors. The UNIX way is to just return 0 and be done.
For what it's worth most daemons currently print "configuration OK":
bgpd dvmrpd eigrpd httpd ifstated iked
On Wed, Jan 22, 2020 at 12:44:18AM -0500, Ted Unangst wrote:
> should not size the size until the allocation succeeds, or the free path will
> try to deref the null array.
>
>
> Index: json.c
> ===
> RCS file: /home/cvs/src/usr.sbin/
Add a -R flag to tftpd for a read only mode. This allows for a tighter
pledge than currently possible because by default existing files can be
overwritten (but no new files created). Perhaps read only should be the
default since it is surprising that tftp can overwrite by default.
- Matthew
On Sun, Jan 24, 2016 at 03:05:28AM -0600, Matthew Martin wrote:
> Add a -R flag to tftpd for a read only mode. This allows for a tighter
> pledge than currently possible because by default existing files can be
> overwritten (but no new files created). Perhaps read only should be the
On Mon, Jan 25, 2016 at 07:32:52AM +, Stuart Henderson wrote:
> On 2016/01/25 04:32, Jérémie Courrèges-Anglas wrote:
> >
> > Hi Matthew,
> >
> > Matthew Martin writes:
> >
> > > On Sun, Jan 24, 2016 at 03:05:28AM -0600, Matthew Martin wrote:
>
correct or if it's ok to rely on
calloc'ing a struct setting pointers to NULL. I ran out of entropy for
picking names, so I've added some braces (but really initialization
syntax is nicer).
- Matthew Martin
diff --git ikeca.c ikeca.c
index 3dacac9e83e..c04d0b7229c 100644
---
On Thu, Jun 08, 2017 at 10:33:07PM +1000, Jonathan Gray wrote:
> On Fri, May 19, 2017 at 12:35:44AM -0500, Matthew Martin wrote:
> > While making the last patch, I noticed ikectl uses getpass. Use
> > readpassphrase instead and explicit_bzero the buffers.
> >
> > - Matt
Remove duplicate include in file.c.
- Matthew Martin
diff --git file.c file.c
index 6304a38c18f..f7a2f56cb64 100644
--- file.c
+++ file.c
@@ -34,7 +34,6 @@
#include
#include
#include
-#include
#include
#include
#include
== 1 || (argc == 2 && strcmp(argv[1], "--") == 0)))
Also kill a needless include.
- Matthew Martin
diff --git vipw.c vipw.c
index e9595b02198..88a741f1c15 100644
--- vipw.c
+++ vipw.c
@@ -37,7 +37,6 @@
#include
#include
#include
-#include
#include
#include
@@ -49,18
As far as I can tell, it's never been linked into the build even looking
in the NetBSD history. unstr is also not linked, but as it's the reverse
of strfile (which is built and used but not installed) unstr seems less
useless.
- Matthew Martin
diff --git tools/Do_spell tools/Do_spe
hould also be
const. Instead of fixing all the declarations throughout the tree, use
getprogname(3) which is the documented API anyway.
- Matthew Martin
diff --git style.9 style.9
index 6e662f3a4f6..c849dd172ed 100644
--- style.9
+++ style.9
@@ -589,10 +589,10 @@ Uppercase letters take precedence
src/sbin/fsck_ext2fs/dir.c: In function 'dircheck':
src/sbin/fsck_ext2fs/dir.c:241: warning: comparison is always false due to
limited range of data type
And indeed in /usr/include/ufs/ext2fs/ext2fs_dir.h e2d_namelen is
a u_int8_t and a few lines above #define EXT2FS_MAXNAMLEN255
diff --
The man page documents frequencies that are different than the code
uses e.g. C (3.61 vs 2.7) and D (4.78 vs 3.8). This seems a bit much for
a man page. If anyone prefers the letter ordering be kept, the correct
order is ETSAORINDHLCPMUYFWGBVKXQZJ .
- Matthew Martin
diff --git caesar.6 caesar.6
name; is valid C. Shouldn't that be
something like off_t offset = p - *name; ... p = name + offset; ?
- Matthew Martin
diff --git nm.c nm.c
index 5d2a1bfeb61..085c4152fc6 100644
--- nm.c
+++ nm.c
@@ -310,7 +310,7 @@ mmbr_name(struct ar_hdr *arh, char **name, int baselen, int
*namel
On Tue, Aug 01, 2017 at 09:36:13AM +0100, Jason McIntyre wrote:
> On Thu, Jul 27, 2017 at 01:36:15AM -0500, Matthew Martin wrote:
> > The man page documents frequencies that are different than the code
> > uses e.g. C (3.61 vs 2.7) and D (4.78 vs 3.8). This seems a bit much for
>
.c
which claims to get it's numbers from "some unix(tm) documentation".
- Matthew Martin
> > On Tue, Aug 01, 2017 at 09:36:13AM +0100, Jason McIntyre wrote:
> > > On Thu, Jul 27, 2017 at 01:36:15AM -0500, Matthew Martin wrote:
> > > > The man page documents
AONRISHetc is
> from some well-known research, but ETSAOR* is brand new and even google
> cannot find a reference to that ordering. It seems there is a bug here,
> but is it perhaps the other frequency table?
I certainly don't claim to know which frequencies are more accurate.
Does anyone have a preferred source for which percentages to use?
- Matthew Martin
On Tue, Aug 01, 2017 at 08:41:32AM -0500, Matthew Martin wrote:
> On Tue, Aug 01, 2017 at 07:38:28AM -0600, Theo de Raadt wrote:
> > > On Tue, Aug 01, 2017 at 07:28:39AM -0600, Theo de Raadt wrote:
> > > > I've known about ETAONRISHetc basically forever. Wh
There doesn't seem to be any reason for user to write out a config file
with the defaults if none exists. I've never seen anything else in base
do this, so kill it.
- Matthew Martin
Index: user.c
===
RCS file: /cvs/sr
On Thu, Oct 06, 2016 at 10:36:48PM -0500, Matthew Martin wrote:
> There doesn't seem to be any reason for user to write out a config file
> with the defaults if none exists. I've never seen anything else in base
> do this, so kill it.
Ping. With man pages fixes this time
Don't force the user to pick an interface if the responsefile is on
a disk.
- Matthew Martin
Index: install.sub
===
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.932
diff -u -p -r1.932 instal
ping
On Sat, Nov 26, 2016 at 11:28:55PM -0600, Matthew Martin wrote:
> Don't force the user to pick an interface if the responsefile is on
> a disk.
>
> - Matthew Martin
>
>
> Index: install.sub
> ===
Currently on the console
echo '\033[34mblue\033[39m white'
will echo both words with a blue foreground. Add support for SGR 39 and
49 that reset the fg and bg color respectively back to default.
- Matthew Martin
Index: wsemul_vt
On Sun, Jul 12 2015 at 12:23:48 -0500, Matthew Martin wrote:
> Currently on the console
> echo '\033[34mblue\033[39m white'
> will echo both words with a blue foreground. Add support for SGR 39 and
> 49 that reset the fg and bg color respectively back to default.
>
>
On Wed, Jul 29, 2015 at 05:42:10PM -0500, Matthew Martin wrote:
> On Sun, Jul 12 2015 at 12:23:48 -0500, Matthew Martin wrote:
> > Currently on the console
> > echo '\033[34mblue\033[39m white'
> > will echo both words with a blue foreground. Add support for SGR 39 a
The following outputs only $ with a newline.
{ i=0; while [ $i -lt 89 ]; do printf $i\\0; : $(( i++ )); done; } |
xargs -0 -I $ printf '%s\n' $
The problem is two fold. The first is that strnsubst gives up on
substituting since replstr is greater than maxsize. This should likely
cause an
ping
On Sun, Sep 27, 2015 at 09:52:16AM -0500, Matthew Martin wrote:
> The following outputs only $ with a newline.
>
> { i=0; while [ $i -lt 89 ]; do printf $i\\0; : $(( i++ )); done; } |
> xargs -0 -I $ printf '%s\n' $
>
> The problem is two fold. The firs
Dropping leading zeros doesn't make sense for checksums. Only odd case
is print-mobile.c which previously printed checksums as decimal.
print-gre.c also sticks out as the only one that prepends "0x".
- Matthew Martin
Index: usr.sbin/tcpdu
sd/util.c
usr.sbin/nsd/xfrd.c
as they seem to have upstreams. The only other case is games/wump/wump.c
which has
if (arc4random() % 2 == 1)
This is safe and seems obvious enough to me.
- Matthew Martin
Index: games/atc/update.c
===
On Mon, Dec 07, 2015 at 09:33:47AM +0100, Theo Buehler wrote:
> I think some of these are ok, but I'm unsure about some of the others.
> Here are some of my concerns:
>
> - since arc4random_uniform can potentially loop indefinitely, it
> might interfere with predictable timing of some routines.
On Fri, Mar 31, 2017 at 08:03:44AM -0500, Edgar Pettijohn wrote:
> usermod(8) doesn't have an option for setting defaults. Here is a patch to
> correct the manual.
I believe it's referring to user.c read_defaults which calls setdefaults
before reading the defaults.
The example proper usage of snprintf(3) (under Caveats) evokes a warning
when compiled with -Wextra. I presume casting ret to unsigned int would
be safe, but I'll defer to those who know the nuances.
#include
int
foo(char* string) {
char buffer[128];
int ret = snprintf(buffer, si
RFC 4861 specifies ReachableTime "should be a uniformly distributed
random value between MIN_RANDOM_FACTOR and MAX_RANDOM_FACTOR times
BaseReachableTime milliseconds." I think the author intended to do the
multiplication by (x>>10) outside the mask, but it's still missing a
ge except for a purposefully
misbehaving program to test that execve will fail.
EINVAL gives a somewhat confusing error message, but nothing in intro(2)
looked like a better choice.
Idea from Martin Brandenburg.
- Matthew Martin
diff --git kern_exec.c kern_exec.c
index 7784d5f4165..3c3
ping
On Sun, May 07, 2017 at 06:59:12PM -0500, Matthew Martin wrote:
> RFC 4861 specifies ReachableTime "should be a uniformly distributed
> random value between MIN_RANDOM_FACTOR and MAX_RANDOM_FACTOR times
> BaseReachableTime milliseconds." I think the author intended to do t
On Mon, May 15, 2017 at 03:49:55PM +0200, Mike Belopuhov wrote:
> On Sun, May 07, 2017 at 18:59 -0500, Matthew Martin wrote:
> > RFC 4861 specifies ReachableTime "should be a uniformly distributed
> > random value between MIN_RANDOM_FACTOR and MAX_RANDOM_FACTOR times
&
cause it uses system(3) in various places to run openssl, tar,
and zip. Take the hint from the system(3) man page, and write a small
function that does the fork and exec bypassing sh.
Keep in mind while reviewing ca->batch was either "" or "-batch " and is
now either "
While making the last patch, I noticed ikectl uses getpass. Use
readpassphrase instead and explicit_bzero the buffers.
- Matthew Martin
diff --git ikeca.c ikeca.c
index 69ca076407b..2ec010a5831 100644
--- ikeca.c
+++ ikeca.c
@@ -22,6 +22,7 @@
#include
#include
#include
+#include
71 matches
Mail list logo