Re: xauth segfault

2019-10-17 Thread Klemens Nanni
On Thu, Oct 17, 2019 at 10:30:54PM +0100, cho...@jtan.com wrote:
> I don't even know where to begin with this one
Start with providing a backtrace from the core dump:  build xauth with
debug symbols and reproduce, then inspect with gdb.

Otherwise you're on your own with this very special setup.



Re: relayd: Binding to port range

2019-10-10 Thread Klemens Nanni
On Thu, Oct 10, 2019 at 04:45:37PM +0200, Norman Golisz wrote:
> it seems relayd's configuration syntax does not allow specifying port
> ranges, like 9740:10200. Am I correct?
Depends on where;  search for "range" in relayd.conf(5).



Re: pf.conf anchor directories

2019-08-20 Thread Klemens Nanni
yes



Re: Who is 'anchor 11' (pfctl -vvss ./. pfctl -vsA)?

2019-01-02 Thread Klemens Nanni
On Wed, Jan 02, 2019 at 07:09:54PM +0100, Philipp Buehler wrote:
> 'pfctl -vvss':
> all tcp 10.45.30.7:993 (public-nat:993) <- remote-ip:4690
> ESTABLISHED:ESTABLISHED
>[1683650613 + 66296] wscale 7  [3702552199 + 16768] wscale 2
>age 04:32:22, expires in 00:09:25, 745:737 pkts, 55579:87226 bytes,
> anchor 11, rule 0, source-track
Anchor 11 is the twelfth rule in your main ruleset (the anchor rule),
in which the first rule established this state.

>id: 5b5139707ff0259a creatorid: cfe3cb20
> 
> Now, who is 'anchor 11'? By no means 'relayctl show redirects' or 'pfctl
> -vsA' or "pfctl -a 'relayd/*' -vvsr"
> would give me a "numbered" clue. The anchors are ascii/literally named - no
> number like on the
> rules in 'pfctl -vvsr'.
`pfctl -vv -s rules -R 11' shows this very rule,
`pfctl -vv -s states -R 11' will show all states established by this
rule if any.

> In the current case I've only one relayd-redirection with port 993, so I can
> guestimate the anchor.
> 
> Am I overlooking a pfctl/relayctl option or is '11' internal only?
Provide your ruleset so we can look at actual rules without guessing in
case your problem persists, `pfctl -a\* -s rules' prints them including
anchors.



Re: pfctl: cidr typo bug

2018-11-11 Thread Klemens Nanni
On Sun, Nov 11, 2018 at 12:01:33PM -0600, Andrew wrote:
> ~: doas pfctl -t cidr_typo -T add 1.2.3.4*5
> 1 table created.
> 1/1 addresses added.
I fail to reproduce this with recent snapshots on both amd64 and sparc64:

# pfctl -t cidr_typo -T add 1.2.3.4*5
no IP address found for 1.2.3.4*5

> ~: doas pfctl -t cidr_typo -T show127.0.0.1

# pfctl -t cidr_typo -T show
pfctl: Table does not exist.



Re: Persistent flags for disabled daemons?

2018-11-03 Thread Klemens Nanni
On Sun, Nov 04, 2018 at 12:41:17AM +, John Long wrote:
> If I use rcctl set to set minidlna's flags to -R it seems it will only
> allow me to do it when minidlna is enabled. I would like the flags to
> survive disablement because I don't want to start the minidlna server
> every time the box comes up.
Settings flags for disabled daemons is not possible as rcctl tells you.

Keeping flags when disabling daemons with rcctl is currently not
possible.  The only way to do so is by commenting the rc.conf.local line
manually.



Re: ~OT:In ksh,can bind ctrl+L to clear+redraw also wh. typing started,like in bash?

2018-11-02 Thread Klemens Nanni
On Fri, Nov 02, 2018 at 11:03:34AM +, Tinker wrote:
> Could some other ^ shortcut be an ignore-this-line-from-history marker?
I'm inclined to say no; HISTCONTROL=ignorespace works fine and adding
yet another way to do achieve the same only to compensate user errors
is out of scope here.

> ^I as in ignore, "bind -m '^L'=^U^Iclear'^J^Y'" :)
^I is tab, see `complete-list' under "Emacs editing mode" in ksh(1).



Re: vmm(4) on apu2c4

2018-10-29 Thread Klemens Nanni
On Mon, Oct 29, 2018 at 01:38:18AM -0700, Mike Larkin wrote:
> does dmesg have a vmm0: SVM/RVI line?
Yes.



Re: ksh equivalent to shell-expand-line

2018-10-10 Thread Klemens Nanni
On Wed, Oct 10, 2018 at 08:58:43AM +0900, Hajime Edakawa wrote:
> I have challenged to try to make shell_expand_line in ksh.
> You can check it if you type M-C-e.
Thanks for your work.

> $ echo "$(echo a b)"
> $ echo "a b"
> 
> $ alias ll='ls -l'
> $ ll $(echo a b) hoge "$(( 1 + 1 ))" ll bar
> $ ls -l a b hoge "2" ll bar
This looks nice.

With `alias ls=ls\ -l' and successive expand-line invocations: will
`ls' be expanded over and over again?

Did you test it in vi mode as well?

> To be honest, I'm not sure if this is correct.
> I only like OpenBSD, That's why I'm so sorry if they're wrong
Your diff does not apply to -CURRENT (written against 6.3) and lacks
documentation updates to ksh(1).



Re: ksh equivalent to shell-expand-line

2018-10-07 Thread Klemens Nanni
On Sun, Oct 07, 2018 at 07:30:15PM +0200, Tomasz Rola wrote:
> Another trick may be executing the line with echo prepended - should
> do all expansions and write what will be executed. I think it is not
> going to work too well if for loop is being echoed, and other such
> things, so perhaps quoting a command and echoing would do the job.
This will break any non-trivial construct including pipes, command lists,
loops, (nested) quoting, et al.



Re: FreeBSD 11.2 under vmm

2018-10-06 Thread Klemens Nanni
On Fri, Oct 05, 2018 at 06:46:52PM -0700, Joseph Olatt wrote:
> I am trying to install FreeBSD 11.2 under vmm and I am not seeing any
> success. The booting of the install ISO keeps looping after a certain
> point. See included log.
This is a known issue, vmd(8) should tell you this:

Oct  7 00:16:18 x250 vmd[20993]: vmd: no pci i/o function for reg 0xbc80

FreeBSD requires local APIC support which vmm(4) does not provide yet.
http://man.freebsd.org/apic



Re: ksh equivalent to shell-expand-line

2018-10-06 Thread Klemens Nanni
On Sat, Oct 06, 2018 at 09:38:42PM +0200, John Ankarström wrote:
> Is there a way for ksh to expand a $(command substitution) without having to
> execute the entire line?
No.

> bash provides this via shell-expand-line (bound to Ctrl-Alt-e by default),
>From bash(1):

shell-expand-line (M-C-e)
Expand the line as the shell does.  This performs alias and
history expansion as well as all of the shell word expansions.

And yet, it disregards quoting and will errornously expand the following
example into multiple words instead of one:

bash-4.4$ echo "$(echo a b)"
bash-4.4$ echo a b

> and ksh seems to have expand-file, but that only works for filenames.
We have no other expanding functions.



Re: want.html: Unifi wifi gear for interop debugging

2018-10-06 Thread Klemens Nanni
On Sat, Oct 06, 2018 at 09:52:18AM +, Tim Jones wrote:
> As someone who has recently donated, surely this is the very sort of thing 
> the OpenBSD Foundation should be funding ?  I didn't just give money to pay 
> for electricity bills caused by people insisting on maintaining racks of 
> vintage room-heaters.
https://www.openbsdfoundation.org/activities.html



Re: pfctl tables: adding a CIDR typo to a new table

2018-10-05 Thread Klemens Nanni
On Fri, Oct 05, 2018 at 04:02:12PM -0600, Andrew wrote:
> recent snapshot:
> 
> $> uname -vrsm
> OpenBSD 6.4 GENERIC#329 amd64
What's the timestamp? Please provide more detailed information next time.

> $> doas pfctl -t sample -T add 74.125.0.0*16
> 1 table created.
> 1/1 addresses added.

It's not recent enough:

$ sysctl -n kern.version | head -n1
OpenBSD 6.4 (GENERIC.MP) #0: Thu Oct  4 00:29:55 CEST 2018
# for s in 1\*8 74.125.0.0\*16 ::1-64 ; do
> pfctl -t sample -T add $s
> done
no IP address found for 1*8
no IP address found for 74.125.0.0*16
no IP address found for ::1-64



Re: pf: anchor not honoring quick

2018-09-29 Thread Klemens Nanni
On Sat, Sep 29, 2018 at 06:17:05PM +0200, Fabian Mueller-Knapp wrote:
> I have the following pf.conf:
> 
> anchor quick {
>   pass
> }
> block
> 
> # pfctl -sr
> anchor quick all {
>   pass all flags S/SA
> }
> block drop all
> 
> Because of the 'quick' i assumed, that 'block' is never reached, but it
> is since 6.2.
Indeed, `pfctl -s rules -v' clearly shows how every packet goes through
all three rules.

> man pf.conf(5) states:
> 
> "If the anchor itself is marked with the quick option, ruleset
> evaluation will terminate when the anchor is exited if the packet is
> matched by any rule within the anchor."
> 
> I tested with fresh installs of 6.1, 6.2, 6.3 and current via vmd and
> 6.1 does in fact behave as i would accept (that is, all packets
> pass). From 6.2 on however, all packets are dropped.
Thanks for your report.

> Do i misread the manpage somehow?
No, this is a bug.



Re: pfctl tables and a mangled ip address

2018-09-13 Thread Klemens Nanni
On Thu, Sep 13, 2018 at 12:21:28PM -0600, Andrew wrote:
> Try this on a patched 6.3 amd64.
Not sure since when but this is fixed in -current.

$ sysctl -n kern.version
OpenBSD 6.4-beta (GENERIC.MP) #292: Mon Sep 10 18:26:22 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

> $> pfctl -t sample -T add 66.135.216.190.216
> 2/2 addresses added.

$ doas pfctl -t sample -T add 66.135.216.190.216
no IP address found for 66.135.216.190.216

> $> pfctl -t sample -T show

$ doas pfctl -t sample -T show
   176.0.0.0/8
   205.251.192.0/18



Re: OpenBSD as a DHCPv6 client

2018-08-12 Thread Klemens Nanni
On Sun, Aug 12, 2018 at 10:10:18PM +0200, z...@aaathats3as.com wrote:
> Is there still no native way to do this?
There is no DHCPv6 client in base, I recommend net/dhcpcd.



Re: Lenovo X130e blank video at boot.rd

2018-02-28 Thread Klemens Nanni
On Wed, Feb 28, 2018 at 07:18:46PM +0100, Stefan Sperling wrote:
> On Wed, Feb 28, 2018 at 11:23:20AM -0500, Allan Streib wrote:
> > j...@bitminer.ca writes:
> > 
> > > Just for laughs I booted an OpenBSD 4.2 CD, circa 1997 (and five years 
> > > older than the hardware) and while it recognized few devices it did show 
> > > all video correctly.  The video device vga1 shows as vendor "ATI" 
> > > unknown product 0x9806 rev 0x00.
> > 
> > That release predates the introduction of the framebuffer console.
> > 
> > I have had a problem since that started, the video mode selected is
> > incorrect and I see the boot messages in VGA mode until the framebuffer
> > console is activated, then the screen goes blank and pops up a message
> > complaining about the video mode. I have to do a blind login and then
> > run startx. Never learned how to disable wsdisplay and keep the simple
> > 80x24 console.
> > 
> > Allan
> 
> The x130e can boot in either UEFI or legacy mode.
> 
> I have 'UEFI/Legacy Boot' set to 'Both' and 'UEFI/Legacy Boot Priority'
> set to 'Legacy First'.
> 
> Maybe this issue only happens with UEFI?
Most likely.

I have no such board around to test but this sounds similar to what I
experienced with a ThinkPad X121e:

https://marc.info/?l=openbsd-tech=150457245320842=2

Try setting different video and/or GOP modes as described in to see
whether this is just another cripled UEFI setup.

https://marc.info/?l=openbsd-tech=150557217729175=2



Re: libasr/libevent question

2018-02-16 Thread Klemens Nanni
On Fri, Feb 16, 2018 at 08:52:13AM -0600, ed...@pettijohn-web.com wrote:
> Perhaps a doc bug then. Or an interpretation bug on my part.
>From event_init(3)'s DESCRIPTION:

The event API needs to be initialized with event_init() before
it can be used.

> 
> The event_asr_run() function is used to schedule the asynchronous resolver 
> query aq to run within a libevent event loop, and call the fn callback when 
> the result is available. The extra arg parameter is passed to the callback. 
> The user does not need to set up an event structure for using this function. 
> It returns an opaque handle representing the running query. This handle 
> becomes invalid before the callback is run. 
> 
> I interpreted this to mean it took care of the event stuff for me. Either 
> way, thanks. 
> On Feb 16, 2018 8:21 AM, Eric Faurot  wrote:
> >
> > On Thu, Feb 15, 2018 at 07:41:55PM -0600, Edgar Pettijohn wrote:
> > > I have this trivial program that I keep getting a segfault trying to use
> > > event_asr_run(). I have #if 0'd working code to show my progression from
> > > getaddrinfo() to event_asr_run(). It is hopefully something trivial that 
> > > I'm
> > > overlooking.  Anyway I compiled like so:
> >
> > You need to call event_init() before using other libevent functions.
> >
> > Eric.
> >
> 



Re: Thinkpad x230 usb3 xhci(4) issues with usb drives

2018-01-03 Thread Klemens Nanni
On Wed, Jan 03, 2018 at 09:33:59AM -0600, J Vans wrote:
> I am running Current on an x230 with coreboot and do not have a problem with 
> the usb 3.0 port. I haven't updated coreboot for awhile, so either they 
> changed something or your build config needs to be modified (my guess is the 
> latter).
> 
> $ dmesg | grep coreboot
> bios0: vendor coreboot version "CBET4000 4.5-1440-geb1bdd8-dirty" date 
> 03/29/2017
The port itself works, it seems only USB 3.0 is bugged. I can confirm
this with my X230 running some 4.5 build.



Re: mpv zombie process, lock sound device upon suspending process

2017-12-26 Thread Klemens Nanni
On Tue, Dec 26, 2017 at 08:56:12AM -0200, x9p wrote:
> If someone can give it a try, I had found no solution to free the sound 
> device or to kill a
> mpv zpmbie process.
> 
> Inside a tmux panel, while playing any audio/video, hit CTRL+Z . Then you 
> will not be able to
> resume the process with fg, neither kill it, and it will lock the sound 
> device until next
> reboot.
After suspending it, the mpv process will be stopped, indicated by
ps(1) with the T state.

Sending a SIGCONT signal continues the mpv process which will eventually
exit.



Re: Manual to cd (change working directory)

2017-12-13 Thread Klemens Nanni
On Wed, Dec 13, 2017 at 10:22:32PM +0100, Freddy Fisker wrote:
> Hi
> 
> I can't get the manual to the cd (change working directory) command. When I
> am trying, I get the manual to cd (ATAPI and SCSI CD-ROM driver) instead.
> 
> It's the same with: man cd
> 
> and in: https://man.openbsd.org/cd
The others already provided plenty of help with regard to manual pages,
however the shell itself may help you out, too:

$ type cd
cd is a shell builtin

To illustrate this further:

$ types an alias for 'whence -v'
$ type whence
whence is a shell builtin

ksh(1) has all the details about (special) builtins; of course there is
a tag for `whence' so :twhence as described already by
Ingo will bring you right to it.



Re: Chip cheaper than chips

2017-12-02 Thread Klemens Nanni
On Sat, Dec 02, 2017 at 03:11:23AM -0500, Rupert Gallagher wrote:
> IME (vPro) is included in Xeon and Core chips. Atom is clear of it. Just 
> checked.
Check again.

vPro is nothing but a collective name for various technologies such as
VT-x, VT-d and primarily Active Management Technology (AMT); these can
be part of the Management Engine's firmware depending on the package.

Intel integrates their ME in *all* chipsets since 2006. Again: *every*
CPU manufactured by Intel ships it since then. Integration, architecture
and features have been changing immensly over time.



Re: spectrwm with conky

2017-11-25 Thread Klemens Nanni
On Fri, Nov 24, 2017 at 02:16:16PM -0600, Edgar Pettijohn wrote:
> I'm curious if someone has a better way to display the temp with conky than 
> this:
> 
> Temp:${exec sysctl hw.sensors.acpithinkpad0.temp0 | cut -d = -f 2 | cut -d . 
> -f 1}C
Afaik sysctl is the only way to get such temperatures, but you should
use `-n' instead of stripping the MIB name.



Re: spam and pf

2017-11-18 Thread Klemens Nanni
On Sat, Nov 18, 2017 at 05:11:23PM -0600, Edgar Pettijohn wrote:
> I read an article written I believe by Mr. Hansteen about using 
> pf queues to mess with email spammers. Now that I have time to 
> play around with it I can't seem to find it again. Does anyone 
> know the article I speak of and can possibly provide a link.
http://bsdly.blogspot.de/2017/04/forcing-password-gropers-through.html ?



Re: late ro remount to permit reorder_kernel on 6.2

2017-10-29 Thread Klemens Nanni
On Sun, Oct 29, 2017 at 12:32:58PM +0100, Marko Cupać wrote:
> I know read-only setups are unsupported, modifying base files as
> well, but if someone has an advice on what would be a better way of
> remounting local file systems read-only after kernel relinking is done,
> I'd be grateful.
You can use rc.local(8).



Re: Question about sshd log disconnect entry

2017-10-20 Thread Klemens Nanni
On Fri, Oct 20, 2017 at 04:21:34PM -0400, J Doe wrote:
> I have a question regarding a log entry from sshd in the auth.log of an 
> Ubuntu 16.04 LTS server that I run.  Upon disconnect, it displays:
> 
> Oct 20 16:08:23 server sshd[1234]: Received disconnect from 1.2.3.4 port 
> 1:11: disconnected by user
> 
> What does the number after the port number represent (in this case - 11) ?
Reason code 11: SSH2_DISCONNECT_BY_APPLICATION