Re: Solving the syslogd problem

2020-01-29 Thread Alexander Nasonov
Thor Lancelot Simon wrote: > On Wed, Jan 29, 2020 at 11:33:22AM +0100, Joerg Sonnenberger wrote: > > On Tue, Jan 28, 2020 at 09:21:23PM +, Roy Marples wrote: > > > To fix this, I suggest that we split syslogd into syslogd and > > > syslogd-network. > > > > We could also do a much simpler and

Re: colorls in base

2019-02-18 Thread Alexander Nasonov
Martin Husemann wrote: > On Sun, Feb 17, 2019 at 09:56:56PM +0000, Alexander Nasonov wrote: > > New features should start from the installer ;-) > > > > IMO, the installer should offer two choices of colour and > > the selected choice should become a default for o

Re: colorls in base

2019-02-17 Thread Alexander Nasonov
Marc Balmer wrote: > New features schould be on by default, why else would we import them? New features should start from the installer ;-) IMO, the installer should offer two choices of colour and the selected choice should become a default for other tools. -- Alex

Passing too long spec string to getfsspecname(3)

2018-12-26 Thread Alexander Nasonov
This code is potentially dangerous: vname = malloc(strlen(name) * 4 + 1); /* vname == NULL check */ strunvis(vname, name); because multiplication by 4 can overflow. It's easy to add a range check but strunvis(3) manual states that the dst buffer should have the same length

Re: Moving telnet/telnetd from base to pkgsrc

2018-12-15 Thread Alexander Nasonov
Taylor R Campbell wrote: > I know English may not be your first language, so here's a couple of > dictionary entries if you would like to read further: > > https://en.wiktionary.org/wiki/name-calling > https://www.merriam-webster.com/dictionary/name-calling Patronising? -- Alex

Re: Moving telnet/telnetd from base to pkgsrc

2018-12-15 Thread Alexander Nasonov
Taylor R Campbell wrote: > One of the implications at the moment is that anyone on the internet > between you and the remote host can crash your telnet client[*] with > no user interaction beyond making a connection. Index: ./usr.bin/telnet/telnet.1

Re: Sample based profiling

2018-07-29 Thread Alexander Nasonov
Joerg Sonnenberger wrote: > On Sun, Jul 29, 2018 at 02:45:51PM +0100, Alexander Nasonov wrote: > > I wanted to vote for option 3 if we have better tools but devel/gperftools > > didn't build on my amd64 boxes (-current and -8): > > Works for me? PKGSRC_COMPILER=

Re: Sample based profiling

2018-07-29 Thread Alexander Nasonov
Joerg Sonnenberger wrote: > ... > (1) Introduce a dynamic version of libc_pg. > (2) Stop pretending that -pg means dynamic linking and implicitly add > -static. > (3) Stop pretending that -pg makes sense on modern hardware. > > Fundamentally, I think the third option is the correct way forward. >

Re: unix(3lua)

2018-05-19 Thread Alexander Nasonov
Sevan Janiyan wrote: > On 19/05/2018 11:36, Alexander Nasonov wrote: > > The main page of the repository says it's incomplete. > > "This module does not aim to be complete, it merely contains functions > that I needed at some point of time" OK, my statement w

Re: unix(3lua)

2018-05-19 Thread Alexander Nasonov
Sevan Janiyan wrote: > Hello, > There is a unixlua[1] module which is a Lua binding for some the > functions in our C libraries in base as well as system calls. The code > base is small and doesn't have any tentacles (a hand full of C files, > excluding headers), It's licensed under a 3 clause styl

Re: unix(3lua)

2018-05-17 Thread Alexander Nasonov
David Holland wrote: > On Thu, May 17, 2018 at 03:41:26PM +0200, Marc Balmer wrote: > > One more thing: When we imported Lua into base, we very clearly > > decided that pkgsrc Lua and base Lua should be two separate things. > > Base Lua can not use pkgsrc Lua modules by default (and most > > pr

Re: /dev/clockctl, O_CLOEXEC and forking

2018-05-01 Thread Alexander Nasonov
Alexander Nasonov wrote: > I didn't set nodev specifically for /var/chroot, my /var is mounted with > nodev,noexec. It worked for me with no problem until I tried to chroot > ntpd. It didn't fail to start but it clearly didn't work. It's even > more subtle for

Re: /dev/clockctl, O_CLOEXEC and forking

2018-05-01 Thread Alexander Nasonov
Christos Zoulas wrote: > named seems to be needing random and null... It is reasonable to run > with nodev, but it buys you little... I mean they processes run as non > root in a chroot you have created that only has the device nodes they > need. It would be hard for them to create more. I didn't

Re: /dev/clockctl, O_CLOEXEC and forking

2018-05-01 Thread Alexander Nasonov
Christos Zoulas wrote: > In article <20180429192706.GA25516@neva>, > Alexander Nasonov wrote: > > >I don't think adjtime will work because ntpd still runs as root and > >it can't drop to an unprivileged user before it calls chroot(2). > > Right it is

Re: /dev/clockctl, O_CLOEXEC and forking

2018-04-30 Thread Alexander Nasonov
Alexander Nasonov wrote: > Christos Zoulas wrote: > > After fork it would work fine, after exec, not so much as the name implies > > :-) > > Ah, you're right. 'step-systime: Bad file descriptor' messages in syslog > confused me. It was a pilot error.

Re: /dev/clockctl, O_CLOEXEC and forking

2018-04-29 Thread Alexander Nasonov
Christos Zoulas wrote: > After fork it would work fine, after exec, not so much as the name implies :-) Ah, you're right. 'step-systime: Bad file descriptor' messages in syslog confused me. > It may be closed by something else, but not the fork. Something else breaks it, I guess. I will look fur

/dev/clockctl, O_CLOEXEC and forking

2018-04-29 Thread Alexander Nasonov
While looking whether it's possible to change ntpd to work when chrooted to a file system mounted with the nodev flag, I noticed that /dev/clockctl is open with O_CLOEXEC and its file descriptor is kept in a static variable. I'm not sure it will work after a fork correctly. ntpd doesn't open /dev/