Re: crontab: support random offsets for steps

2023-05-05 Thread Todd C . Miller
There appears to be a strong preference for a syntax like "~/10" instead of "*/~10". The following diff implements that instead and also supports random ranges like "1~58/10". When a high and/or low value is used with a random range, the initial offset is a random value less than eiter the step v

Re: cron: better error checking of random values

2023-05-05 Thread Mark Jamsek
On 23-05-05 10:41AM, Todd C. Miller wrote: > On Fri, 05 May 2023 16:13:01 +1000, Mark Jamsek wrote: > > > I found kn's attempted syntax intuitive though; it feels like a natural > > extension of the existing random and step syntax. I also assumed ~/15 > > would run every 15 minutes starting with a

fragment code cleanup for tso

2023-05-05 Thread Alexander Bluhm
Hi, I preparation for my TSO in software diff, I would like to cleanup the fragment code. Both are very simmilar and I like consistency. - Use if_output_ml() to send mbuf lists to interfaces. This can be used for TSO, fragments, ARP and ND6. - Rename variable fml to ml. It will soon be used

Re: passwd: fix error paths and undefined behaviour

2023-05-05 Thread Tobias Stoeckmann
On Fri, May 05, 2023 at 11:00:12AM -0600, Todd C. Miller wrote: > This looks OK but I'd like to see an error message if waitpid() > really does fail. How about something like this, which also avoid > needing the extra variable? Yes, looks much better! Index: local_passwd.c =

Re: passwd: fix error paths and undefined behaviour

2023-05-05 Thread Todd C . Miller
On Fri, 05 May 2023 17:05:05 -, Tobias Stoeckmann wrote: > On Fri, May 05, 2023 at 11:00:12AM -0600, Todd C. Miller wrote: > > This looks OK but I'd like to see an error message if waitpid() > > really does fail. How about something like this, which also avoid > > needing the extra variable?

Re: passwd: fix error paths and undefined behaviour

2023-05-05 Thread Todd C . Miller
On Fri, 05 May 2023 16:46:51 -, Tobias Stoeckmann wrote: > In getnewpasswd we increment "tries" every time we try to enter a new > password. The code allows this to be repeated endlessly by defining > passwordtries to be 0 in /etc/login.conf. But unfortunately we even > increment the int "trie

passwd: fix error paths and undefined behaviour

2023-05-05 Thread Tobias Stoeckmann
Hi, this patch fixes error paths and an undefined behaviour: In getnewpasswd we increment "tries" every time we try to enter a new password. The code allows this to be repeated endlessly by defining passwordtries to be 0 in /etc/login.conf. But unfortunately we even increment the int "tries" if p

Re: cron: better error checking of random values

2023-05-05 Thread Todd C . Miller
On Fri, 05 May 2023 16:13:01 +1000, Mark Jamsek wrote: > I found kn's attempted syntax intuitive though; it feels like a natural > extension of the existing random and step syntax. I also assumed ~/15 > would run every 15 minutes starting with a random minute, and since > discovering it didn't wor

Fix makefs(8) for creating ffs2 filesystem images

2023-05-05 Thread Jihyun Yu
Hi, makefs(8) creates an ffs1 filesystem by default, and the generated filesystem image passes fsck checks. However, when creating an ffs2 filesystem using the -o version=2 option, the generated filesystem image fails fsck checks. This patch resolves the issue by ensuring that the superblock para

software tcp send offloading

2023-05-05 Thread Alexander Bluhm
Hi, Claudio suggested to implement TCP send offloading in software as a fallback if hardware cannot do it. So I took Jan's diff, ripped that part out and polished it. Result is that software TSO can be a bit faster than regular TCP. http://bluhm.genua.de/perform/results/2023-05-04T07%3A05%3A11Z

Re: cron: better error checking of random values

2023-05-05 Thread Peter Hessler
On 2023 May 05 (Fri) at 16:13:01 +1000 (+1000), Mark Jamsek wrote: :On 23-05-04 05:40PM, Todd C. Miller wrote: :> On Thu, 04 May 2023 21:41:26 -, Klemens Nanni wrote: :> :> > On Thu, May 04, 2023 at 03:30:30PM -0600, Todd C. Miller wrote: :> > > This fixes two issues with the parsing of random

Re: cron: better error checking of random values

2023-05-05 Thread Klemens Nanni
On Thu, May 04, 2023 at 05:40:10PM -0600, Todd C. Miller wrote: > I'm fairly certain that doesn't do what you think it does. When I > tested it "~/10" behaved the same as "~". The step value is not > even parsed. Oh I see, it is actually picking a random minute and ignores steps, so entries run