Re: FAQ: 14.21.5 - Softraid notes

2016-02-22 Thread Nick Holland
On 02/22/16 10:46, Theo Buehler wrote:
>>   Note that we did not specify the altroot device by DUID, but by device
>>   name. We probably want to be pushing from the boot device to the
>>   secondary device, which can end up changing if the drive order is
>>   changed. For this reason, you may want to specify the root and altroot
>>   in /etc/fstab as a device name, not a DUID. 
> 
> To be clear: the reason I'm hesitating is that I have no idea whether
> this really is sound advice or not.

Today, probably better to do bootable softraid (which was still fairly
primitive when I wrote that).

However, given the root partition, altroot partition and the rest as
softraid, yes, think about it a bit -- you want your / device to be
whatever is available as your '0' device, not a DUID that failed.

So let's say we got this:
65453c66b41bb710.a / ffs rw,softdep 1 1
034f77b0c2a1fe2e.d /altroot ffs xx 0 0

Now, 65453c66b41bb710 fails.
Your new root is 034f77b0c2a1fe2e.a, except it isn't, because you
hard-coded the old root into both copies of fstab.  Works much better if
that were saying "/dev/sd0a" instead (though there are still failure
cases -- if the old boot drive can't boot, but still shows up as sd0,

But bootable SR is still probably the way to go.

Oververbose, over documentation.  Nuke it.

Nick.



Thousands separator in printf?

2016-02-22 Thread Alan Corey
I'm not dyslexic but I have trouble looking at big numbers like 10
digits and telling which is bigger.  So I Googled and with most GCC
versions with a working locale you put something like %'u in a printf.
I also saw mention of a SATSEP macro, but I'm not getting anything to
work.  I know I could write a formatting function, I just wondered if
there's an easier way.  And I'm counting bytes, not dollars. :)

-- 
Credit is the root of all evil.  - AB1JX



Re: Keeping existing lpd/lpr/printcap commands/options for legacy use on existing systems

2016-02-22 Thread Ingo Schwarze
Hi Chris,

Chris Bennett wrote on Mon, Feb 22, 2016 at 07:43:46AM -0600:

> Should a new set of names be created

Don't focus on the colour of the bikeshed, focus on fixing bugs,
improving code quality, and improving usability, the latter ideally
without adding new elements to the user interface, as far as possible.

Look at innovations.html.  New names exist, but mostly for programs
providing completely new functionality.  Even drastically reducing
interface size does not always require a new name, consider httpd(8).
Exceptions do exist, for example when you want to stress that you
are not at all aiming at a full replacement and want to call people's
attention to that fact that drastic reduction of functionality is
intentional, consider sudo(8).

> Keep using printcap file for new work or put an example into a man
> page for legacy users and create a new /etc file for printing?

Hard to say.  Usually, at least a rough overview of desired
functionality is required to design a good user interface.
At this point, i wouldn't focus on modifying the user interface.
Too few patches have been seen to even judge the direction this
is heading.

Yours,
  Ingo



Re: GUI Designer

2016-02-22 Thread Kamil Cholewiński
If your program / tool mainly operates on lines of text, you absolutely
must check out dmenu .

You can write a program launcher, ssh launcher, file manager, music
player, copy to clipboard, password vault, Wifi selector, todo/calendar
app, web bookmarks manager, list email headlines, mount volumes, kill
processes... All with a bunch of simple shell scripts and stdio.

I would say this is the most UNIX-y way to do a GUI.

K.



OpenBSD missing manpages?

2016-02-22 Thread Henrique N. Lengler
Hi,

As I posted here , 
I was in an attempt to work with wskbd, and seeking for documentation.

I said that the only info I get was wskbd(4), which does not provide info about
working with code and the wskbd framework.

_tl;dr_ - Turns out that I could find information about wskbd framework 
(wskbd(9)), 
and the others like wsdisplay, wsmouse ... not on my system, but on netbsd
manpages.

See the links:

http://netbsd.gw.com/cgi-bin/man-cgi?wskbd+9+NetBSD-6.0
http://netbsd.gw.com/cgi-bin/man-cgi?wsdisplay+9+NetBSD-6.0
http://netbsd.gw.com/cgi-bin/man-cgi?wsdisplay+9+NetBSD-6.0
...

So the question is, shouldn't openbsd include these manpages, or at least any
other that document these frameworks?



Re: asking for help compiling dns stats collector (dsc)

2016-02-22 Thread Stuart Henderson
On 2016-02-21, Imre Oolberg  wrote:
> Hi!
>
> I am in the middle of implementing https://www.dns-oarc.net/tools/dsc/ 
> while on OpenBSD is running nameserver process i.e. there needs to be 
> also collector part of DSC and I am not succeeding compiling it. 
> Platform is OpenBSD v 5.8 amd64 and source is dsc-201502251630.tar.gz. 
> After unpacking i get
>
> imre-obsd-58-rec:~/dsc/l/dsc-201502251630/collector# make
> ...
> cc -g -Wall -DUSE_IPV6=1 -g -O2  -g -Wall -DUSE_IPV6=1 -g -O2-c 
> base64.c
> cc -g -Wall -DUSE_IPV6=1 -g -O2  -g -Wall -DUSE_IPV6=1 -g -O2-c 
> generic_counter.c
> cc -g -Wall -DUSE_IPV6=1 -g -O2  -g -Wall -DUSE_IPV6=1 -g -O2-c 
> pcap.c
> cc -g -Wall -DUSE_IPV6=1 -g -O2  -g -Wall -DUSE_IPV6=1 -g -O2-c 
> ncap.c
> cc -g -Wall -DUSE_IPV6=1 -g -O2  -g -Wall -DUSE_IPV6=1 -g -O2-c 
> dns_protocol.c
> dns_protocol.c:9:33: error: arpa/nameser_compat.h: No such file or 
> directory
> *** Error 1 in dsc (:87 'dns_protocol.o')
> *** Error 1 in /root/dsc/l/dsc-201502251630/collector (Makefile:2 
> 'all')
>
> So i found that probably i need libbind package and continuing in 
> collector/dsc directory like this
>
> imre-obsd-58-rec:~/dsc/l/dsc-201502251630/collector/dsc# ./configure 
> CFLAGS="-I/usr/local/include/bind" LDFLAGS="-L/usr/local/lib/libbind"
>
> i get further (it think almost to the end on compilation)
>
> imre-obsd-58-rec:~/dsc/l/dsc-201502251630/collector/dsc# make
> ...
> cc -g -Wall -DUSE_IPV6=1 -I/usr/local/include/bind   -g -Wall 
> -DUSE_IPV6=1 -I/usr/local/include/bind -c config_hooks.c
> cc -g -Wall -DUSE_IPV6=1 -I/usr/local/include/bind   -g -Wall 
> -DUSE_IPV6=1 -I/usr/local/include/bind -c hashtbl.c
> cc -g -Wall -DUSE_IPV6=1 -I/usr/local/include/bind   -g -Wall 
> -DUSE_IPV6=1 -I/usr/local/include/bind -c lookup3.c
> cc -g -Wall -DUSE_IPV6=1 -I/usr/local/include/bind   -g -Wall 
> -DUSE_IPV6=1 -I/usr/local/include/bind -c xmalloc.c
> cc -g -Wall -DUSE_IPV6=1 -I/usr/local/include/bind   -g -Wall 
> -DUSE_IPV6=1 -I/usr/local/include/bind -c inX_addr.c
> c++ -o dsc base64.o  generic_counter.o  pcap.o  ncap.o  dns_protocol.o  
> dns_message.o  ip_message.o  daemon.o  md_array.o  null_index.o  
> qtype_index.o  qclass_index.o  tld_index.o  country_index.o  
> rcode_index.o  qnamelen_index.o  qname_index.o  msglen_index.o  
> client_ipv4_addr_index.o  client_ipv4_net_index.o  
> md_array_xml_printer.o  ip_direction_index.o  ip_proto_index.o  
> ip_version_index.o  certain_qnames_index.o  query_classification_index.o 
> idn_qname_index.o  edns_version_index.o  edns_bufsiz_index.o  
> do_bit_index.o  rd_bit_index.o  tc_bit_index.o  qr_aa_bits_index.o  
> opcode_index.o  transport_index.o  dns_ip_version_index.o  
> dns_source_port_index.o  ParseConfig.o  config_hooks.o  hashtbl.o  
> lookup3.o  xmalloc.o  inX_addr.o  -L/usr/local/lib/libbind-lpcap 
>  ../TmfBase/Hapy/src/.libs/libHapy.a
> dns_protocol.o: In function `grok_question':
> /root/dsc/l/dsc-201502251630/collector/dsc/dns_protocol.c:93: warning: 
> warning: strcpy() is almost always misused, please use strlcpy()
> pcap.o: In function `handle_tcp':
> /root/dsc/l/dsc-201502251630/collector/dsc/pcap.c:552: warning: 
> warning: sprintf() is often misused, please use snprintf()
> query_classification_index.o: In function `a_for_a':
> /root/dsc/l/dsc-201502251630/collector/dsc/query_classification_index.c:71: 
> undefined reference to `__inet_aton'
> inX_addr.o: In function `inXaddr_ntop':
> /root/dsc/l/dsc-201502251630/collector/dsc/inX_addr.c:28: undefined 
> reference to `__inet_ntop'
> /root/dsc/l/dsc-201502251630/collector/dsc/inX_addr.c:31: undefined 
> reference to `__inet_ntop'
> inX_addr.o: In function `inXaddr_pton':
> /root/dsc/l/dsc-201502251630/collector/dsc/inX_addr.c:41: undefined 
> reference to `__inet_pton'
> /root/dsc/l/dsc-201502251630/collector/dsc/inX_addr.c:45: undefined 
> reference to `__inet_pton'
> collect2: ld returned 1 exit status
> *** Error 1 in /root/dsc/l/dsc-201502251630/collector/dsc (Makefile:65 
> 'dsc')
>
> For example text around query_classification_index.c:71 reads like this
>
> static int
> a_for_a(const dns_message * m)
> {
>  struct in_addr a;
>  if (m->qtype != T_A)
>  return 0;
>  if (inet_aton(m->qname, ))
>  return CLASS_A_FOR_A;
>  return 0;
> }
>
> I would be very thankful if you could point to me how to solve it and 
> progress from here to ./dsc binary.
>
>
> Imre
>
> PS I searched ports collection for similarities and actually found file
>
> /usr/ports/pobj/dnstop-20140915/dnstop-20140915/inX_addr.c
>
> which is very similar to
>
> /root/dsc/l/dsc-201502251630/collector/dsc/inX_addr.c
>
> and has some inet_* funtsions in it. dnstop from ports compiles and 
> runs fine. So i think i must be missing something obvious here. Needless 
> to say i cant compile and read source but still i try to be attentive to 
> your answer! :)
>
>

Re: GUI Designer

2016-02-22 Thread Roderick

On Mon, 22 Feb 2016, Daniel Boyd wrote:


??What do youguys use for a simple GUI with a visualdesigner?


Tcl/Tk.

Many people holds it for a toy language, but I like it very much.

Tcl is a scripting language, on one side like scripting languages
(sh, perl), on the other side like LISP. It is meager, with a clear
concept and very easy to learn. Tk is the GUI Toolkit.

If Tcl is not enough, you can extend it very easily with C.

As far as I know, it also runs in Windoze.

Rodrigo.



Re: Reached some limit with sockets?

2016-02-22 Thread Andrew Fresh
On Sat, Feb 20, 2016 at 08:06:57PM +0100, Federico Giannici wrote:
> In a server (OpenBSD amd64 5.7) with many concurrent perl programs that have
> to open a lot of SSH connections, I get many errors like this:
> 
> connect() on closed socket GEN136 at
> /usr/local/libdata/perl5/site_perl/Net/SSH/Perl.pm line 216.
> 
> Maybe at some point no more sockets can be opened because of some limit is
> reached?
> 
> I already tried to set these in sysctl.conf:
> 
> kern.maxfiles=2
> kern.somaxconn=1024


Since you don't provide much information about how many simultaneous
connections you are making or how many you are making per-second, it's
really hard to guess what might be going on.

However, the maxfiles limit here may give some indication to the amount
so my guess is that you are hitting the pf state limit.  The default
state purging interval is 10 seconds, and the default state limit is
10,000 states.   I'd suggest looking at the output of pfctl -si when
you're having the issue.

$ doas pfctl -sa | grep -e ^states -e interval
interval 10s
stateshard limit1

(note that I don't actually have an OpenBSD 5.7 machine, so these
numbers may not have been the same back then)



Re: GUI Designer

2016-02-22 Thread Andrew Fresh
On Mon, Feb 22, 2016 at 02:21:01PM +, Daniel Boyd wrote:
> But here's??my question: every now and
> then I like to makea quick and dirty GUI app. ??In Windows, I was??using
> Netbeans/Java/Swing. ??What do youguys use for a simple GUI with a
> visualdesigner? 

In perl, I for one usually end up just writing a quick web app using
Mojolicious::Lite* or some other framework.  Doesn't exactly answer your
question, but I haven't had a desire to write a GUI app in quite a few
years.

* The p5-Mojo package from
  http://mojolicious.org/perldoc/Mojolicious/Lite

l8rZ,
-- 
andrew - http://afresh1.com

Life's unfair - but root password helps!



Re: GUI Designer

2016-02-22 Thread Riccardo Mottola

Hi,

Riccardo Mottola wrote:
I do use ProjectCenter for GNUstep and then code everything in 
Objective-C. 


I correct, I use Gorm, which is the GUI designer. ProjectCenter is the 
corresponding project builder, which I do use too, but only for simple 
projects since it is less refined than Gorm and for complex projects I 
end up writing makefiles myself. Slo I prefer gvim or emacs to the 
integrated editor for bigger work.


Riccardo



Re: FAQ: 14.21.5 - Softraid notes

2016-02-22 Thread Theo Buehler
>   Note that we did not specify the altroot device by DUID, but by device
>   name. We probably want to be pushing from the boot device to the
>   secondary device, which can end up changing if the drive order is
>   changed. For this reason, you may want to specify the root and altroot
>   in /etc/fstab as a device name, not a DUID. 

To be clear: the reason I'm hesitating is that I have no idea whether
this really is sound advice or not.



Re: GUI Designer

2016-02-22 Thread Riccardo Mottola

Hi,

Daniel Boyd wrote:

What do youguys use for a simple GUI with a
visualdesigner?


I do use ProjectCenter for GNUstep and then code everything in Objective-C.

Riccardo



Re: FAQ: 14.21.5 - Softraid notes

2016-02-22 Thread Theo Buehler
> Out of curiosity: What is the rationale behind the last sentence in
> FAQ: 14.21.5 - Softraid notes:
> "You may not want to specify the root device by DUID."
> 
> I dare to ask as the installer sets DUIDs for every partition incl.
> "/". With this in mind I wonder why the root device should not be
> specified by the DUID. This sentence lacks at least a hint on why not.

Yeah, this is unfortunate, I'll have to think a bit how to improve this
situation..

> (Maybe it is just a misinterpretation of "may not" in this context -
> to me this reads as "should not" like "better don't do it".)

Does

"There are legitimate reasons not to specify the root device by DUID."

make more sense to you? I'd say it is roughly equivalent.

There is a brief explanation for this at the very end of section 14.20:

  Note that we did not specify the altroot device by DUID, but by device
  name. We probably want to be pushing from the boot device to the
  secondary device, which can end up changing if the drive order is
  changed. For this reason, you may want to specify the root and altroot
  in /etc/fstab as a device name, not a DUID. 



Re: GUI Designer

2016-02-22 Thread Donald Allen
On Mon, Feb 22, 2016 at 9:53 AM, Mariano Baragiola
 wrote:
> On 02/22/16 11:21, Daniel Boyd wrote:
>>
>> Quick question for you guys. Â I recentlydecided to see if I could get
>> away
>> with runningOpenBSD on my office workstation. Â I gotthe idea after
>> playing
>> around with xfreerdp's 'rail' mode which allows me to run Windowsapps
>> (primarily ESRI ArcMap) on a server viaRDP.
>>
>> Anyway, things are going very well. Â I learnedperl and have been using
it
>> where I had been using Java on my Windows box.  I figured sinceperl is
>> part
>> of the base system and Netbeanshasn't been updated in like 5 years, you
>> guys probably aren't big on Java :).  But here's my question: every
now
>> and
>> then I like to makea quick and dirty GUI app.  In Windows, I was using
>> Netbeans/Java/Swing. Â What do youguys use for a simple GUI with a
>> visualdesigner? Â I looked into wxperl, but the systemperl isn't
threaded,
>> so
>> not optimal for GUIs. Â IÂ could always use plenv and install a
>> second,threaded perl, but thought I'd check to see ifanyone had a better
>> idea.
>> Â Or do you guys justnot write GUIs? :)
>> Daniel Boyd
>>
>
> Not a huge fan of GUIs myself. Most of commercial software I was involved
> was web based.
>
> But, you should take a look to GTK+. There's also Qt but I think,
> and I'm taking a big guess here, so please correct me, that GTK+
> is less complex/harmful than Qt. So it would be closer to OpenBSD's
> ideals.

Qt is also very C++ oriented, which for me is a show-stopper because I
detest the language. I've written a personal finance manager in C
using Gtk+3 and it has worked well for me.

Tcl/Tk is a useful combination for quick hacks.



FAQ: 14.21.5 - Softraid notes

2016-02-22 Thread Stefan Wollny
Hi there!

Out of curiosity: What is the rationale behind the last sentence in FAQ: 
14.21.5 - Softraid notes:
"You may not want to specify the root device by DUID."

I dare to ask as the installer sets DUIDs for every partition incl. "/". With 
this in mind I wonder why the root device should not be specified by the DUID. 
This sentence lacks at least a hint on why not.

(Maybe it is just a misinterpretation of "may not" in this context - to me this 
reads as "should not" like "better don't do it".)

TIA.

Best,
STEFAN



Re: GUI Designer

2016-02-22 Thread Mariano Baragiola

On 02/22/16 11:21, Daniel Boyd wrote:

Quick question for you guys. Â I recentlydecided to see if I could get away
with runningOpenBSD on my office workstation. Â I gotthe idea after playing
around with xfreerdp's 'rail' mode which allows me to run Windowsapps
(primarily ESRI ArcMap) on a server viaRDP.

Anyway, things are going very well. Â I learnedperl and have been using it
where I had been using Java on my Windows box.  I figured sinceperl is part
of the base system and Netbeanshasn't been updated in like 5 years, you
guys probably aren't big on Java :).  But here's my question: every now and
then I like to makea quick and dirty GUI app.  In Windows, I was using
Netbeans/Java/Swing. Â What do youguys use for a simple GUI with a
visualdesigner? Â I looked into wxperl, but the systemperl isn't threaded, so
not optimal for GUIs. Â IÂ could always use plenv and install a
second,threaded perl, but thought I'd check to see ifanyone had a better idea.
 Or do you guys justnot write GUIs? :)
Daniel Boyd



Not a huge fan of GUIs myself. Most of commercial software I was 
involved was web based.


But, you should take a look to GTK+. There's also Qt but I think,
and I'm taking a big guess here, so please correct me, that GTK+
is less complex/harmful than Qt. So it would be closer to OpenBSD's
ideals.



Re: GUI Designer

2016-02-22 Thread Jiri B
On Mon, Feb 22, 2016 at 02:21:01PM +, Daniel Boyd wrote:
> Quick question for you guys. ??I recentlydecided to see if I could get away
> with runningOpenBSD on my office workstation. ??I gotthe idea after playing
> around with xfreerdp's??'rail' mode which allows me to run Windowsapps
> (primarily ESRI ArcMap) on a server viaRDP.
> 
> Anyway, things are going very well. ??I learnedperl and have been using it
> where I had been??using Java on my Windows box. ??I figured sinceperl is part
> of the base system and Netbeanshasn't been updated in like 5 years, you
> guys??probably aren't big on Java :). ??But here's??my question: every now and
> then I like to makea quick and dirty GUI app. ??In Windows, I was??using
> Netbeans/Java/Swing. ??What do youguys use for a simple GUI with a
> visualdesigner? ??I looked into wxperl, but the systemperl isn't threaded, so
> not optimal for GUIs. ??I??could always use plenv and install a
> second,threaded perl, but thought I'd check to see ifanyone had a better idea.
> ??Or do you guys justnot write GUIs? :)
> Daniel Boyd

Qt5?

j.



Re: GUI Designer

2016-02-22 Thread Mike Burns
On 2016-02-22 14.21.01 +, Daniel Boyd wrote:
> What do youguys use for a simple GUI with a visualdesigner?

I use GTK+, with Glade, in C and Python. GTK+ has bindings to other languages,
too, and Glade files work with any of them.

If you want something simpler -- though still in GTK+ -- I recommend sh with
zenity(1).

-Mike



GUI Designer

2016-02-22 Thread Daniel Boyd
Quick question for you guys.  I recentlydecided to see if I could get away
with runningOpenBSD on my office workstation.  I gotthe idea after playing
around with xfreerdp's 'rail' mode which allows me to run Windowsapps
(primarily ESRI ArcMap) on a server viaRDP.

Anyway, things are going very well.  I learnedperl and have been using it
where I had been using Java on my Windows box.  I figured sinceperl is part
of the base system and Netbeanshasn't been updated in like 5 years, you
guys probably aren't big on Java :).  But here's my question: every now and
then I like to makea quick and dirty GUI app.  In Windows, I was using
Netbeans/Java/Swing.  What do youguys use for a simple GUI with a
visualdesigner?  I looked into wxperl, but the systemperl isn't threaded, so
not optimal for GUIs.  I could always use plenv and install a
second,threaded perl, but thought I'd check to see ifanyone had a better idea.
 Or do you guys justnot write GUIs? :)
Daniel Boyd



Re: man dhcp-options

2016-02-22 Thread Stuart Henderson
On 2016-02-22, Etienne  wrote:
> Hello there,
>
> It seems to me that dhcpd is ignoring "option routers" when there is a 
> "option classless-static-routes" in the same configuration block. Ex:
>
> with the following:
>
>  option routers 192.168.0.254;
>  option classless-static-routes 192.168.32.0/24 192.168.0.1;
>
> dhcpd will start, the client will see its routing table populated with a 
> route to 192.168.0.32, but not with a default gateway. To achieve what I 
> intended with the above, I remove "option routers" completely, and I 
> add:
>
>  option classless-static-routes 192.168.32.0/24 192.168.0.1, 
> 0.0.0.0/0 192.168.0.254;
>
> Now the client has a default route and a route to 192.168.32.0/24. I 
> have verified this with both an OpenBSD client and a Linux client.

This is in the spec.  RFC 3442:

   "If the DHCP server returns both a Classless Static Routes option and
   a Router option, the DHCP client MUST ignore the Router option."

> I don't know if this is intended or not, but if it is, I would suggest 
> mentioning in man dhcp-options that using "option 
> classless-static-routes" overrides/ignores "option routers".

Probably worth it, I'll bake a diff.



Re: man dhcp-options

2016-02-22 Thread Etienne

On 2016-02-22 13:05, Kenneth Westerback wrote:


Documenting every conformance with DHCP standards in the man page is
unlikely to be popular. :-)


I guess it makes sense to document one thing in one place only. I just 
wish I had known where to look in the first place. :-)


Cheers,



Re: Reached some limit with sockets?

2016-02-22 Thread lists
Sun, 21 Feb 2016 14:09:26 +0100 Federico Giannici 
> On 02/21/16 01:05, li...@wrant.com wrote:
> > Sat, 20 Feb 2016 20:06:57 +0100 Federico Giannici   
> >> In a server (OpenBSD amd64 5.7) with many concurrent perl programs that
> >> have to open a lot of SSH connections, I get many errors like this:  
> >
> > Have you tried connection sharing with ssh(1) yet?  Does the Net:SSH
> > give you this?
> >  
> >>   connect() on closed socket GEN136 at
> >> /usr/local/libdata/perl5/site_perl/Net/SSH/Perl.pm line 216.
> >>
> >> Maybe at some point no more sockets can be opened because of some limit
> >> is reached?
> >>
> >> I already tried to set these in sysctl.conf:
> >>
> >>   kern.maxfiles=2
> >>   kern.somaxconn=1024
> >>
> >> And set this in login.conf:
> >>
> >>   openfiles-cur=1024
> >>
> >> But it didn't solved.
> >>
> >> Any suggestion of what a can look at?  
> >
> > You could start simple and then advance to the complete programmatic
> > solution.  Possibly, but not necessarily limited to these:
> >
> > ssh(1) connection sharing  
> 
> Connections are to (a lot of) different devices, so cannot do connection 
> sharing.

Can you count these or provide a range (up to a decimal order of
magnitude precision) for the sake of narrowing it down?

Can you start putting prints at various locations and see which parts
are not getting lucky with completion?

Can you work at scheduling / queuing issues so you won't have to work
on these when it's too late (after you bump up your temp stall now)?

> > ksh(1) ulimit
> > login.conf(5)  
> 
> I already increased "openfiles-cur".

Intentionally leave out sysctl(3) out of your way first iteration:

sysctl.conf(5) if you think it's sockets (do you think it's air you're
breathing)

It's not everything there is to limits, so quick revisit on this:
shell limits, login class, sysctl, options (wait a moment)...
interpreter (Perl), module/class (Net::SSH) and before all this your
program algorithm.

When the program is as good as it gets, then work your way into the
environment it runs on each pass revisiting first your program.

(general hobby?is?t logic)

> Are there other limits that can give problems to socket opening 
> ("connect() on closed socket" or "Bad file descriptor")?

ksh(1) ulimit

> The program works, the problems arise when there are too many concurrent 
> connections.

Definitely, but see if there is some obvious large resource waste on
program inefficiency / sub-optimal organisation which can spread the
contention over time, or organise it to not ever reach limits.

Twisting knobs should be more conservative each escalation level you
pass.  Speaking from user level (not authoritative).

> Thanks.
> 
> > Maybe just then work on the eventual Perl related issues after you
> > confirm you can achieve the desired results with plain shell commands,
> > one liner (scripts) and direct ssh client connect using connection
> > sharing.



Re: Keeping existing lpd/lpr/printcap commands/options for legacy use on existing systems

2016-02-22 Thread Chris Bennett
On Sun, Feb 21, 2016 at 10:12:14AM -0700, Devin Reade wrote:
> --On Wednesday, February 17, 2016 11:49:30 AM -0600 Chris Bennett
>  wrote:
> 
> > I do see that lpc, lpq, lprm are dinosaurs and have to be made extinct
> > and replaced with something more functional with more information output
> > and better capabilities.
> 
> Whatever changes may happen under the hood, I would like to see
> at least the basic operations of lpr, lpq, and lprm remain available
> under those names, using the existing syntax.  I'm no fan of CUPS, but I 
> get by with it on linux because of the lpr compatibility shim.
> 
> Devin
> 

Absolutely yes. There are many printing facilities that rely on some
scripts somebody wrote a long time ago.
The havoc that would create would scare away people from upgrading their
version of OpenBSD.
We don't want to frighten people into turning to CUPS.

--
Looking for anyone's opinion on this:

lpr, lpc, lpd, lpq, lprm, printcap need to be kept around to allow older
software to be just moved onto newer OpenBSD installation.

Should a new set of names be created and these existing names used as
symlinks to the new versions in order to produce legacy input/output?

Keep using printcap file for new work or put an example into a man page
for legacy users and create a new /etc file for printing?

Thanks,
Chris



Re: L2TP/IPSec via npppd won't work with Android 5.x

2016-02-22 Thread Stefan Krueger
In mailing.openbsd.misc, you wrote:
> Hi, everyone:
>
> [...]
>
> But the android devices I had won't work by all means. I found out that
> Android 5.x
> L2TP/IPSec VPN client works in:
> hash algorithm: hmac-sha2-256
> encrypt method: aes_cbc
> life time: 28800
>
> The ipsec.conf with:
> ``
> ike passive esp tunnel \
>  from "IP_ADDRESS" to any \
>  main auth "hmac-sha2-256" enc "aes" group "modp1024" lifetime 2880\
>  quick group "modp1024" \
>  psk "SECRET_KEY"
> '' didn't make a chage.(after `ipsecctl -f /etc/ipsec.conf`)

Hi,

the following config worked for me when I was using it (with npppd)
last year (dumped it since I couldn't find a way to use it with iOS
and Android at the same time):

/etc/ipsec.conf
public_ip = "x.y.z.a"

ike passive esp transport \
proto udp from $public_ip to any port l2tp \
aggressive auth "hmac-sha1" enc "aes" group modp1024 \
psk "XXX"

IIRC Android required the use of "aggressive auth" where iOS only worked
with the default "main auth"...



man dhcp-options

2016-02-22 Thread Etienne

Hello there,

It seems to me that dhcpd is ignoring "option routers" when there is a 
"option classless-static-routes" in the same configuration block. Ex:


with the following:

option routers 192.168.0.254;
option classless-static-routes 192.168.32.0/24 192.168.0.1;

dhcpd will start, the client will see its routing table populated with a 
route to 192.168.0.32, but not with a default gateway. To achieve what I 
intended with the above, I remove "option routers" completely, and I 
add:


option classless-static-routes 192.168.32.0/24 192.168.0.1, 
0.0.0.0/0 192.168.0.254;


Now the client has a default route and a route to 192.168.32.0/24. I 
have verified this with both an OpenBSD client and a Linux client.


I don't know if this is intended or not, but if it is, I would suggest 
mentioning in man dhcp-options that using "option 
classless-static-routes" overrides/ignores "option routers".


Cheers,



Re: How to configure the domain used by default by OpenSMTPD

2016-02-22 Thread ML mail
I have already adapted my accept parameter to include the domain as hostname as 
you can see below:


accept from local for any relay hostname realdomain.tld

but unfortunately it still uses the internal domain name in the from.

Regards
ML




On Monday, February 22, 2016 11:10 AM, Jiri B  wrote:
On Mon, Feb 22, 2016 at 09:40:00AM +, ML mail wrote:
> Hello,
> 
> How do one configure the domain which OpenSMTPD uses by default to speak with 
> other mail servers? The problem is that my default it takes the internal 
> domain name of my OpenBSD 5.8 server and therefore other mail servers reject 
> it with the error:
> 
> Sender address rejected: Domain not found
> 
> 
> So in fact it sends mails with u...@internal.lan and I would like it to send 
> mails with u...@realdomain.tld, how can I achieve that? I did not find the 
> config parameter in smtpd.conf for that purpose.

See 'hostname' in relay part in smtpd.conf(5).


j.



Re: How to configure the domain used by default by OpenSMTPD

2016-02-22 Thread ML mail
Great, thank you very much that worked perfectly!




On Monday, February 22, 2016 11:39 AM, Raf Czlonka  wrote:
On Mon, Feb 22, 2016 at 10:09:25AM GMT, Jiri B wrote:


> On Mon, Feb 22, 2016 at 09:40:00AM +, ML mail wrote:
>
> > Hello,
> >
> > How do one configure the domain which OpenSMTPD uses by default
> > to speak with other mail servers? The problem is that my default
> > it takes the internal domain name of my OpenBSD 5.8 server and
> > therefore other mail servers reject it with the error:
> >
> > Sender address rejected: Domain not found
> >
> > So in fact it sends mails with u...@internal.lan and I would like it
> > to send mails with u...@realdomain.tld, how can I achieve that? I
> > did not find the config parameter in smtpd.conf for that purpose.
>
> See 'hostname' in relay part in smtpd.conf(5).

Also:

$ man smtpd|grep name
 /etc/mail/mailname   Alternate server name to use.

Regards,

Raf



Re: How to configure the domain used by default by OpenSMTPD

2016-02-22 Thread Raf Czlonka
On Mon, Feb 22, 2016 at 10:09:25AM GMT, Jiri B wrote:

> On Mon, Feb 22, 2016 at 09:40:00AM +, ML mail wrote:
>
> > Hello,
> >
> > How do one configure the domain which OpenSMTPD uses by default
> > to speak with other mail servers? The problem is that my default
> > it takes the internal domain name of my OpenBSD 5.8 server and
> > therefore other mail servers reject it with the error:
> >
> > Sender address rejected: Domain not found
> >
> > So in fact it sends mails with u...@internal.lan and I would like it
> > to send mails with u...@realdomain.tld, how can I achieve that? I
> > did not find the config parameter in smtpd.conf for that purpose.
>
> See 'hostname' in relay part in smtpd.conf(5).

Also:

$ man smtpd|grep name
 /etc/mail/mailname   Alternate server name to use.

Regards,

Raf



Re: How to configure the domain used by default by OpenSMTPD

2016-02-22 Thread Jiri B
On Mon, Feb 22, 2016 at 09:40:00AM +, ML mail wrote:
> Hello,
> 
> How do one configure the domain which OpenSMTPD uses by default to speak with 
> other mail servers? The problem is that my default it takes the internal 
> domain name of my OpenBSD 5.8 server and therefore other mail servers reject 
> it with the error:
> 
> Sender address rejected: Domain not found
> 
> 
> So in fact it sends mails with u...@internal.lan and I would like it to send 
> mails with u...@realdomain.tld, how can I achieve that? I did not find the 
> config parameter in smtpd.conf for that purpose.

See 'hostname' in relay part in smtpd.conf(5).

j.



How to configure the domain used by default by OpenSMTPD

2016-02-22 Thread ML mail
Hello,

How do one configure the domain which OpenSMTPD uses by default to speak with 
other mail servers? The problem is that my default it takes the internal domain 
name of my OpenBSD 5.8 server and therefore other mail servers reject it with 
the error:

Sender address rejected: Domain not found


So in fact it sends mails with u...@internal.lan and I would like it to send 
mails with u...@realdomain.tld, how can I achieve that? I did not find the 
config parameter in smtpd.conf for that purpose.

Best regards
ML