Re: spf walk: lookup aaaa records with "a" mechanism

2018-10-15 Thread Todd T. Fries
0) { | lookup_record(T_A, *(ap) + 2, dispatch_a); | + lookup_record(T_, *(ap) + 2, dispatch_); | continue; | } | if (strncasecmp("exists:", *ap, 7) == 0) { -- Todd T. Fries . http://todd.fries.net/pgp.txt . @unix2mars . github:toddfries

Re: user mod -u lead to segfault

2018-10-14 Thread Todd C. Miller
On Sat, 13 Oct 2018 21:16:10 -0600, "Todd C. Miller" wrote: > I think it is safest to use user_from_uid, uid_from_user, group_from_gid > and gid_from_group in all places where the return value of getpw* > and getgr* is unused. Updated diff that adds wrapper functions for i

Re: user mod -u lead to segfault

2018-10-13 Thread Todd C. Miller
other flags that use getpw{nam,uid}. I think it is safest to use user_from_uid, uid_from_user, group_from_gid and gid_from_group in all places where the return value of getpw* and getgr* is unused. - todd Index: usr.sbin/user/user.c

Re: SEGV was occurred in libedit

2018-10-10 Thread Todd C. Miller
ntroduced in rev 1.21. I agree with your analysis and that fix looks correct. - todd

Re: SEGV was occurred in libedit

2018-10-09 Thread Todd C. Miller
t;el_cursor.h++] > = MB_FILL_CHAR; Shouldn't the NUL character come after filling with MB_FILL_CHAR? Otherwise, it may still be unterminated. - todd

Re: locate.mklocatedb broken with LC_ALL!=C

2018-10-07 Thread Todd C. Miller
On Sun, 07 Oct 2018 17:08:06 +0200, Marc Espie wrote: > Specifically, the only part that cares about > locale is sort, and it's definitely correct in fixing > it's not run on an utf-8 file. Agreed. How about the following? - todd Index: usr.bin/locate/l

Re: odd condition/test in PF lexer

2018-10-05 Thread Todd C. Miller
; || next == '\t') I agree with your analysis. Thank you for taking the time to determine the author's intent instead of blindly trusting the static analyzer. - todd

Re: getent: use more appropiate types/limits around strtonum()

2018-09-26 Thread Todd C. Miller
gt; across databases. One comment inline, otherwise OK millert@ - todd > Index: getent.c > === > RCS file: /cvs/src/usr.bin/getent/getent.c,v > retrieving revision 1.18 > diff -u -p -r1.18 getent.c > --- getent.c

Re: fix usermod -l

2018-09-26 Thread Todd C. Miller
e fix > is a matter of changing getpwnam(3) to uid_from_user(3). OK millert@ - todd

Re: getent: usage() is void

2018-09-25 Thread Todd C. Miller
On Tue, 25 Sep 2018 21:43:41 +0200, Klemens Nanni wrote: > OK? I think you should use __dead here too. E.g. static void __dead usage(void); - todd > Index: getent.c > === > RCS file: /cvs/src/usr.bin/geten

Re: unveil(2) getent(1)

2018-09-24 Thread Todd C. Miller
rrect in thinking that the veil is not activated for group, hosts and passwd? - todd

Re: unveil(2) getent(1)

2018-09-24 Thread Todd C. Miller
any reason why Ricardo's diff can't go in. I wonder if we can do unveil(NULL, NULL) for getent databases without an explicit file. A quick test seems to work for dns. - todd

Re: unveil(2) getent(1)

2018-09-24 Thread Todd C. Miller
nly support passwd, group and ethers via YP. Someone more familiar with YP should probably chime in. - todd

Re: unveil(2) getent(1)

2018-09-24 Thread Todd C. Miller
t appears the getpw pledge should unveil what is needed for YP. Note that the ethers database can also be stored YP. - todd

Re: unveil(2) getent(1)

2018-09-24 Thread Todd C. Miller
I doubt this will work on systems using YP or ypldap. - todd

Re: smtpd: force TLS when relaying

2018-09-21 Thread Todd C. Miller
That syntax makes sense to be and I didn't notice any problems in the diff. OK millert@ - todd

Re: csh: memory leak in setDolp()

2018-09-20 Thread Todd C. Miller
evision 1.23 (2006). OK millert@ - todd

csh: avoid using uninitialized stat buffer

2018-09-19 Thread Todd C. Miller
== NULL" check out of the first if() clause now that it can be true in either case. Found by clang analyzer. - todd Index: bin/csh/dir.c === RCS file: /cvs/src/bin/csh/dir.c,v retrieving revision 1.21 diff -u -p -u -r1.21 dir.c

Re: csh: simplify strsave()

2018-09-18 Thread Todd C. Miller
On Tue, 18 Sep 2018 11:51:26 -0600, "Todd C. Miller" wrote: > To use strchr(3) here we either need mask the char value with 0xff > or figure out why asyntax() is calling any() with a char value of > -32768. The -32768 comes from a Char with the QUOTE bit set. This gets sign-ex

Re: csh: simplify strsave()

2018-09-18 Thread Todd C. Miller
nge [0, 255]. This causes unexpected behavior with the i386 assembler version of strchr(3). To use strchr(3) here we either need mask the char value with 0xff or figure out why asyntax() is calling any() with a char value of -32768. - todd

Re: more user_from_uid(3)

2018-09-17 Thread Todd C. Miller
t;???"; > > either way ok. The "???" is not terribly useful. I think it is better to use the uid of the user writing to the tty. Either way, this is a code path unlikely to be exercised. - todd

Re: csh: remove macros xmalloc,xcalloc,xreallocarray

2018-09-17 Thread Todd C. Miller
On Mon, 17 Sep 2018 23:55:32 +0800, Michael Mikonos wrote: > In csh(1) the functions Malloc(), Calloc() & Reallocarray() > are always called via the macros (which don't really do anything). > This patch renames the functions and deletes the macros. > Does this look OK? OK millert@ - todd

more user_from_uid(3)

2018-09-17 Thread Todd C. Miller
Two more pontential places where user_from_uid(3) makes sense. These were in my large diff but got lost chopping it up into smaller pieces. - todd Index: usr.bin/write/write.c === RCS file: /cvs/src/usr.bin/write/write.c,v

pwd_mkdb(8): estimate correct number of hash table elements

2018-09-17 Thread Todd C. Miller
Since we store each entry 3 times the estimate of the number of elements needs to be 3x the number of entries. Also set the bucket size to be the optimal file system block size instead of hard-coding to 4096. - todd Index: usr.sbin/pwd_mkdb/pwd_mkdb.c

Re: csh: simplify strsave()

2018-09-17 Thread Todd C. Miller
On Mon, 17 Sep 2018 15:53:06 +0200, Martijn van Duren wrote: > It should be safe. There are 5 instances where any() isn't called with > a string literal: Thanks for checking. OK millert@ for the diff. - todd

Re: rdist: use passwd/group caches

2018-09-16 Thread Todd C. Miller
Any rdist users out there? The way rdist does group caching (stash the struct group pointer) will stop working in the future so I'd like to get these changes in before then. - todd On Thu, 13 Sep 2018 13:24:49 -0600, "Todd C. Miller" wrote: > Use password/group cache f

Diff to use uid_from_user(3) and gid_from_group(3)

2018-09-15 Thread Todd C. Miller
We can use uid_from_user(3) and gid_from_group(3) in utilities that do repeated passwd/group lookups. This is the final diff. - todd Index: bin/chmod/chmod.c === RCS file: /cvs/src/bin/chmod/chmod.c,v retrieving revision 1.42 diff

Re: csh: simplify strsave()

2018-09-15 Thread Todd C. Miller
there are actual calls to any() with a NULL string (most use a constant string) but this needs to be checked before committing. - todd

Re: csh: simplify strsave()

2018-09-14 Thread Todd C. Miller
On Fri, 14 Sep 2018 22:30:26 +0800, Michael Mikonos wrote: > Your patch was better. Here is a version with the function renamed > and const added to the param list to match strdup(3). Looks good. OK millert@ - todd

Re: mtree(8): use passwd/group caches

2018-09-13 Thread Todd C. Miller
On Thu, 13 Sep 2018 10:47:35 -0600, "Todd C. Miller" wrote: > Use the passwd/group cache functions in mtree(1) to avoid repeatedly > looking up the same user/group. The passwd and group files are > kept open too. I sent out and older version of the diff that was missing some

Re: add uid_from_user/gid_from_group [3/3]

2018-09-13 Thread Todd C. Miller
On Mon, 10 Sep 2018 12:32:01 -0600, "Todd C. Miller" wrote: > This diff replaces calls to getpwuid/getgrgid with > uid_from_user/gid_from_group and fixes warnings caused by the > user_from_uid/group_from_gid return value change to const char *. > > I've also cha

rdist: use passwd/group caches

2018-09-13 Thread Todd C. Miller
lets us make better use of the gid cache. I've also made the tilde expansion in expand.c use exptilde(). This needs further testing by someone who actually uses rdist. - todd Index: usr.bin/rdist/common.c === RCS file: /cv

More user_from_uid(3) and group_from_gid(3)

2018-09-13 Thread Todd C. Miller
Use user_from_uid(3) and group_from_gid(3) in a few more places that do repeated lookups. - todd Index: sbin/fsck_ext2fs/inode.c === RCS file: /cvs/src/sbin/fsck_ext2fs/inode.c,v retrieving revision 1.27 diff -u -p -u -r1.27

stat(1): use passwd/group caches

2018-09-13 Thread Todd C. Miller
Use user_from_uid(3) and group_from_gid(3) to avoid extra passwd and group file lookups. This required a bit of reordering of the file mode handling bits to deal with the const char *. - todd Index: usr.bin/stat/stat.c === RCS

mtree(8): use passwd/group caches

2018-09-13 Thread Todd C. Miller
Use the passwd/group cache functions in mtree(1) to avoid repeatedly looking up the same user/group. The passwd and group files are kept open too. Index: usr.sbin/mtree/create.c === RCS file: /cvs/src/usr.sbin/mtree/create.c,v retrie

mail(1): use user_from_uid(3) and uid_from_user(3)

2018-09-13 Thread Todd C. Miller
Replace the local getname() and getuserid() functions with calls to user_from_uid(3) and uid_from_user(3). This requires sprinkling const in a few places but is otherwise mechanical. - todd Index: usr.bin/mail/Makefile === RCS

Re: add uid_from_user/gid_from_group [1/3]

2018-09-12 Thread Todd C. Miller
Thanks for the feedback, here's an updated diff that eliminates pwcache.h, gracefully handles table allocation failure and massages the comments to be a bit more general. I can take a look at supporting arbitrary length names in the future. - todd Index: include/

pwd_mkdb: time to increase max cache size?

2018-09-11 Thread Todd C. Miller
larger than 4096. The default db behavior is to use st_blksize if no bsize is specified so we could just set bsize to 0 instead. Opinions? NetBSD has an option for pwd_mkdb to set the cache size on the command line but I'd rather just have better default behavior. - todd Index: usr

add uid_from_user/gid_from_group [3/3]

2018-09-10 Thread Todd C. Miller
I can break the warning fixes out into a separate diff. - todd Index: bin/chmod/chmod.c === RCS file: /cvs/src/bin/chmod/chmod.c,v retrieving revision 1.42 diff -u -p -u -r1.42 chmod.c --- bin/chmod/chmod.c 28 May 2017 08:03:36

add uid_from_user/gid_from_group [2/3]

2018-09-10 Thread Todd C. Miller
This removes cache.c from pax in favor of using the new uid_from_user() and gid_from_group() functions in libc. I've added explicit calls to setpassent() and setgroupent() since they are no longer implicitly called. - todd Index: bin/pax/Mak

add uid_from_user/gid_from_group [1/3]

2018-09-10 Thread Todd C. Miller
ectly. This is consistent with rev 1.10 of pwcache.c. The new functions can be used to speed up repeated user -> uid lookups in mtree, newsyslog and others. Those diffs will be sent separately. - todd Index: include/pwd.h === RCS fi

Re: md5: convert from fgetln(3) to getline(3)

2018-09-05 Thread Todd C. Miller
On Thu, 23 Aug 2018 11:24:54 -0500, Scott Cheloha wrote: > On Tue, Aug 14, 2018 at 03:11:47PM -0500, Scott Cheloha wrote: > > This patch is ok cheloha@ and I can commit if someone else > > is ok, too. > > 1 week bump. Anyone else ok? OK millert@ - todd

Re: syslogd log rotate documentation

2018-09-01 Thread Todd C. Miller
I agree that the sentence about the pid file should be removed as well. - todd

Re: relayd close 0

2018-09-01 Thread Todd C. Miller
close(env->sc_snmp); > env->sc_snmp = -1; > } > > But env has been initialized with 0 by calloc(3). It has to be set > to -1 to make the logic work. OK millert@ - todd

Re: syslogd remove was_initialized

2018-08-31 Thread Todd C. Miller
c from the pre-libevent days. OK millert@ - todd

Re: pkill.1: clarify that patterns are EREs

2018-08-31 Thread Todd C. Miller
On Fri, 31 Aug 2018 17:12:50 +0200, Christian Weisgerber wrote: > In the pkill man page, clarify that the patterns are EXTENDED regular > expressions. I shouldn't have to guess, try, or look at the source > for this. OK millert@ - todd

Re: vmd/vmctl: allow to boot cdrom-only VMs

2018-08-23 Thread Todd T. Fries
Penned by Theo de Raadt on 20180823 14:22.46, we have: | Mike Larkin wrote: | | > On Thu, Aug 23, 2018 at 11:05:40AM -0500, Todd T. Fries wrote: | > > This makes me wonder. Does it make sense to support booting a kernel without | > > disks? Some people have heard of the p

Re: vmd/vmctl: allow to boot cdrom-only VMs

2018-08-23 Thread Todd T. Fries
if (kernel == NULL && ndisks == 0) | - errx(1, "no kernel or disk specified"); | + if (kernel == NULL && ndisks == 0 && !iso) | + errx(1, "no kernel or disk/cdrom specified"); | if (nnics == -1) |

Re: drop getpw promise from pwd_mkdb(8)

2018-08-23 Thread Todd C. Miller
th wpath cpath fattr flock", this has > been tested directly and also via vipw(8). OK millert@ - todd

Re: [patch] uvm_mmap / little change proposal

2018-08-21 Thread Todd C. Miller
the error in case the addressed mapped already exists but > can be changed back in case ...). Does anyone other than FreeBSD define MAP_EXCL? A quick google search didn't turn up any other systems with it. - todd

Re: poll.2: don't encourage use as sleep

2018-08-17 Thread Todd C. Miller
doesn't explicitly say it is supported, and since there are better APIs for this anyway I think removing the text makes sense. OK millert@ - todd

Re: nologin(8): write -> dprintf

2018-08-15 Thread Todd C. Miller
On Wed, 15 Aug 2018 09:27:24 -0500, Scott Cheloha wrote: > Use dprintf for the DEFAULT_MESG string instead of the more awkward > write+strlen combo. I don't object to this but I also wouldn't object to rewriting nologin.c to use stdio. - todd

Re: Remove dead assignment in login(1)

2018-08-07 Thread Todd C. Miller
On Tue, 07 Aug 2018 17:15:58 +0200, Frederic Cambus wrote: > Since rev 1.36, the instance variable is never read again so we can > simply drop the else clause with the assignment. OK millert@ - todd

Re: ifconfig join: show list of configured ess ids

2018-08-06 Thread Todd T. Fries
/* transition wait */ | #define IEEE80211_INACT_WAIT5 /* inactivity timer interval */ | #define IEEE80211_INACT_MAX (300/IEEE80211_INACT_WAIT) | -#define IEEE80211_CACHE_SIZE100 | + | #define IEEE80211_CACHE_WAIT30 | | struct ieee80211_rateset { -- Todd T. Fries . http://todd.fries.net/pgp.txt . @unix2mars . github:toddfries

Re: [1/3] acme-client - correct error message in parse.y

2018-08-03 Thread Todd C. Miller
e difficult but our acme-client has changed enough that this may not be an issue. - todd

Re: dd(1): don't cast malloc(3) size to u_int

2018-07-21 Thread Todd C. Miller
er? I think this is safe on any 2s-complement machine unless sizeof(ssize_t) < sizeof(size_t). I wouldn't worry about it. - todd

Re: point to glob in section 7 not 3 for various base tools

2018-07-20 Thread Todd C. Miller
wl the man pages for existing Xr's of glob(3) that could be converted to glob(7). OK millert@ - todd

Re: join(1): use getline instead of fgetln

2018-07-18 Thread Todd C. Miller
t you get to choose the colour of the bikeshed, OK either way. Good idea. I made that change and committed. - todd

Re: join(1): use getline instead of fgetln

2018-07-17 Thread Todd C. Miller
On Tue, 17 Jul 2018 13:21:31 -0600, "Todd C. Miller" wrote: > It probably makes more sense to do the newline check (and decrement > len if one is present) before newsize is computed. Then you would > need to unconditionally NUL-terminate lp->line. Perhaps something like

Re: join(1): use getline instead of fgetln

2018-07-17 Thread Todd C. Miller
On Tue, 17 Jul 2018 19:39:16 +0300, Lauri Tirkkonen wrote: > while porting join(1) to Unleashed OS (which does not have fgetln(3)) I > came up with the following. Since the fgetln man page advises against > using it, I thought OpenBSD might want this diff too. Looks good. One minor comment inlin

Re: newaliases.8: update to current reality

2018-07-16 Thread Todd C. Miller
I'm open to a better description but it is hard to describe the behavior of both modes without being overly generic. Perhaps simply: .Nd rebuild mail aliases - todd

newaliases.8: update to current reality

2018-07-16 Thread Todd C. Miller
Now that aliases in smtpd.conf default to plain text files and not db files we don't want to tell people to run makemap instead of newaliases. - todd Index: usr.sbin/smtpd/newaliases.8 === RCS file: /cvs/src/usr.sbin/

Re: typos in unveil(2)

2018-07-13 Thread Todd C. Miller
On Fri, 13 Jul 2018 13:00:59 +0100, Ricardo Mestre wrote: > This one looks better OK millert@ - todd

Re: sasyncd: remove redundant memset() call

2018-06-24 Thread Todd C. Miller
On Sun, 24 Jun 2018 01:50:49 -0300, Gleydson Soares wrote: > calloc() already filled all the memory block to 0, zap memset(). OK millert@ - todd

Re: getaddrinfo(3) leak in whois(1)

2018-06-18 Thread Todd C. Miller
is nic.africa Makes sense. OK millert@ - todd

Re: ed remove parse_char_class

2018-06-18 Thread Todd C. Miller
_class from: > unbalanced brackets ([]) > to: > brackets ([ ]) not balanced OK millert@ - todd

Re: ksh "clear-screen" editing command

2018-06-18 Thread Todd C. Miller
On Sun, 17 Jun 2018 15:52:34 -0600, "Todd C. Miller" wrote: > On Sun, 17 Jun 2018 17:29:31 +0200, Mark Kettenis wrote: > > > If folks indeed think that this is a must-have feature, this is > > certainly a better approach. I wonder though if the setupterm() call &g

Re: ksh "clear-screen" editing command

2018-06-17 Thread Todd C. Miller
pler than expected. Now whenever TERM is set (including at startup) it will call setupterm(). - todd Index: bin/ksh/Makefile === RCS file: /cvs/src/bin/ksh/Makefile,v retrieving revision 1.38 diff -u -p -u -r1.38 Makefile --- bin/ksh/Make

Re: ksh "clear-screen" editing command

2018-06-17 Thread Todd C. Miller
On Sat, 16 Jun 2018 12:41:12 -0700, Il Ka wrote: > > alternative that doesn't require linking ksh with > > curses? > > I'm curious, is it possible to use termcap/terminfo directly here? My recent diffs use the terminfo api rather than full-blown curses but it is all the same library. - todd

Re: ksh "clear-screen" editing command

2018-06-17 Thread Todd C. Miller
s all just libcurses. Since ksh is statically linked we only pull in the bits we need anyway. > The man page needs to be adjusted now that you no longer call clear(1). I will do that if we agree this is the way forward. - todd

Re: ksh "clear-screen" editing command

2018-06-17 Thread Todd C. Miller
On Sat, 16 Jun 2018 16:16:57 -0600, "Todd C. Miller" wrote: > On Sat, 16 Jun 2018 14:50:40 +0200, Mark Kettenis wrote: > > > To be honest, I find the whole idea of invoking an external program to > > clear the screen insane. > > Linking with curses doesn'

Re: ksh "clear-screen" editing command

2018-06-16 Thread Todd C. Miller
dec hex 529120 12584 57024 598728 922c8 /bin/ksh 595671 21904 57024 674599 a4b27 ./obj/ksh - todd Index: bin/ksh/Makefile === RCS file: /cvs/src/bin/ksh/Makefile,v retrieving revision 1.38 diff -u -p -u -r1.38 Makef

Re: ksh "clear-screen" editing command

2018-06-16 Thread Todd C. Miller
On Sat, 16 Jun 2018 14:50:40 +0200, Mark Kettenis wrote: > To be honest, I find the whole idea of invoking an external program to > clear the screen insane. Do you have an alternative that doesn't require linking ksh with curses? - todd

Re: ksh "clear-screen" editing command

2018-06-16 Thread Todd C. Miller
ror actions would be. > > It's quite possible there already exists a better function to call > within the ksh code already, but I was unable to figure out which if so. Using system() within ksh seems wrong. How about this instead?

Re: [patch] crontab(5) add -n option to suppress mail when the run was successful

2018-06-12 Thread Todd C. Miller
This is an oft-requested feature. The diff looks good, I've made some minor comments in-line. - todd On Mon, 11 Jun 2018 20:23:11 -, Job Snijders wrote: > diff --git usr.sbin/cron/crontab.5 usr.sbin/cron/crontab.5 > index 9c2e651980a..700010faadf 100644 > --- usr.sbin/

Re: [patch] xargs - few allocation size fixes

2018-06-12 Thread Todd C. Miller
On Tue, 12 Jun 2018 13:29:08 -, David CARLIER wrote: > here a little patch proposal for xargs command line. That fix is correct. I'll commit it unless there are objections. - todd

Re: [patch] Remove unused variable in gnu/llvm/lib/Target/X86/X86FrameLowering.cpp

2018-06-06 Thread Todd Mortimer
On Wed, Jun 06, 2018 at 03:57:44PM +0800, Nan Xiao wrote: > Hi tech@, > > The following patch fixes the build warning: Committed, thanks! > > .. > > variable 'CFIIndex' [-Wunused-variable] > unsigned CFIIndex; >^ > 1 warning generated. > > > Index: X86FrameLowering.cpp > ==

Re: ksh "clear-screen" editing command

2018-06-06 Thread Todd C. Miller
libraries and get the > information. Or just run clear(1). That may be preferable to linking ksh with libcurses. - todd

Re: make process.ps_start an uptime instead of a realtime

2018-06-05 Thread Todd C. Miller
nyway. This seems like an improvement. > This change doesn't require any userspace recompilation for inspecting > a live kernel: on reboot -lkvm binaries behave as expected. Great. I was worried that consumers of p_ustart_{sec,usec} would need to change but I can see that is not the case. - todd

Quiet clang warnings in elfrd_size.c

2018-06-01 Thread Todd Mortimer
New clang warns about some differences between Elf64_Addr (aka uint64) and Elf32_Addr (aka uint32) and the format type provided for these values in the debug output from distrib/common/elfrd_size.c. The same code is used when compiling both 32 and 64 bit versions, so we used ptrdiff_t to get size s

Re: smtpd.conf new grammar

2018-05-24 Thread Todd C. Miller
On Thu, 24 May 2018 16:38:17 -0400, Rupert Gallagher wrote: > It may solve some obscure technical problem, but is a horrible thing > to read and write. How about keeping the best of both worlds? Leave > the old beautiful PF-like syntax to humans, and translate it into > the newEgyptian(tm) on the

Re: nsd: refuse-any for udp only & default changes

2018-05-17 Thread Todd C. Miller
That does sound nicer. - todd

Re: Remove ls -C alias from /etc/ksh.kshrc

2018-05-15 Thread Todd C. Miller
On Tue, 15 May 2018 20:57:02 +0200, Marco Pfatschbacher wrote: > I think it's time to remove this artifact from 1996. Agreed. OK millert@ - todd

Re: vfs_stall foreach mount point

2018-05-07 Thread Todd C. Miller
eps. As the loop in vfs_stall() does not destroy the > mount point, TAILQ_FOREACH_REVERSE without _SAVE is the correct > macro to use. I think this deserves a comment so someone else doesn't try to "fix" it later. - todd

Re: libkvm requires kvm_getargv before kvm_getenv when both needed

2018-05-03 Thread Todd C. Miller
at can be a separate commit. - todd

Re: libkvm requires kvm_getargv before kvm_getenv when both needed

2018-05-03 Thread Todd C. Miller
uot; changed to "ptrdiff_t off", as it should be. > If I understand things correctly, we're lucky that this didn't > strike us on 64-bit archs yet. The is needed only > for the ptrdiff_t. Looks good, OK millert@ - todd

Re: libkvm requires kvm_getargv before kvm_getenv when both needed

2018-05-02 Thread Todd C. Miller
; I think (b) would be the better solution, this seems very fragile. > > Todd and Guenther -- what do you think? I'd prefer separate buffer spaces as well, the current situation is fragile as we've seen. - todd

Re: FREF(9) in unp_internalize()

2018-04-17 Thread Todd C. Miller
On Tue, 17 Apr 2018 09:50:49 +0200, Martin Pieuchot wrote: > Sure, here's an updated diff. It also moves the FRELE(9) in the error > loop down as suggested by visa@. OK millert@ - todd

Re: FREF(9) in unp_internalize()

2018-04-16 Thread Todd C. Miller
FRELE(fp, p); to the fail label? If we get to fail, fp is either NULL or needs to drop a reference. - todd

Re: ksh: count $SECONDS with monotonic clock

2018-04-13 Thread Todd C. Miller
On Fri, 13 Apr 2018 19:42:51 +0200, Jeremie Courreges-Anglas wrote: > The diff uses timespecsub: Ah, OK. That's fine then. - todd

Re: ksh: count $SECONDS with monotonic clock

2018-04-13 Thread Todd C. Miller
for some of the time-related macros. - todd

Re: video(1): don't use optarg as format string

2018-04-09 Thread Todd C. Miller
On Mon, 09 Apr 2018 11:56:46 -0500, Scott Cheloha wrote: > Always nifty: > > $ video -f '%d%d%d' > video: 31668978116843009-2139062144: No such file or directory > > So, use strlcpy and check for truncation. > > ok? OK millert@ - todd

Re: fuse_opt.h and clang 6

2018-04-07 Thread Todd C. Miller
~~ > --8<-- > > Full log at: > > https://junkpile.org/p/failures/i386-20180407/archivers/fuse-zip.log > > Proposed fix below. ok? OK millert@ - todd

Re: patch(1): remove unused header

2018-04-07 Thread Todd C. Miller
On Sat, 07 Apr 2018 10:46:01 +0200, Anton Lindqvist wrote: > Since patch(1) no longer invokes ed(1), pathnames.h can be removed. > _PATH_TMP is still used inside patch.c but including paths.h is > sufficient. OK millert@ - todd

Re: plug a memory leak in diff(1)

2018-04-02 Thread Todd C. Miller
y makes more sense in context. That said, as long as the comments are preserved (as you do), I have no objection to simplifying the loops this way. As you say, the "a > b ||" bit doesn't have any effect. - todd

Re: dd(1): snprintf+writev -> dprintf

2018-04-02 Thread Todd C. Miller
ill be line-buffered so the output doesn't really get garbled. - todd

Re: Single FRELE() in sys_fstatfs()

2018-04-02 Thread Todd C. Miller
original easier to read, but maybe I am in the minority. Personally, I'd prefer the "goto done" idiom over a bunch of nested if() statements. - todd

Re: Earlier FREF()s

2018-04-02 Thread Todd C. Miller
On Mon, 02 Apr 2018 12:34:27 +0200, Martin Pieuchot wrote: > Here's a diff to move FREF() just after fd_getfile() in sys_kevent(), > sys_lseek() and getvnode(). Looks fine. OK millert@ - todd

Re: dd(1): snprintf+writev -> dprintf

2018-04-02 Thread Todd C. Miller
n dprintf() is BUFSIZ (1024) which should be plenty. - todd

Re: mfs free

2018-04-02 Thread Todd C. Miller
On Sat, 31 Mar 2018 15:15:34 -0400, David Hill wrote: > Add the free size. (allocated in mfs_vfsops.c) > > mfsp = malloc(sizeof *mfsp, M_MFSNODE, M_WAITOK | M_ZERO); > devvp->v_data = mfsp; OK millert@ - todd

<    3   4   5   6   7   8   9   10   11   12   >