iPhones and nginx/slowcgi on OpenBSD <=5.5

2014-07-01 Thread Kristaps Dzonsons

Folks,

If anybody's running nginx with slowcgi(8) on or before OpenBSD 5.5 
release, be aware that there's a subtle error (fixed after 5.5) that 
silently discards HTTP headers with some referrers.


Long story: I noticed that cookies POSTed by an iPhone client were lost 
before being passed to a slowcgi(8) script.  Several other HTTP headers 
were also lost (Accept-Language, etc.).  But they were passed through in 
GET calls (and in POST from other systems).  Dumping the request via 
tcpdump(8), I saw that each of the lost headers occured after a monster 
User-Agent string.  In this case,


User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) 
AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a 
Safari/9537.53


For the GET calls to the CGI via slowcgi(8), this was being invoked 
last, so there was no loss.


I remembered seeing something in plus.html about the following:

http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/slowcgi/slowcgi.c?rev=1.30;content-type=text%2Fx-cvsweb-markup

florian@ saves the day!  The commit message only mentions QUERY_STRING, 
but as it turns out, it's also relevant to other headers.  And in this 
case, causes silent loss.  So if you're using slowcgi(8), you probably 
want to upgrade...


Best,

Kristaps



Re: ViewVC

2014-07-01 Thread Stefan Sperling
On Tue, Jul 01, 2014 at 08:36:29PM -0400, Predrag Punosevac wrote:
> I am trying to run ViewVC in the stand alone server mode on the new svn
> server (OpenBSD 5.5 amd64).  Since ViewVC is not in ports I downloaded
> 1.1.22 package from CollabNet website. ViewVC keeps crashing when 
> while I browse my SVN repos. They are rather large. I am not using any
> kind a proxy but rather forcing built in server to listen on the port
> 80.

IIRC viewvc uses Subversion's python bindings. Did you install them?
pkg_add py-subversion

> Does anyone have any experience running ViewVC on OpenBSD recently? I am
> tempted to try to use Nginx as a proxy or install Apache 2 and use CGI
> mode via ScriptAlias for ViewVC. The latter is running fine in out
> current setup on Scientific Linux 6.2 which I am trying to migrate to
> OpenBSD. Unfortunately moving to Trac (which would be my strong
> preference) or WebSVN will probably cause ruffle feathers, a condition I
> want to avoid.
> 
> Predrag

WebSVN is fairly broken with SVN 1.8. Don't bother. (Which reminds me
I've been meaning to remove it but was still waiting for patches
promised by someone, which never arrived).



[Patch] Possible typo in stdio(3) manpage

2014-07-01 Thread Edward
Hi,

Caught in a slight confusion about the wordings describing stdio(3) scenario
needing fflush(3). The diff shows my understanding, but please do reply if it
is otherwise.

# cvs diff
cvs server: Diffing .
Index: stdio.3
===
RCS file: /cvs/src/lib/libc/stdio/stdio.3,v
retrieving revision 1.30
diff -u -p -r1.30 stdio.3
--- stdio.3 25 Mar 2014 15:23:27 -  1.30
+++ stdio.3 2 Jul 2014 03:00:36 -
@@ -148,7 +148,7 @@ In these cases,
 or when a large amount of computation is done after printing
 part of a line on an output terminal, it is necessary to
 .Xr fflush 3
-the standard output before going off and computing so that the output
+the standard output before continuing computation so that the output
 will appear.
 Alternatively, these defaults may be modified via the
 .Xr setvbuf 3

Regards,
Edward.



ViewVC

2014-07-01 Thread Predrag Punosevac
I am trying to run ViewVC in the stand alone server mode on the new svn
server (OpenBSD 5.5 amd64).  Since ViewVC is not in ports I downloaded
1.1.22 package from CollabNet website. ViewVC keeps crashing when 
while I browse my SVN repos. They are rather large. I am not using any
kind a proxy but rather forcing built in server to listen on the port
80.

Does anyone have any experience running ViewVC on OpenBSD recently? I am
tempted to try to use Nginx as a proxy or install Apache 2 and use CGI
mode via ScriptAlias for ViewVC. The latter is running fine in out
current setup on Scientific Linux 6.2 which I am trying to migrate to
OpenBSD. Unfortunately moving to Trac (which would be my strong
preference) or WebSVN will probably cause ruffle feathers, a condition I
want to avoid.

Predrag



Re: does OpenMP work on 5.5/amd64?

2014-07-01 Thread Gustav Fransson Nyvell

On 07/01/14 19:40, Jonathan Thornburg wrote:

Has anyone gotten OpenMP to work on 5.5-{release,stable}/amd64?

'man gcc' and /usr/local/info/gcc.info both describe gcc support for
OpenMP (the -fopenmp compiler flag), but I'm getting fatal errors
(either missing compiler spec file or missing "omp.h" header file)
trying to compile even the simplest "hello, world" OpenMP programs
with gcc (either base /usr/bin/gcc or ports /usr/local/bin/gcc).

'locate omp.h' fails to find the header file anywhere, and
'man clang' doesn't mention OpenMP support at all.

I want to develop OpenMP programs on OpenBSD.  Do I need to build my
own gcc to do so?


Script started on Tue Jul  1 10:21:34 2014
% uname -a
OpenBSD copper.astro.indiana.edu 5.5 GENERIC.MP#0 amd64
% cat hello.c
#include 

int main(void)
{
   #pragma omp parallel
 printf("Hello, world.\n");
   return 0;
}
% cat mt-hello.c
#include 
#include "omp.h"

int main(void)
{
#pragma omp parallel
   {
int id = omp_get_thread_num();
printf("hello(%d)\n",  id);
printf("world(%d)\n",  id);
   }
return 0;
}
%
%
% /usr/bin/gcc --version
gcc (GCC) 4.2.1 20070719
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /usr/bin/gcc -fopenmp -o hello hello.c
gcc: libgomp.spec: No such file or directory
% /usr/bin/gcc -fopenmp -o mt-hello mt-hello.c
mt-hello.c:2:17: error: omp.h: No such file or directory
%
%
% /usr/local/bin/gcc --version
gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /usr/local/bin/gcc -fopenmp -o hello hello.c
gcc: error: libgomp.spec: No such file or directory
% /usr/local/bin/gcc -fopenmp -o mt-hello mt-hello.c
mt-hello.c:2:17: fatal error: omp.h: No such file or directory
  #include "omp.h"
  ^
compilation terminated.
%
%
% /usr/local/bin/clang --version
clang version 3.3 (tags/RELEASE_33/final)
Target: amd64-unknown-openbsd5.5
Thread model: posix
% /usr/local/bin/clang -fopenmp -o hello hello.c
clang-3.3: warning: argument unused during compilation: '-fopenmp'
% ./hello
Hello, world.
% /usr/local/bin/clang -fopenmp -o mt-hello mt-hello.c
clang-3.3: warning: argument unused during compilation: '-fopenmp'
mt-hello.c:2:10: fatal error: 'omp.h' file not found
#include "omp.h"
  ^
1 error generated.
% exit
Script done on Tue Jul  1 10:23:46 2014

ciao,


No.

--
This e-mail is confidential and may not be shared with anyone other than 
recipient(s) without written permission from sender.



does OpenMP work on 5.5/amd64?

2014-07-01 Thread Jonathan Thornburg
Has anyone gotten OpenMP to work on 5.5-{release,stable}/amd64?

'man gcc' and /usr/local/info/gcc.info both describe gcc support for
OpenMP (the -fopenmp compiler flag), but I'm getting fatal errors
(either missing compiler spec file or missing "omp.h" header file)
trying to compile even the simplest "hello, world" OpenMP programs
with gcc (either base /usr/bin/gcc or ports /usr/local/bin/gcc).

'locate omp.h' fails to find the header file anywhere, and
'man clang' doesn't mention OpenMP support at all.

I want to develop OpenMP programs on OpenBSD.  Do I need to build my
own gcc to do so?


Script started on Tue Jul  1 10:21:34 2014
% uname -a
OpenBSD copper.astro.indiana.edu 5.5 GENERIC.MP#0 amd64
% cat hello.c
#include 

int main(void)
{
  #pragma omp parallel
printf("Hello, world.\n");
  return 0;
}
% cat mt-hello.c
#include 
#include "omp.h"

int main(void)
{
#pragma omp parallel
  {
int id = omp_get_thread_num();
printf("hello(%d)\n",  id);
printf("world(%d)\n",  id);
  }
return 0;
}
%
%
% /usr/bin/gcc --version
gcc (GCC) 4.2.1 20070719
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /usr/bin/gcc -fopenmp -o hello hello.c
gcc: libgomp.spec: No such file or directory
% /usr/bin/gcc -fopenmp -o mt-hello mt-hello.c
mt-hello.c:2:17: error: omp.h: No such file or directory
%
%
% /usr/local/bin/gcc --version
gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /usr/local/bin/gcc -fopenmp -o hello hello.c
gcc: error: libgomp.spec: No such file or directory
% /usr/local/bin/gcc -fopenmp -o mt-hello mt-hello.c
mt-hello.c:2:17: fatal error: omp.h: No such file or directory
 #include "omp.h"
 ^
compilation terminated.
%
%
% /usr/local/bin/clang --version
clang version 3.3 (tags/RELEASE_33/final)
Target: amd64-unknown-openbsd5.5
Thread model: posix
% /usr/local/bin/clang -fopenmp -o hello hello.c
clang-3.3: warning: argument unused during compilation: '-fopenmp'
% ./hello
Hello, world.
% /usr/local/bin/clang -fopenmp -o mt-hello mt-hello.c
clang-3.3: warning: argument unused during compilation: '-fopenmp'
mt-hello.c:2:10: fatal error: 'omp.h' file not found
#include "omp.h"
 ^
1 error generated.
% exit
Script done on Tue Jul  1 10:23:46 2014

ciao,

-- 
-- "Jonathan Thornburg [remove -animal to reply]" 

   Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA
   currently on the west coast of Canada
   "There was of course no way of knowing whether you were being watched
at any given moment.  How often, or on what system, the Thought Police
plugged in on any individual wire was guesswork.  It was even conceivable
that they watched everybody all the time."  -- George Orwell, "1984"



Re: Thank you for OpenBSD!

2014-07-01 Thread Otto Moerbeek
On Tue, Jul 01, 2014 at 11:47:58AM -0400, Daniel Villarreal wrote:

> I'm a long-time GNU/Linux user, and in the past I've purchased the OpenBSD
> cd set and got it to running. Then I would run into issues and put it away.
> 
> I decided to do something different with OpenBSD 5.5 this time. I
> approached it differently.  I wanted to update for the SSH issue and had
> issues with the CSV  servers...  I tried different CVS servers and had much
> more success, but then  would run into space issues.  I tried to see if I
> could alter the way OpenBSD allocates space to different partitions upon
> installing... then it occurred to me to try a larger hard drive, since the
> allocation is apparently based on percentage of hard drive capacity. I was
> initially installing on ~160GB hard drives, I tried a 250GB hard drive next
> and still ran into issues. I finally put on a 3TB hard drive and was able
> to upgrade to -stable successfully. I've even managed to update w/ CVS and
> upgrade multiple times.
> 
> I'm reading the @misc mailing list again and am continually amazed at how
> OpenBSD continually manages to keep genuinely improving, not throwing fads
> at me, but consistently providing me a high-quality computing experience,
> which is what drove me to try GNU/Linux in the first place. Even though I'm
> composing this message on an old computer, it is nice to experience smooth,
> trouble-free computing.
> 
> I'm going to keep researching to see how to alter the partitioning, my
> first preference would be to try to adjust the percentages of space
> allocation, and failing that, then I would follow the Lucas methodology on
> partitioning (pg. 78, Michael W. Lucas, "Absolute OpenBSD: Unix For The
> Practical Paranoid," No Starch Press: 2003),  and manually compute the
> parameters.
> 

Not much computation needed, even if you go manually:
At the dislabel prompt:

a
 (accept suggested letter)
 (accept suggetsed offset)
xg (enter size x gigabytes, or use x%)
 (accept fs type)
/  (mount point)

Repeat for other partitions.

It is also perfectly possible to shrink of grow the auto allocated
partitions, using the R command in disklabel.

-Otto

> If you're new to OpenBSD, I highly recommend the Lucas and Hansteen
> Open-BSD related books. You might get the books for a more inexpensive
> price elsewhere, but you help out OpenBSD by shopping for these and other
> titles at http://www.openbsd.org/books.html
> 
> As my son gets more into computing, I hope he can learn to appreciate the
> commitment to excellence and integrity of the OpenBSD team. He's wanting to
> get into programming.
> 
> Many thanks to all who make OpenBSD possible. Please remember to buy your
> OpenBSD cd set to support the developers.
> 
> OpenBSD doesn't just work, it rocks, and solidly, at that!
> 
> Sincerely,
> Daniel Villarreal
> somewhere in Southern Ontario, Canada
> 
> P.S. At some point I do plan on purchasing the Peter N.M. Hansteeen's "The
> Book of PF, 2nd Edition A No-Nonsense Guide to the OpenBSD Firewall" from
> the OpenBSD store.



Re: What is the difference between these two SSHD configs?

2014-07-01 Thread Edward M

On 07/01/14 09:18, Ez Egy wrote:

#1

 Match Group GROUPNAME, User *,!root

#2

 Match Group GROUPNAME User !root

What is the difference between #1 and #2 in the SSHD_CONFIG?

If someone could help me.. thanks in advance..



 May want to take a look at 'PATTERNS' section of 'ssh_config' manpage.



Re: What is the difference between these two SSHD configs?

2014-07-01 Thread Gustav Fransson Nyvell
On 07/01/14 18:25, Ez Egy wrote:
> I wanted to mean regarding functionality, are they doing the exact 
> 100% same? :O
>
>
> On Tue, Jul 1, 2014 at 6:21 PM, Gustav Fransson Nyvell 
> mailto:gus...@nyvell.se>> wrote:
>
> On 07/01/14 18:18, Ez Egy wrote:
>
> #1
>
>  Match Group GROUPNAME, User *,!root
>
> #2
>
>  Match Group GROUPNAME User !root
>
> What is the difference between #1 and #2 in the SSHD_CONFIG?
>
> If someone could help me.. thanks in advance..
>
> Two bytes.
>
> -- 
> This e-mail is confidential and may not be shared with anyone
> other than recipient(s) without written permission from sender.
>
>
The source is open for a reason.

-- 
This e-mail is confidential and may not be shared with anyone other than 
recipient(s) without written permission from sender.



Re: What is the difference between these two SSHD configs?

2014-07-01 Thread Ez Egy
I wanted to mean regarding functionality, are they doing the exact 100%
same? :O


On Tue, Jul 1, 2014 at 6:21 PM, Gustav Fransson Nyvell 
wrote:

> On 07/01/14 18:18, Ez Egy wrote:
>
>> #1
>>
>>  Match Group GROUPNAME, User *,!root
>>
>> #2
>>
>>  Match Group GROUPNAME User !root
>>
>> What is the difference between #1 and #2 in the SSHD_CONFIG?
>>
>> If someone could help me.. thanks in advance..
>>
>>  Two bytes.
>
> --
> This e-mail is confidential and may not be shared with anyone other than
> recipient(s) without written permission from sender.



What is the difference between these two SSHD configs?

2014-07-01 Thread Ez Egy
#1

Match Group GROUPNAME, User *,!root

#2

Match Group GROUPNAME User !root

What is the difference between #1 and #2 in the SSHD_CONFIG?

If someone could help me.. thanks in advance..



Re: What is the difference between these two SSHD configs?

2014-07-01 Thread Gustav Fransson Nyvell

On 07/01/14 18:18, Ez Egy wrote:

#1

 Match Group GROUPNAME, User *,!root

#2

 Match Group GROUPNAME User !root

What is the difference between #1 and #2 in the SSHD_CONFIG?

If someone could help me.. thanks in advance..


Two bytes.

--
This e-mail is confidential and may not be shared with anyone other than 
recipient(s) without written permission from sender.



Re: Enable 802.11n for an access point

2014-07-01 Thread Giancarlo Razzolini
Em 01-07-2014 12:00, Peter Hessler escreveu:
> you need to write some/a bunch of code to enable 11n support.  OpenBSD
> does not have it yet.
>
Other drivers have this note on their man page. ath(4) does not. So this
might explain why the OP didn't knew this fact.

Cheers,

-- 
Giancarlo Razzolini
GPG: 4096R/77B981BC



Re: Enable 802.11n for an access point

2014-07-01 Thread ML mail
Aha, that's a good point :-) Well thanks for the hint Peter.



On Tuesday, July 1, 2014 5:00 PM, Peter Hessler  wrote:
you need to write some/a bunch of code to enable 11n support.  OpenBSD
does not have it yet.





On 2014 Jul 01 (Tue) at 07:57:42 -0700 (-0700), ML mail wrote:
:Hi,
:
:I wanted to know how to enable 802.11n (300 Mbit/s) on my wireless card on 
OpenBSD 5.5. I tried using the "mode 11n" option in my hostname.athn0 like this:
:
:
:up media autoselect mediaopt hostap mode 11n chan 6 nwid MYAP \
:
:but then I get the following error:
:
:
:ifconfig: unknown IEEE802.11 media mode: 11n
:
:
:The best mode which works is "mode 11g" but that only delivers 54Mbit/s in 
theory. So does anyone know which option I need to do that?
:
:Regards
:ML
:

-- 
Nothing astonishes men so much as common sense and plain dealing.
        -- Ralph Waldo Emerson



Re: Enable 802.11n for an access point

2014-07-01 Thread Peter Hessler
you need to write some/a bunch of code to enable 11n support.  OpenBSD
does not have it yet.


On 2014 Jul 01 (Tue) at 07:57:42 -0700 (-0700), ML mail wrote:
:Hi,
:
:I wanted to know how to enable 802.11n (300 Mbit/s) on my wireless card on 
OpenBSD 5.5. I tried using the "mode 11n" option in my hostname.athn0 like this:
:
:
:up media autoselect mediaopt hostap mode 11n chan 6 nwid MYAP \
:
:but then I get the following error:
:
:
:ifconfig: unknown IEEE802.11 media mode: 11n
:
:
:The best mode which works is "mode 11g" but that only delivers 54Mbit/s in 
theory. So does anyone know which option I need to do that?
:
:Regards
:ML
:

-- 
Nothing astonishes men so much as common sense and plain dealing.
-- Ralph Waldo Emerson



Enable 802.11n for an access point

2014-07-01 Thread ML mail
Hi,

I wanted to know how to enable 802.11n (300 Mbit/s) on my wireless card on 
OpenBSD 5.5. I tried using the "mode 11n" option in my hostname.athn0 like this:


up media autoselect mediaopt hostap mode 11n chan 6 nwid MYAP \

but then I get the following error:


ifconfig: unknown IEEE802.11 media mode: 11n


The best mode which works is "mode 11g" but that only delivers 54Mbit/s in 
theory. So does anyone know which option I need to do that?

Regards
ML



Re: openssh

2014-07-01 Thread Nick Holland
On 07/01/14 07:00, Gregory Edigarov wrote:
> Hello,
> 
> Just out for curiosity.
> what is the fastest and lightest in cpu terms algorithm in ssh?

As someone who has worked with lots of really old and weak processors
(and still used the defaults)...I must ask, why?  If this matters to
you, I'd suggest getting a better computer, not dumbing-down SSH.  Yes,
using ssh on a 25mhz sparc is annoying, but then, so is almost
everything else you do on those machines.  A 20% change one way or
another won't change the annoying factor enough to worry about.

And maybe more important: why aren't you just testing what YOU care
about on YOUR system and answering your own question?  I suspect you may
see different answers on different processors and different tasks.
I.e., what matters? connection time?  throughput?  On the client or server?

And if you have difficulty answering, maybe the answer is "doesn't
really matter, just use the defaults".

Nick.



openssh

2014-07-01 Thread Gregory Edigarov

Hello,

Just out for curiosity.
what is the fastest and lightest in cpu terms algorithm in ssh?

--
With best regards,
 Gregory Edigarov



I don't know how to use redistribute prefix command in openOSPF

2014-07-01 Thread Valerio Catalano
Hello guys,
I searched a lot on net to find an answer to this question but I didn't
find anything.
I'm using OpenOSPF on Open BSD and I need to use the redistribute prefix
[set..] command.
How should I use it? Can you give me any example? what should I type to
don't get a syntax error?

thanks for your help and time.

Cheers,
Valerio



Re: CARP without IP on the physical interfaces of carp group?

2014-07-01 Thread Janne Johansson
> #1 is
> somewhat valid - using carppeer would prevent me from learning that
> multicast was broken. I'm not sure how it could ever break on a L2 VLAN,
> but still...
>

I've had bad broadcom (bnx (4)) cards do that to me.
Worked better with carppeer but best with intels instead.