Re: Ignore /tmp/.Xauth* in daily

2021-03-06 Thread Vadim Zhukov
сб, 6 мар. 2021 г. в 23:14, Matthieu Herrb : > > On Sat, Mar 06, 2021 at 09:52:58PM +0300, Vadim Zhukov wrote: > > сб, 6 мар. 2021 г. в 21:30, Theo de Raadt : > > > > > > Matthieu Herrb wrote: > > > > > > > Linux, systemd and XDG have inventen

Re: Ignore /tmp/.Xauth* in daily

2021-03-06 Thread Vadim Zhukov
(b) is a variant of my case, as I said, I can live without this feature. In the case of (c) users (non-admins) won't be able to do something anyway. Can't speak for NFS (I've quit the job where /home on NFS has been set up a few years ago) so no opinion on (d). -- WBR, Vadim Zhukov

Re: Ignore /tmp/.Xauth* in daily

2021-03-06 Thread Vadim Zhukov
сб, 6 мар. 2021 г. в 20:53, Theo de Raadt : > > Vadim Zhukov wrote: > > > > The backup dir can be configured to something else, but it needs to be > > > writeable by the user whois login in. It could be a subdir of /tmp (if > > > the rc.d script takes care

Re: Ignore /tmp/.Xauth* in daily

2021-03-06 Thread Vadim Zhukov
сб, 6 мар. 2021 г. в 20:50, Theo de Raadt : > > Matthieu Herrb wrote: > > > On Sat, Mar 06, 2021 at 09:56:34AM -0700, Theo de Raadt wrote: > > > Matthieu Herrb wrote: > > > > > > > On Fri, Mar 05, 2021 at 09:10:32PM +0300, Vadim Zhukov wrote: >

Re: Ignore /tmp/.Xauth* in daily

2021-03-06 Thread Vadim Zhukov
сб, 6 мар. 2021 г. в 20:41, Matthieu Herrb : > > On Sat, Mar 06, 2021 at 09:56:34AM -0700, Theo de Raadt wrote: > > Matthieu Herrb wrote: > > > > > On Fri, Mar 05, 2021 at 09:10:32PM +0300, Vadim Zhukov wrote: > > > > чт, 4 мар. 2021 г. в 02:02, Vadim

Re: Ignore /tmp/.Xauth* in daily

2021-03-05 Thread Vadim Zhukov
чт, 4 мар. 2021 г. в 02:02, Vadim Zhukov : > > Hello all. > > Since xenodm has DEF_USER_AUTH_DIR set to "/tmp", we need to ignore > /tmp/.Xauth* in daily cleanup, don't we? > > Found the hard way a few minutes ago on my X240. Thanks sthen@, I've realize

Re: Fix assigning array variables in ksh

2021-03-05 Thread Vadim Zhukov
пт, 5 мар. 2021 г. в 18:14, Theo Buehler : > > On Sun, Feb 21, 2021 at 10:04:07PM +0300, Vadim Zhukov wrote: > > Hello all. > > > > This continues the 'Another potential ksh bug?' thread on misc@: > > https://marc.info/?l=openbsd-misc&m=16073670022062

Ignore /tmp/.Xauth* in daily

2021-03-03 Thread Vadim Zhukov
Hello all. Since xenodm has DEF_USER_AUTH_DIR set to "/tmp", we need to ignore /tmp/.Xauth* in daily cleanup, don't we? Found the hard way a few minutes ago on my X240. Okay? -- WBR, Vadim Zhukov Index: daily =

Fix assigning array variables in ksh

2021-02-21 Thread Vadim Zhukov
ing). I'm too lazy to check why. :-) Okay anyone? -- WBR, Vadim Zhukov Index: regress/bin/ksh/obsd-regress.t === RCS file: /cvs/src/regress/bin/ksh/obsd-regress.t,v retrieving revision 1.10 diff -u -p -r1.10 obsd-regress.t --

Re: fortune: allow to use symlinks

2020-12-15 Thread Vadim Zhukov
can return NULL, and that value isn't checked. So I'm posting the whole diff for the sake of completeness, and what I really think worths committing is the last chunk, replacing "return NULL" with "err(1, NULL)" in copy(). Okay for it? > martijn@ > > On Tue,

fortune: allow to use symlinks

2020-12-14 Thread Vadim Zhukov
sr/local/share/games/fortune/ru/foo". I decided to call readlink(2) explicitly rather than adding check of file type being open, since that resulted in less code. Ah, and yes, I have a port of Russian fortune files pending, but that's for another list and another day. So... okay/notok

Re: Unbreak X:Y user/group spec in pf.conf

2020-01-16 Thread Vadim Zhukov
on" feature could be used wrong for other config clauses as well, especially when negation comes to play. I'm not sure if this should be changed at all... We may force that only one of two syntaxes may be used: user { foo, bar } user { 1000 till 1999, >=1 } -- With best regards, Vadim Zhukov

Re: Unbreak X:Y user/group spec in pf.conf

2020-01-15 Thread Vadim Zhukov
allow all of them to connect e.g. to Github or anoncvs, but not to whole Internet. I can use "1999><6000" as alternative, of course, but then manual must be tweaked, IMO. >Vadim Zhukov wrote: > >> I've just found that pfctl doesn't like 'X:Y' syntax

Unbreak X:Y user/group spec in pf.conf

2020-01-15 Thread Vadim Zhukov
f also adds a regression test, for the sake of completeness. Existing regression tests pass on amd64. OK? -- WBR, Vadim Zhukov Index: sbin/pfctl/parse.y === RCS file: /cvs/src/sbin/pfctl/parse.y,v retrieving revision 1.699 diff -u

avoid uvideo lockup when nothing is transferred

2020-01-15 Thread Vadim Zhukov
rror we keep bulk_running set. This seems just a leftover, as well as the first chunk: if we failed to create kthread, there won't be anything running under bulk_running==1 for sure. I must thank kettenis@ for help during diagnosis and mpi@ for a patch for related issue. OK?

Re: Scrolling in top(1)

2020-01-05 Thread Vadim Zhukov
5 января 2020 г. 22:37:05 GMT+02:00, Ted Unangst пишет: >Vadim Zhukov wrote: >> Today I get really upset and angry due limitation of top(1): it shows >> only hrrm, top processes (thank you, Chromium). Now here is a diff >that >> allows you to scroll process list by

Scrolling in top(1)

2020-01-05 Thread Vadim Zhukov
c to using multi-byte sequences, or whatever is needed for proper handling of those keys. Ideas, comments and (may I hope?) okays are welcome. :) -- WBR, Vadim Zhukov Index: machine.c === RCS file: /cvs/src/usr.bin/top/m

Re: syspatch -c as non-root

2019-12-14 Thread Vadim Zhukov
сб, 14 дек. 2019 г. в 14:35, Antoine Jacoutot : > > On Sat, Dec 14, 2019 at 10:12:36AM +0300, Vadim Zhukov wrote: > > Hello all (long time no see!) > > > > TL;DR: Allow syspatch -c run under non-priviledged user. > > > > Reasoning: instead of putting syspatch -

syspatch -c as non-root

2019-12-13 Thread Vadim Zhukov
The patch was tested on 6.6. Well, it doesn't apply cleanly to 6.6, since "set +e" magic you see arrived in -CURRENT, but tweaked version runs smoothly. BTW, why do we ever call eval in unpriv()? Without eval, set +e isn't needed, FWIW. -

Re: About differences with GNU patch(1)

2018-06-22 Thread Vadim Zhukov
and runs on (almost) -CURRENT. Okay or not? -- WBR, Vadim Zhukov Index: patch.c === RCS file: /cvs/src/usr.bin/patch/patch.c,v retrieving revision 1.65 diff -u -p -r1.65 patch.c --- patch.c 7 Apr 2018 14:55:13 - 1.65 ++

Re: About differences with GNU patch(1)

2018-06-20 Thread Vadim Zhukov
ср, 20 июн. 2018 г. в 22:09, Stuart Henderson : > > On 2018/06/20 21:17, Vadim Zhukov wrote: > > Hi, > > > > The Ansible "patch" module fails to work on OpenBSD because it tries > > to use "--dry-run" command-line option on patch(1), while ours &

Re: About differences with GNU patch(1)

2018-06-20 Thread Vadim Zhukov
ср, 20 июн. 2018 г. в 21:59, Chris Cappuccio : > > Vadim Zhukov [persg...@gmail.com] wrote: > > , 20 ??. 2018 ??. ?? 21:17, Vadim Zhukov : > > > > > > Hi, > > > > > > The Ansible "patch" module fails to work on OpenBSD because it t

Re: About differences with GNU patch(1)

2018-06-20 Thread Vadim Zhukov
ср, 20 июн. 2018 г. в 21:17, Vadim Zhukov : > > Hi, > > The Ansible "patch" module fails to work on OpenBSD because it tries > to use "--dry-run" command-line option on patch(1), while ours > supports -C/--check instead. For now, I have an obvious, hm, patch

About differences with GNU patch(1)

2018-06-20 Thread Vadim Zhukov
anyway. Would it be okay to add --binary as a no-op option to our patch? -- WBR, Vadim Zhukov

Re: unbuffered fread does not set error/EOF flags

2018-05-21 Thread Vadim Zhukov
#if 0 2018-05-05 22:17 GMT+03:00 Vadim Zhukov : > 2018-05-05 22:12 GMT+03:00 Vadim Zhukov : >> Hi all! >> >> Recently I was working on a program that uses stdio functions heavily. >> While hunting for a bug, I've temporarily disabled buffering (via >> setvbuf(

tcp(4) does not mention netinet/tcp.h

2018-05-10 Thread Vadim Zhukov
etsockopt(TCP_MAXSEG) call compiles still)? -- WBR, Vadim Zhukov Index: tcp.4 === RCS file: /cvs/src/share/man/man4/tcp.4,v retrieving revision 1.23 diff -u -p -r1.23 tcp.4 --- tcp.4 10 Sep 2015 17:55:21 - 1.23 +++ tcp.4

Re: unbuffered fread does not set error/EOF flags

2018-05-05 Thread Vadim Zhukov
2018-05-05 22:12 GMT+03:00 Vadim Zhukov : > Hi all! > > Recently I was working on a program that uses stdio functions heavily. > While hunting for a bug, I've temporarily disabled buffering (via > setvbuf(f, NULL, _IONBF, 0)) and realized that program behavior was > changed

unbuffered fread does not set error/EOF flags

2018-05-05 Thread Vadim Zhukov
libc code I've also found that __sread() drops __SOFF flag unconditionally for all read errors. IMHO, the EAGAIN case shouldn't be affected here, since, obviously current offset doesn't change and is still well-known. So... any comments, or ever oka

Re: libkvm requires kvm_getargv before kvm_getenv when both needed

2018-05-03 Thread Vadim Zhukov
e it's done for other archs. -- WBR, Vadim Zhukov Index: kvm.c === RCS file: /cvs/src/lib/libkvm/kvm.c,v retrieving revision 1.64 diff -u -p -r1.64 kvm.c --- kvm.c 3 May 2018 15:47:41 - 1.64 +++ kvm.c

Re: libkvm requires kvm_getargv before kvm_getenv when both needed

2018-05-03 Thread Vadim Zhukov
ky that this didn't strike us on 64-bit archs yet. The is needed only for the ptrdiff_t. If required, I'll split (1), (2) and (3) in separate commits; it's that reviewing them in a single mail and a single context looks like easier for me; please correct me if I'm wrong

Re: libkvm requires kvm_getargv before kvm_getenv when both needed

2018-05-01 Thread Vadim Zhukov
t splitting kd->argbuf into kd->argbuf and kd->envbuf. Seems a bit saner. I'm fine with any direction. The patch below implements (a), since it's less patching. Is it okay, or should it be (b)? -- WBR, Vadim Zhukov Index: kvm_proc.c =

wrong realloc in libkvm

2018-05-01 Thread Vadim Zhukov
Hi all. The "p = realloc(p, size)" idiom is obviously wrong. Since both places to be fixed were similar, I went further and unified the code as well. Note that "argv" is later initialized from kd->argv, so there is no problem in reusing it here. The amd64 is happy. Okay?

libkvm requires kvm_getargv before kvm_getenv when both needed

2018-05-01 Thread Vadim Zhukov
, to be addressed in another letter. So, does any libkvm hacker have any clues where to look for this argv-envp bug? I'm not sure that I'll find the root issue myself fast enough (in less than half a year). -- WBR, Vadim Zhukov Index: print.c ===

Stop telling patch runs ed

2018-04-11 Thread Vadim Zhukov
Hi all. Lets stop lying that patch(1) runs ed(1). Okay? Or should we tell explicitly mention that we don't do bad things? -- WBR, Vadim Zhukov Index: patch.1 === RCS file: /cvs/src/usr.bin/patch/patch.1,v retrieving rev

Stop ping telling world its pid

2018-04-10 Thread Vadim Zhukov
lue. Or we should do this in IPv4 too, then: I'm not opposed, but at least consistency should be honored, IMHO. Okay? Comments? -- WBR, Vadim Zhukov P.S.: I'm not fully back yet, sorry. Index: ping.c === RCS fil

Add D-Link DWA-125/B2 to run(4)

2018-01-29 Thread Vadim Zhukov
Hi all. The D-Link DWA-125/B2 works out-of-the box here on amd64. Okay? (I remember to commit usbdevs.h and usbdevs_data.h separately) -- WBR, Vadim Zhukov Index: sys/dev/usb/usbdevs === RCS file: /cvs/src/sys/dev/usb/usbdevs,v

Re: ypldap patch 5: fix aldap_close

2017-12-17 Thread Vadim Zhukov
2017-12-17 6:35 GMT+03:00 Jonathan Matthew : > On Sat, Dec 16, 2017 at 08:38:59PM +0300, Vadim Zhukov wrote: >> 2017-12-06 19:12 GMT+03:00 Vadim Zhukov : >> >> The aldap_close() return value is never checked, and I do not see >> >> any good reason to do that. Al

Re: ypldap patch 5: fix aldap_close

2017-12-16 Thread Vadim Zhukov
2017-12-06 19:12 GMT+03:00 Vadim Zhukov : >> The aldap_close() return value is never checked, and I do not see >> any good reason to do that. Also, in case close(2) fails, it'll miss >> freeing other data. > > I'm blind. :-\ > > The problem I was loo

Re: ypldap patch 5: fix aldap_close

2017-12-06 Thread Vadim Zhukov
So here is a better patch that solves actual leak. I ever treat this as a candidate for -STABLE, since when ypldap get stuck, you could be locked out of system. Okay? -- WBR, Vadim Zhukov Index: aldap.c === RCS file: /cvs/src/usr.sb

ypldap patch 6: make client_addr_init() return void

2017-12-06 Thread Vadim Zhukov
The client_addr_init never returns anything but 0, and this value isn't checked as well, so just make it void. Okay? -- WBR, Vadim Zhukov Index: ldapclient.c === RCS file: /cvs/src/usr.sbin/ypldap/ldapclient.c,v retri

ypldap patch 5: fix aldap_close

2017-12-06 Thread Vadim Zhukov
The aldap_close() return value is never checked, and I do not see any good reason to do that. Also, in case close(2) fails, it'll miss freeing other data. Okay? -- WBR, Vadim Zhukov Index: aldap.c === RCS file: /cvs/src/usr

ypldap patch 4: fix fd leak when calling aldap_init

2017-12-06 Thread Vadim Zhukov
I've just found that under heavy load ypldap's LDAP engine leaks file descriptors. I'll try to post issues I found one-by-one, and here is the first leak I've found. This fixes an fd leak happening if aldap_init() returns NULL. Okay? -- WBR, Vadim Zhukov

Re: ypldap patch 3: no reason for malloc?

2017-12-05 Thread Vadim Zhukov
2017-12-05 13:45 GMT+03:00 Vadim Zhukov : > The third nit in ypldap code, and the most questionable one. > > IMHO, there is no reason to dynamically allocate relatively small > internal structures without buffers in it: Please disregard this one, I'm an idiot that looks at an

ypldap patch 3: no reason for malloc?

2017-12-05 Thread Vadim Zhukov
{ RB_ENTRY(groupent) ge_name_node; RB_ENTRY(groupent) ge_gid_node; gid_tge_gid; char*ge_line; }; Okay? -- WBR, Vadim Zhukov Index: ypldap.c

ypldap patch 2: small code dedup

2017-12-05 Thread Vadim Zhukov
The second nit in ypldap code. This deduplicates code a bit. Okay? -- WBR, Vadim Zhukov Index: ypldap.c === RCS file: /cvs/src/usr.sbin/ypldap/ypldap.c,v retrieving revision 1.21 diff -u -p -r1.21 ypldap.c --- ypldap.c20 Jan

ypldap patch 1: RB_NFIND instead of RB_INSERT+RB_NEXT

2017-12-05 Thread Vadim Zhukov
e browsing the ypldap code, I've come across some nits, which I want to share. Here is the first one. Those are cases RB_NFIND is exactly for, aren't them? Okay? -- WBR, Vadim Zhukov Index: yp.c === RCS file: /cvs/src/us

Re: [PATCH] Remove useless sys/sys/dkbad.h

2017-07-29 Thread Vadim Zhukov
2017-07-29 2:15 GMT+03:00 Андрей Болконский : > sorry. correct patch: > > 2017-07-28 23:52 GMT+03:00 Андрей Болконский : > >> This header not used since retire sparc. >> build amd64 is ok Committed, thanks. -- WBR, Vadim Zhukov

Re: [PATCH] Remove useless sys/sys/dkbad.h

2017-07-28 Thread Vadim Zhukov
strib/sets/lists/comp/mi, but otherwise works fine here. -- WBR, Vadim Zhukov

Re: rc: Use here document for temporary pf rule set

2017-07-17 Thread Vadim Zhukov
> + pass out proto carp !received-on any keep state (no-sync)" > + > + # Don't kill NFS. > if [[ $(sysctl vfs.mounts.nfs 2>/dev/null) == *[1-9]* ]]; then > - # Don't kill NFS. > - RULES="set reassemble yes no-df\n$RULES" > - RULES="$RULES\npass in proto { tcp, udp } from any port { > sunrpc, nfsd } to any" > - RULES="$RULES\npass out proto { tcp, udp } from any to any > port { sunrpc, nfsd } !received-on any" > + RULES="set reassemble yes no-df > + $RULES > + pass in proto { tcp, udp } from any port { sunrpc, nfsd } to > any > + pass out proto { tcp, udp } from any to any port { sunrpc, > nfsd } !received-on any" > fi > print -- "$RULES" | pfctl -f - > pfctl -e I like this, okay zhuk@. -- WBR, Vadim Zhukov

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-17 Thread Vadim Zhukov
2017-07-17 14:03 GMT+03:00 Klemens Nanni : > On Mon, Jul 17, 2017 at 11:57:02AM +0300, Vadim Zhukov wrote: >> > + for _liba in /usr/lib/lib{c,crypto}; do >> > + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | >> > tail -1)" >&g

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-17 Thread Vadim Zhukov
2017-07-16 14:55 GMT+03:00 Klemens Nanni : > On Sun, Jul 16, 2017 at 10:26:25AM +, Robert Peichaer wrote: >> But I'd like to stay strict matching the filenames. >> >> + for _liba in /usr/lib/lib{c,crypto}; do >> + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | tail >> -

Re: Make clang accept and use relative filenames for tools

2017-05-29 Thread Vadim Zhukov
2017-05-29 21:14 GMT+03:00 Mark Kettenis : >> From: Vadim Zhukov >> Date: Mon, 29 May 2017 20:29:20 +0300 >> >> 2017-05-29 20:26 GMT+03:00 Vadim Zhukov : >> > The clang and gcc behave differently regarding executing tools. >> > While gcc simply runs

Re: Make clang accept and use relative filenames for tools

2017-05-29 Thread Vadim Zhukov
2017-05-29 20:54 GMT+03:00 Stuart Henderson : > On 2017/05/29 20:26, Vadim Zhukov wrote: >> The clang and gcc behave differently regarding executing tools. >> While gcc simply runs what he said to, clang tries to be clever >> and always find absolute path for a tool, ref

Re: Make clang accept and use relative filenames for tools

2017-05-29 Thread Vadim Zhukov
2017-05-29 20:26 GMT+03:00 Vadim Zhukov : > The clang and gcc behave differently regarding executing tools. > While gcc simply runs what he said to, clang tries to be clever > and always find absolute path for a tool, refusing start otherwise. > > The actual problem is starting

Make clang accept and use relative filenames for tools

2017-05-29 Thread Vadim Zhukov
f a patch like that would be acceptable? And if yes, how do you want it look like to make supporting it easier? Thank you in advance. -- WBR, Vadim Zhukov Index: tools/clang/lib/Driver/ToolChain.cpp === RCS file: /cvs/src/gnu/ll

KSH bug: case inside command substitution

2017-05-28 Thread Vadim Zhukov
ata fails with error: $ ksh tt.sh ./tt.sh[4]: syntax error: `;;' unexpected What's worse, it fails even if I comment the line it's whining after. So... okay to add a regression test? -- WBR, Vadim Zh

Re: switch decltype to variadic macros

2017-05-28 Thread Vadim Zhukov
2017-05-28 18:32 GMT+03:00 Mark Kettenis : >> From: "Ted Unangst" >> Date: Sun, 28 May 2017 11:16:21 -0400 >> >> Vadim Zhukov wrote: >> > While working on getting Boost & its friends work under Clang, >> > I've stumbled upon the code

Re: switch decltype to variadic macros

2017-05-28 Thread Vadim Zhukov
2017-05-28 18:35 GMT+03:00 Vadim Zhukov : > 2017-05-28 18:16 GMT+03:00 Ted Unangst : >> Vadim Zhukov wrote: >>> While working on getting Boost & its friends work under Clang, >>> I've stumbled upon the code that looks like the following: >>> >>&

Re: switch decltype to variadic macros

2017-05-28 Thread Vadim Zhukov
2017-05-28 18:16 GMT+03:00 Ted Unangst : > Vadim Zhukov wrote: >> While working on getting Boost & its friends work under Clang, >> I've stumbled upon the code that looks like the following: >> >>decltype(x, y) z = w; > > why not espie's fix from

switch decltype to variadic macros

2017-05-28 Thread Vadim Zhukov
wing change, which likely worths getting upstream as well. -- WBR, Vadim Zhukov Index: __config === RCS file: /cvs/src/lib/libcxx/include/__config,v retrieving revision 1.3 diff -u -p -r1.3 __config --- __config19 Sep 2016 22:1

Re: iwm scan abort

2017-05-28 Thread Vadim Zhukov
the firmware. > > This might silence some error messages people have seen with iwm(4). > > Briefly tested on an 8260 device. Seems correct to me. -- WBR, Vadim Zhukov

Re: remove waf from port-modules(5)

2017-05-27 Thread Vadim Zhukov
2017-05-27 22:45 GMT+03:00 Joerg Jung : > Hi, > > I think devel/waf is gone since two years and may not come back, so no > need to mention in port-modules(5). > > OK? Yes, and don't forget to bring some gas for nice burning!

Shrink and give example for sets question

2017-05-26 Thread Vadim Zhukov
Let's make it more informative and smaller size at the same time? Index: install.sub === RCS file: /cvs/src/distrib/miniroot/install.sub,v retrieving revision 1.958 diff -u -p -r1.958 install.sub --- install.sub 24 Jan 2017 10:14:14 -

Re: ftp(1): anonymous login and .netrc

2017-01-09 Thread Vadim Zhukov
if (user == NULL) { > + if (user == NULL && !anonftp) { > if (ruserpass(host, &user, &pass, &acctname) < 0) { > code = -1; > return (0); > The diff looks like correct to me, okay@ for anyone willing to commit. -- WBR, Vadim Zhukov

Re: PATCH: Tell what trailing asterisk in sa output means

2016-12-20 Thread Vadim Zhukov
about > > Children which have not yet called > .Xr execve 2 > will have > .Sq * > appended to their command names. Seems fine for me as well. -- WBR, Vadim Zhukov

PATCH: Tell what trailing asterisk in sa output means

2016-12-20 Thread Vadim Zhukov
Hi all. I had to dig into sa sources to get know what trailing '*' in command names mean. IMHO, that's not how manuals should work. :) Okay? -- WBR, Vadim Zhukov Index: sa.8 === RCS file: /cvs/src/usr.sbin/sa/sa

Re: Better for mount(2)

2016-07-17 Thread Vadim Zhukov
descriptions of the MNT_FORCE and MNT_UPDATE flags were reworked and moved to separate paragraphs. Okay to commit? -- WBR, Vadim Zhukov Index: mount.2 === RCS file: /cvs/src/lib/libc/sys/mount.2,v retrieving revision 1.46 diff

Better for mount(2)

2016-07-09 Thread Vadim Zhukov
didn't document all of the flags involved in mount calls, since some of them are purely kernel internal. But I could easily miss something crucial... So this is my first public draft of mount(2) patch. Looking for comments & thanks in advance! -- WBR, Vadim Zhukov Index

Re: remove cluster_write() remains

2016-05-22 Thread Vadim Zhukov
2016-05-21 23:49 GMT+03:00 Martin Natano : > VOP_ALLOCBLKS() and related code is unused since the removal of > cluster_write(). This diff even shrinks /bsd by 8kb. Ok? Unless someone really wants to reuse this code, it obviously serves no purpose. Nice finding! :) okay@ zhuk

Make fstat exit status like grep has

2016-05-03 Thread Vadim Zhukov
This makes fstat(1) behave more like grep(1), regarding exit status. The idea itself came from bluhm@. For manpage, I mostly copied the text from grep(1), but changed phrases talking about selected lines to matching processes. Or should those be selected processes?.. -- WBR, Vadim Zhukov

Remove lib/libc/regex/WHATSNEW

2016-05-03 Thread Vadim Zhukov
Is there any point in keeping lib/libc/regex/WHATSNEW? Okay to rm? -- WBR, Vadim Zhukov Index: WHATSNEW === RCS file: WHATSNEW diff -N WHATSNEW --- WHATSNEW28 Apr 1997 20:44:56 - 1.3 +++ /dev/null 1 Jan 1970 00:00

Re: Return ESRCH instead of zero result for KERN_FILE sysctl

2016-05-03 Thread Vadim Zhukov
section a bit up, IMHO, that makes more sense; but if any our documentation maintainer will object, I'll revert, of course. Okay to commit this version? -- WBR, Vadim Zhukov Index: sys/kern/kern_sysctl.c === RCS file: /c

Re: Return ESRCH instead of zero result for KERN_FILE sysctl

2016-05-02 Thread Vadim Zhukov
2016-05-03 1:19 GMT+03:00 Mark Kettenis : >> Date: Tue, 3 May 2016 00:04:13 +0200 >> From: Alexander Bluhm >> >> On Sun, May 01, 2016 at 01:24:19AM +0300, Vadim Zhukov wrote: >> > When matching by PID, we'd better return ESRCH expicitly rather >>

Re: Return ESRCH instead of zero result for KERN_FILE sysctl

2016-05-02 Thread Vadim Zhukov
2016-05-03 1:04 GMT+03:00 Alexander Bluhm : > On Sun, May 01, 2016 at 01:24:19AM +0300, Vadim Zhukov wrote: >> When matching by PID, we'd better return ESRCH expicitly rather >> than zero entries. This makes, for example, fstat(1) behaviour >> more consistent and make

Re: midiplay: Fix out-of-bounds memory access

2016-05-01 Thread Vadim Zhukov
+ SIZE_LEN; > tracks[t].end = tracks[t].start + len; > tracks[t].curtime = getvar(&tracks[t]); > t++; > } > -- WBR, Vadim Zhukov

Return ESRCH instead of zero result for KERN_FILE sysctl

2016-04-30 Thread Vadim Zhukov
for ESRCH to avoid going inside kmem without real need. Tested on amd64. Comments? Okays? -- WBR, Vadim Zhukov Index: sys/kern/kern_sysctl.c === RCS file: /cvs/src/sys/kern/kern_sysctl.c,v retrieving revision 1.300 diff -u

Re: anti-ROP mechanism in libc

2016-04-26 Thread Vadim Zhukov
ar x ${_lib}.a cc -shared -o $_lib $(ls *.so | sort -R) $(cat .ldadd) [[ -s $_lib ]] && file $_lib | fgrep -q 'shared object' LD_BIND_NOW=1 LD_LIBRARY_PATH=$_tmpdir awk 'BEGIN {exit 0}' install -S -o root -g bin -m 0444 $_lib /usr/lib/$_lib ) } -- WBR, Vadim Zhukov

Re: Allow bioctl to go through all controllers at once

2016-04-18 Thread Vadim Zhukov
> 2 packets transmitted, 0 packets received, 100.0% packet loss :) I see many people are doing something in persistent memory subsystems now. Maybe this diff could get some attention now as well. :) Resending the whole thing. -- WBR, Vadim Zhukov Index: bioct

Re: Scheduler hack for multi-threaded processes

2016-03-27 Thread Vadim Zhukov
cables from motherboard, to avoid it generating electricity when spinning. I know two cases of killed this way motherboards (not ThinkPad, but still). -- WBR, Vadim Zhukov

Re: The Case of Lost TM_ZONE

2016-03-06 Thread Vadim Zhukov
to empty string, as specified in strftime(3). Okay for this version? -- WBR, Vadim Zhukov Index: wcsftime.c === RCS file: /cvs/src/lib/libc/time/wcsftime.c,v retrieving revision 1.6 diff -u -p -r1.6 wcsftime.c --- wcs

The Case of Lost TM_ZONE

2016-02-28 Thread Vadim Zhukov
major bump? Please note that some software doesn't zero out struct tm before use, resulting in garbage being written to this field. If you'd call the strftime() or wcsftime() on such struct, you'll get core dumped (in the best case). I'm looking at you, Qt! -- WBR,

Re: [patch] cleanup vi

2016-01-23 Thread Vadim Zhukov
things in case of ENOMEM. My point is that we should make them visible first, by doing a simple, reviewable change like unmacrosing the C module files, and only then remove/rework stuff. -- WBR, Vadim Zhukov

Re: [patch] cleanup vi

2016-01-22 Thread Vadim Zhukov
ch, since they also included a v_wstrdup > function which takes CHAR_T, which in their code can be an u_char or a > wchar_t depending on the compile options and I don't want to get entangled > in there. > The 6th patch should speak for itself. Cool, thank you for work! -- WBR, Vadim Zhukov

Re: Don't override all errors in opendev

2016-01-19 Thread Vadim Zhukov
2016-01-20 1:10 GMT+03:00 Vadim Zhukov : > Not all errors coming from diskmap should be overwritten. > In particular, if we get EBUSY, that doesn't mean "try again with > accessing /dev/foo, fail and return ENOENT instead". > > Maybe we should add more errors to

Don't override all errors in opendev

2016-01-19 Thread Vadim Zhukov
pert in this area; 2) open for improvements. How to reproduce: tunefs / Before patch: tunefs: /dev/r286cb876606dc1e0.l: No such file or directory After patch: tunefs: /dev/sd0l: Device busy Okay? -- WBR, Vadim Zhukov Index: opendev.c

Re: Putting more consistency on SYNOPSIS in section 5

2016-01-08 Thread Vadim Zhukov
2016-01-07 19:12 GMT+03:00 Ingo Schwarze : > Hi Vadim, > > Vadim Zhukov wrote on Wed, Jan 06, 2016 at 04:41:13PM +0300: > >> While mdoc(7) says that section 5 manuals do not need SYNOPSIS usually, >> we have 34 pages that do: > [...] > >> Two of those contai

Putting more consistency on SYNOPSIS in section 5 (was: mention /etc/doas.conf instead of plain doas.conf)

2016-01-06 Thread Vadim Zhukov
.Nm", or ".Nm foo". Those are totally useless, and the patch for those is below. Okay? -- WBR, Vadim Zhukov Index: lib/libedit/editrc.5 === RCS file: /cvs/src/lib/libedit/editrc.5,v retrieving revision 1.28

Re: mention /etc/doas.conf instead of plain doas.conf

2016-01-06 Thread Vadim Zhukov
gt; +in > +.Nm /etc/doas.conf > configuration file. > .Pp > The rules have the following format: I think it's rather the login.conf(5) is wrong here... And the default file placement is usually shown in the FILES section. On the other side, the /etc is default system configuration directory anyway, so /etc/doas.conf should be the first, obvious guess... no? -- WBR, Vadim Zhukov

Re: UTF-8 support for uniq(1)

2015-12-10 Thread Vadim Zhukov
(void)mbtowc(NULL, NULL, MB_CUR_MAX); > + wc = L'?'; > + len = 1; > + } > + str += len; > + } > } > - for (nchars = numchars; nchars-- && *str && *str != '\n'; ++str) > - ; > + > + /* Skip some additional characters. */ > + for (nchars = numchars; nchars-- && *str != '\0'; str += len) > + if ((len = mblen(str, MB_CUR_MAX)) == -1) > + len = 1; > + > return (str); > } Reads good to me, okay zhuk@. -- Vadim Zhukov

Re: doas password prompt

2015-12-02 Thread Vadim Zhukov
for me, but why not just add '\u@\h' to PS1 instead? -- WBR, Vadim Zhukov

Re: clean up mbtowc(3) man page

2015-10-27 Thread Vadim Zhukov
. IMHO, better would be: .Fa pwc -is completely ignored. +is ignored. > .It pwc == NULL > .Fn mbtowc > executes the conversion as if > .Fa pwc > -is non-null, but a result of the conversion is discarded. > +was not > +.Dv NULL , > +but the result of the conversion is discarded. IMHO, this should clarify if this would modify internal state. Other than that, looks okay to me. -- WBR, Vadim Zhukov

Re: mini utf-8 hexdump

2015-10-27 Thread Vadim Zhukov
t(*bp)) { > + (void)printf(pr->fmt, ' '); > + } else { > + (void)printf(pr->fmt, isprint(*bp) ? *bp : '.'); > + } > break; > case F_STR: > (void)printf(pr->fmt, (char *)bp); So in case of the mangled UTF8 codepoint like the following you'll print more bytes than you should (two at max), no? 110x 10xx 10xx -- WBR, Vadim Zhukov

Re: csh: kill profiling & debugging ifdefs

2015-10-26 Thread Vadim Zhukov
2015-10-26 21:55 GMT+01:00 Christian Weisgerber : > Remove the profiling and debugging ifdefs. Most of this is for > instrumenting the expression evaluator and has been in place for > 35 years. I think we're done debugging. > > ok? okay zhuk@ -- WBR, Vadim Zhukov

Spaces are allowed in pdisk partitions, aren't they?

2015-10-26 Thread Vadim Zhukov
same behaviour. So I'm asking for confirmation (or something I could count like an appropriate okay). Any suggestions are welcome too, of course; main point here is to remove conflicting statements. -- WBR, Vadim Zhukov Index: pdisk.8 ===

Unexpected behaviour of repquota -a /

2015-10-26 Thread Vadim Zhukov
Running "repquota -a /" is silly, so lets behave the same way other utilities do. Okay? -- WBR, Vadim Zhukov Index: repquota.8 === RCS file: /cvs/src/usr.sbin/repquota/repquota.8,v retrieving revision 1.10 diff -u

Re: Restrict envvar names

2015-10-25 Thread Vadim Zhukov
2015-10-25 17:03 GMT+01:00 Stefan Sperling : > On Sun, Oct 25, 2015 at 04:36:29PM +0100, Vadim Zhukov wrote: >> This patch restricts characters you could use in environment variable >> names passed via execve(2). Note that values are not affected, you're >> still allo

Restrict envvar names

2015-10-25 Thread Vadim Zhukov
we do want environment variables named in UTF-8? -- WBR, Vadim Zhukov Index: sys/kern/kern_exec.c === RCS file: /cvs/src/sys/kern/kern_exec.c,v retrieving revision 1.169 diff -u -p -r1.169 kern_exec.c --- sys/kern/kern_exec.c

Re: does anoybody use ul?

2015-10-23 Thread Vadim Zhukov
(unsigned char)c" here? > obuf[col].c_mode |= BOLD|mode; > else > obuf[col].c_mode = mode; > + if (col > 0 && isu8cont(c)) > + obuf[col].c_mode = obuf[col - 1].c_mode; Is this right? Shouldn't it just ignore c_mode changing in isu8cont(c)==1 case, and on isu8cont(c)==0 case go back through all isu8cont()==1 characters and set their mode based on non-cont character following them? > col++; > if (col > maxcol) > maxcol = col; > -- WBR, Vadim Zhukov

Re: does anoybody use ul?

2015-10-23 Thread Vadim Zhukov
@@ -241,6 +250,8 @@ mfilter(FILE *f) > obuf[col].c_mode |= BOLD|mode; > else > obuf[col].c_mode = mode; > + if ((c & (0x80 | 0x40)) == 0x80 && col > 0) > + obuf[col].c_mode = obuf[col - 1].c_mode; > col++; > if (col > maxcol) > maxcol = col; > -- WBR, Vadim Zhukov

Further cleanup of Russian calendars

2015-10-23 Thread Vadim Zhukov
s the only thing this file was about; * A few other corrections. Still seeking for a way to define a day with fixed shift from the year start: the Programmer's Day is official in Russia, happens at 256th day of the year, but calendar(1) handles up to 31 days per month max. Okay? -- WBR,

  1   2   3   >