Re: named bug?

2006-11-09 Thread Otto Moerbeek
On Thu, 9 Nov 2006, Michael wrote:

 Otto Moerbeek schrieb:
  This is not a bug, see the named ref guide. localhost is a symbolic
  name for:
  
  localhost Matches the IPv4 and IPv6 addresses of all network interfaces on 
  the system.
 Changing localhost to 127.0.0.1 did the trick, but just partly...
 IPv6 still is still being used...
 
 # fstat -n | grep internet | grep named
 namednamed  17436   20* internet6 dgram udp *:53
 namednamed  17436   21* internet6 stream tcp 0xd7a999c0 *:53
 namednamed  17436   22* internet dgram udp 127.0.0.1:53
 namednamed  17436   23* internet stream tcp 0xd76f54b8 127.0.0.1:53
 namednamed  17436   24* internet dgram udp 80.237.156.59:53
 namednamed  17436   25* internet stream tcp 0xd79df644
 80.237.156.59:53
 namednamed  17436   36* internet dgram udp *:46261
 namednamed  17436   37* internet6 dgram udp *:38873
 namednamed  17436   38* internet stream tcp 0xd73d0cd0 127.0.0.1:953
 namednamed  17436   39* internet6 stream tcp 0xd79a3e14 [::1]:953
 

Again, check the manual. Although I suspect a documentation bug. It says:

To make the server not listen on any IPv6 address, use

listen-on-v6 { none; };

If no listen-on-v6 statement is specified, the server will not listen
on any IPv6 address.

I'd say play a bit.

-Otto



openbsd + external sensor (t°, humidity, ...)

2006-11-09 Thread Julien TOUCHE
Hi

i'm currently looking for solution to monitor external environment from
an openbsd server.

i've found some (linux) apps
http://www.digitemp.com/software.shtml
http://www.redge.net/frogd/fr/
http://owfs.sourceforge.net/index.html
http://misterhouse.sourceforge.net/

some integrated sensor (a bit expensive)
http://www.eesensors.com/websensor.html
http://www.sensorprobe.fr/
http://thermotrack.free.fr

and less expensive but with more electronic
http://perso.orange.fr/atexa_elec/ds1921/ds1921.htm
http://z-graphix.com/linux/temperature/howto.html

except this one:
http://froggyhome.com/

has anyone advise to find cheap sensors (temperature, but also humdity,
pressure, light, electricity before UPS, ...) which are known to  work
with openbsd ?


thanks
Regards

Julien



Re: problem setting up trunk interface

2006-11-09 Thread Reyk Floeter
hi,

On Thu, Nov 09, 2006 at 01:44:26AM +0100, Markus Bergkvist wrote:
 First, I thought it was because fxp0 and ral0 on the host was on 
 different sub-nets but now they are both on 192.168.0/24 and so is trunk0.
 So i added a bridge
 # ifconfig bridge0 create
 # brconfig bridge0 add fxp0 add ral0 up
 but that didn't help either.
 

the bridge is running on you're ap, isn't it? this is correct, but you
don't need to run a bridge on your trunk'ed client.

so you're right, you have to use the same subnet for this trick. and
there is the problem: the bridge on your ap will learn you're clients
lladdr on the wired interface and if you unplug the cable it will
suddenly appear on the wireless side. the openbsd bridge
implementation is currently not optimized for fast topology changes
(i'm not sure if RSTP support would help in this case), but you can
improve it a bit by changing the cache timeout:

# brconfig bridge0 timeout 10

in this example, the you're clients lladdr will be removed from the
cache after 10 seconds and can be re-learned on another interface. you
can even decrease or increase it, depending on the number of clients
in your wireless network (it's not a very good idea to force you're ap
bridge to re-learn the entries all the time, especially in large
networks).

it actually works ;)! some people on this list may have seen my
demonstration during one of my talks using an openbsd client (ath0 +
em0 trunk) and an openbsd ap (ral0/ath0 + fxp0 bridge)... playing an
uncached humppa* stream, unplug, few seconds silence, humppa
continues...

*) if you don't have any humppa, you can get the taste by buying the
cd-set and listening to the openbsd 4.0 release song
(http://www.openbsd.org/lyrics.html#40).

reyk



Strange entry in /var/log/authlog [sshd]

2006-11-09 Thread Frederic Durodie
Hi,

I'm running 3.9  patched until 015_ssh.patch and I noticed following entry
in /var/log/authlog :

Nov  9 06:43:13 brainscape sshd[28808]: Did not receive identification
string from UNKNOWN

I'm puzzled to find UNKNOWN and not an ip number as usual, however I'm not
very knowlegdable : should I be worried ? What happened ?

Kind regards,
Frederic




---
NOTE : ERM/KMS phone number changed
 +32 2 737  -- +32 2 742 
---
frederic.durodie+32 476 608448
  @telenet.be   +32 2 687 7816
  @rma.ac.be+32 2 742 6576
  @jet.efda.org +44 1235 464641
+44 7730 811240
  skype (Belgium)



Re: problem setting up trunk interface

2006-11-09 Thread Stuart Henderson
On 2006/11/09 10:40, Reyk Floeter wrote:
 in this example, the you're clients lladdr will be removed from the
 cache after 10 seconds and can be re-learned on another interface.

a little different to standard switches then. if I trunk ath0+em0 with
the AP plugged into a switch and then plug em0 into the switch, the humppa
resumes almost immediately. (though whether this is a good thing is open
to debate..)



Re: Is inetd needed on a web server + PostgreSQL?

2006-11-09 Thread Joachim Schipper
On Tue, Nov 07, 2006 at 01:23:17PM +0100, Alexander Farber wrote:
 On 11/7/06, Stuart Henderson [EMAIL PROTECTED] wrote:
 On 2006/11/07 12:36, Alexander Farber wrote:
  Do you think I still need to run inetd? I've looked through the
  /etc/inetd.conf and there are only 2 time services + ident. I think
  I don't need those 3  services either (my PostgeSQL listens only
  to the /var/www/tmp/.s.PGSQL.5432 file).
 
  So do you think I could switch inetd down or do I miss something?
 
 If you're looking to increase security, it's probably better to spend
 your time looking for some alternative to phpBB (or keeping a close eye
 on access_log irregularities and security fixes).
 
 No, not security - just to save some memory + CPU

inetd consumes no CPU after startup unless it actually is used, and no
measurable amount of memory. Disabling it doesn't hurt, but it doesn't
help either.

  And also, do I need these getty processes if I only use ssh and serial
  console?
 
 What's the benefit? Someone with physical access can't login at the
 console? (but they can do that anyway, by rebooting the box into single-
 user mode). The only thing I can see this doing is causing extra pain
 if there's a problem.
 
 My root-server costs me only 20 Euro/month. For that money no
 support will ever login into it from console and they support only Linux 
 anyway
 (I've installed OpenBSD remotely by dd if=floppy40.fs of=/dev/hda)
 
 I'm just asking here about the getty processes, so that I don't lock
 myself out and have to reinstall everything from scratch.

You could probably make do without getty, but why? Again, they take no
CPU after startup and no measurable amount of memory. And if you ever do
have to get the box going after you've somehow shot ssh (and it's not
like that isn't going to happen at some point), they might be very
useful.

I suppose you *do* have some sort of 'serial console' access? It's not
really SSH-only, I hope? (This would make installs, upgrades, and
attempts at repair very, very painful.)

Joachim



Bizarre Abort Trap on sparc64

2006-11-09 Thread Edd Barrett

Greetings list,

I have been trying to set up a 4.0 ssh/web server. This is my third attempt now.

1 - An Ultra 10
Started abort trapping on most commands, a reboot will result in a non
booting machine.

2 - The same ultra 10
Same again. This time i noted when it started happening. After tar
zxvf src.tar.gz -C /usr . At this point I assumed bad hardware and
bought a new box.

3 - A Sun Netra X1
Same again. After tar zxvf src.tar.gz -C /usr . 10  minutes ago.

Its quite upsetting :(

Im almost certain it isnt a hardware fault.

Any ideas?

--
Best Regards

Edd

---
http://students.dec.bournemouth.ac.uk/ebarrett/



Re: Bizarre Abort Trap on sparc64

2006-11-09 Thread Edd Barrett

On 09/11/06, Edd Barrett [EMAIL PROTECTED] wrote:

Greetings list,

I have been trying to set up a 4.0 ssh/web server. This is my third attempt now.

1 - An Ultra 10
Started abort trapping on most commands, a reboot will result in a non
booting machine.

2 - The same ultra 10
Same again. This time i noted when it started happening. After tar
zxvf src.tar.gz -C /usr . At this point I assumed bad hardware and
bought a new box.

3 - A Sun Netra X1
Same again. After tar zxvf src.tar.gz -C /usr . 10  minutes ago.

Its quite upsetting :(

Im almost certain it isnt a hardware fault.

Any ideas?

--
Best Regards

Edd

---
http://students.dec.bournemouth.ac.uk/ebarrett/



Sorry I should supply some more details.

The netra x1 was a fresh install from cd.
After install via serial line, I added a user.
Next I disabled root ssh login.
Then I installed some packages (vim, screen and emacs)
I enabled pf (only allowing ssh and http in)
Finally I untarred the source code, as I was about to apply the
security patches.

A dmesg is unavailable at this minute because it has locked me out.
(im guessing sshd is getting an abort trap)

--
Best Regards

Edd

---
http://students.dec.bournemouth.ac.uk/ebarrett/



Re: Bizarre Abort Trap on sparc64

2006-11-09 Thread Miod Vallat

Same again. After tar zxvf src.tar.gz -C /usr . 10  minutes ago.

Its quite upsetting :(

Im almost certain it isnt a hardware fault.

Any ideas?


First, reinstall.

Then, next time you extract the source tree, do this in /usr/src, not in
/usr.

Miod



Re: Bizarre Abort Trap on sparc64

2006-11-09 Thread Andreas Maus

Hi.

On 11/9/06, Edd Barrett [EMAIL PROTECTED] wrote:

Same again. This time i noted when it started happening. After tar
zxvf src.tar.gz -C /usr . At this point I assumed bad hardware and
bought a new box.

*ahem*
You shoul untar src.tar.gz to /usr/src not /usr.
Untarring the file to /usr will overwrite your binaries (e.g. tar)
with the _directories_ (e.g. bin/tar/) and this will confuse the
system.

Andreas.

--
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?



Re: altq on 2 interface

2006-11-09 Thread Stuart Henderson
On 2006/11/08 21:56, Reza Muhammad wrote:
 My rule set still not working, as i'm expected to
 limit outgoing and incoming traffic pass to my pf
 machine act as an bridge .
...
 pass out log on xl1 from 172.16.0.228 to 202.57.14.1
 keep state flags S/SA queue (int_out)

this creates a state for traffic from 172.16.0.228 and it's
responses. traffic matching the state is tagged with the queue
name int_out. only traffic sent out of xl1 is queued, there is
no matching queue for xl2 so it's unrestricted on xl2.

 pass out log on xl2 from 202.57.14.1 to 172.16.0.228
 keep state flags S/SA queue (int_in)

this creates a state for traffic from 202.57.14.1 and it's
responses. traffic matching the state is tagged with the queue
name int_in. only traffic sent out of xl2 is queued, there is
no matching queue for xl1 so it's unrestricted on xl2.

I think you want this instead: (not tested beyond checking
that the syntax is valid, but I think it should work).

-- -- -- -- -- -- --
  altq on xl1 bandwidth 100% cbq queue {int,dflt}
  queue int on xl1   bandwidth 3Mb
  queue dflt on xl1  bandwidth  16Kb cbq (default)

  altq on xl2 bandwidth 100% cbq queue {int,dflt}
  queue int on xl2   bandwidth 3Mb
  queue dflt on xl2  bandwidth 16Kb cbq (default)

  pass out log on xl1 from 172.16.0.228 to 202.57.14.1 \
   keep state flags S/SA queue (int)

  pass out log on xl2 from 202.57.14.1 to 172.16.0.228 \
   keep state flags S/SA queue (int)
-- -- -- -- -- -- --

int on xl1 and int on xl2 are different queues, but
just referred to by int when you assign traffic to them.



Re: altq on 2 interface

2006-11-09 Thread Stuart Henderson
On 2006/11/09 10:13, Stuart Henderson wrote:
 this creates a state for traffic from 172.16.0.228 and it's

aargh, s/it's/its/ :(



Re: anyone know where I can get a PLEXTOR 250GB NAS in the United States?

2006-11-09 Thread mickey
On Wed, Nov 08, 2006 at 03:57:30PM -0700, Diana Eichert wrote:
 On Fri, 6 Oct 2006, Diana Eichert wrote:
 
  On Sat, 7 Oct 2006, mickey wrote:
  SNIP
   woman you are fast (:
   there is supposedly a piece sold in .eu (see landisk.html)
   but then nobody knows for sure... it's a japanese sex toy.
   cu
   --
 
 and once again I'm fast on the draw, I see a landisk directory showing up
 in the snapshots directory.
 
 ftp://iawnet.sandia.gov/pub/OpenBSD/snapshots/landisk/
 
 I have a Plextor, just waiting for my 'sample' connector to show up so I
 can wire my rs232 line driver chip/cable to it in a pseudo 'production'
 manner.

i didn't do it!
cu
-- 
paranoic mickey   (my employers have changed but, the name has remained)



Re: Bizarre Abort Trap on sparc64

2006-11-09 Thread Otto Moerbeek
On Thu, 9 Nov 2006, Edd Barrett wrote:

 Greetings list,
 
 I have been trying to set up a 4.0 ssh/web server. This is my third attempt
 now.
 
 1 - An Ultra 10
 Started abort trapping on most commands, a reboot will result in a non
 booting machine.
 
 2 - The same ultra 10
 Same again. This time i noted when it started happening. After tar
 zxvf src.tar.gz -C /usr . At this point I assumed bad hardware and
 bought a new box.
 
 3 - A Sun Netra X1
 Same again. After tar zxvf src.tar.gz -C /usr . 10  minutes ago.
 
 Its quite upsetting :(
 
 Im almost certain it isnt a hardware fault.
 
 Any ideas?

Are you sure you are unpacking the tarball in the right dir? Check
that you are not overwriting executables with tar ztvf src.tar.gz and
note the leading path.

-Otto



Re: Bizarre Abort Trap on sparc64

2006-11-09 Thread Edd Barrett

Then, next time you extract the source tree, do this in /usr/src, not in
/usr.


Yeh your right. Woops

--
Best Regards

Edd

---
http://students.dec.bournemouth.ac.uk/ebarrett/



Re: Routing errors in dual pf/carp firewall setup (no route to host)

2006-11-09 Thread Chad M Stewart
Can you send the output of netstat -rn?  Maybe that'll help myself  
and others a little more.


-Chad



[4.0] if_bnx.c Firmware synchronization timeout

2006-11-09 Thread Cristiano Deana
Hi,

i have a system (Dell 1950) with 4.0 release.
At boot time (during starting network) i randomly (maybe once every 3
boot) i got:

bnx1: /usr/src/sys/dev/pci/if_bnx.c(2271): Firmware synchronization
timeout! msg_data = 0x01030007
kernel: type 1061382 trap, code=6871

and system stop.

In attach my dmesg.
Any hint?

tnx in advance.

-- 
Cris, member of G.U.F.I
Italian FreeBSD User Group
http://www.gufi.org/

[demime 1.01d removed an attachment of type application/octet-stream which had 
a name of dmesg.boot]



Error in php5-gd-5.1.4 packages for OpenBSD 4.0

2006-11-09 Thread Anders J
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hello OpenBSD maintainers.
I think something is wrong in the php5-gd-5.1.4 packages (all flavors)
The dependency can't be satisfied (see below) and i find only
freetype-1.3.1p2.tgz and not freetype.13.1 in /4.0/packages/i386

pkg_add php5-gd-5.1.4-no_x11.tgz
Can't install php5-gd-5.1.4-no_x11.tgz: lib not found freetype.13.1
Even by looking in the dependency tree:
gettext-0.14.5p1, jpeg-6bp3, expat-2.0.0, t1lib-5.1.0p0,
php5-core-5.1.4p1, png-1.2.12, libiconv-1.9.2p3, libxml-2.6.26
Maybe it's in a dependent package, but not tagged with @lib ?
(check with pkg_info -K -L)
If you are still running 3.6 packages, update them.
iQCVAwUBRVNQooJWODLq7fYLAQjHKQP/eT7akMD5YiEk09Y9Asp2SIKBOZfjoxaH
Uiq4XwD5l2YvZVNTt+5orVbMKABa9/+/0JEqhjp3hYeuLclOonDGX2jo57BbvajB
JXaIiti2bI43shg42aKW98WCNdgL0Ej+i44DHGwRI9DWUPEvrMoMrbYhMUUCijAx
pIonimFeZps=
=CuPI
-END PGP SIGNATURE-



Re: Error in php5-gd-5.1.4 packages for OpenBSD 4.0

2006-11-09 Thread Will Maier
On Thu, Nov 09, 2006 at 05:00:34PM +0100, Anders J wrote:
 I think something is wrong in the php5-gd-5.1.4 packages (all
 flavors) The dependency can't be satisfied (see below) and i find
 only freetype-1.3.1p2.tgz and not freetype.13.1 in
 /4.0/packages/i386

It's not a package dependency; freetype.13.1 is provided by the X
install sets. Read the FAQ.

http://www.openbsd.org/faq/faq15.html#PkgInstall

If you're still confused, read the port's Makefile.

-- 

o--{ Will Maier }--o
| web:...http://www.lfod.us/ | [EMAIL PROTECTED] |
*--[ BSD Unix: Live Free or Die ]--*



Re: Error in php5-gd-5.1.4 packages for OpenBSD 4.0

2006-11-09 Thread Marcus Popp
Hi,

there is a special ml for ports@,
further information can be found at http://www.openbsd.org/mail.html.

hth,

Marcus.



% stdout?

2006-11-09 Thread Cassio B. Caporal
Hey,

I have problems to print '%' in stdout... Suppose code below:

#include stdio.h

main() {
 char foo[] = bar=30%\n;
 fprintf(stdout, bar);
}

OpenBSD returns : bar=30
Linux returns   : bar=30%

How can I solve this? Thanks,



Re: % stdout?

2006-11-09 Thread Andreas Kahari

Have a look in your C code book.  The you will need to printf %% to get a '%'.

Andreas


On 09/11/06, Cassio B. Caporal [EMAIL PROTECTED] wrote:

Hey,

I have problems to print '%' in stdout... Suppose code below:

#include stdio.h

main() {
 char foo[] = bar=30%\n;
 fprintf(stdout, bar);
}

OpenBSD returns : bar=30
Linux returns   : bar=30%

How can I solve this? Thanks,





--
Andreas Kahari
Somewhere in the general Cambridge area, UK



Re: % stdout?

2006-11-09 Thread Jason Dixon

On Nov 9, 2006, at 11:37 AM, Cassio B. Caporal wrote:


Hey,

I have problems to print '%' in stdout... Suppose code below:

#include stdio.h

main() {
 char foo[] = bar=30%\n;
 fprintf(stdout, bar);
}

OpenBSD returns : bar=30
Linux returns   : bar=30%

How can I solve this? Thanks,


$ cat foo.c
#include stdio.h

main() {
char foo[] = bar=30%%\n;
fprintf(stdout, foo);
}
$ gcc foo.c -o foo
$ ./foo
bar=30%


--
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net



Re: Driver for BCM4318

2006-11-09 Thread Jon Simola

On 11/4/06, Jon Simola [EMAIL PROTECTED] wrote:

On 10/4/06, Theo de Raadt [EMAIL PROTECTED] wrote:

 The Broadcom 802.11 chipsets are the bastards of the industry.  They
 are the most complicated and difficult to program.



http://bcm-specs.sipsolutions.net, and it's been rather enjoyable so
far. Thanks for the challenge, and for OpenBSD in general.


Just a followup, I've been making some steady progress. I'm hoping to
have the thing sending packets this weekend. My current code and some
example output is up and available at http://proteus.mecha.com/bcw/ -
take heed, the code is certainly a bit messy at this point.

--
Jon



Re: % stdout?

2006-11-09 Thread Cassio B. Caporal
Yes, but I read lines from a file.. I wrote a function that add one
more '%' and works fine. Thanks!

Jason Dixon wrote:
 On Nov 9, 2006, at 11:37 AM, Cassio B. Caporal wrote:
 
 Hey,

 I have problems to print '%' in stdout... Suppose code below:

 #include stdio.h

 main() {
  char foo[] = bar=30%\n;
  fprintf(stdout, bar);
 }

 OpenBSD returns : bar=30
 Linux returns   : bar=30%

 How can I solve this? Thanks,
 
 $ cat foo.c
 #include stdio.h
 
 main() {
 char foo[] = bar=30%%\n;
 fprintf(stdout, foo);
 }
 $ gcc foo.c -o foo
 $ ./foo
 bar=30%
 
 
 -- 
 Jason Dixon
 DixonGroup Consulting
 http://www.dixongroup.net



Re: % stdout?

2006-11-09 Thread John Wright
On Nov 9, 2006, at 11:37 AM, Cassio B. Caporal wrote:
   Hey,

   I have problems to print '%' in stdout... Suppose code below:

   #include stdio.h

   main() {
char foo[] = bar=30%\n;
fprintf(stdout, bar);
   }

   OpenBSD returns : bar=30
   Linux returns   : bar=30%

   How can I solve this? Thanks,

fprintf(stdout, %s, foo);



Re: % stdout?

2006-11-09 Thread Reyk Floeter
On Thu, Nov 09, 2006 at 11:59:12AM -0500, Jason Dixon wrote:
  I have problems to print '%' in stdout... Suppose code below:
 
  #include stdio.h
 
  main() {
   char foo[] = bar=30%\n;
   fprintf(stdout, bar);
  }
 
  OpenBSD returns : bar=30
  Linux returns   : bar=30%
 
  How can I solve this? Thanks,
 
 $ cat foo.c
 #include stdio.h
 
 main() {
 char foo[] = bar=30%%\n;
 fprintf(stdout, foo);

heh, you found the bug. i just wanted to bet that the code would not
run under linux...

 }
 $ gcc foo.c -o foo
 $ ./foo
 bar=30%
 

you should also completely avoid the format string in this case.

printf(%s, foo);

reyk



Re: openbsd + external sensor (t°, humidity, ...)

2006-11-09 Thread Julien TOUCHE
Antti Harri wrote on 09/11/2006 14:37:
 My friend has the diagram and the part listing although some texts
 are in Finnish but I can translate them into English if you want. The
 parts are pretty cheap, less than 10 euros in here for one sensor,
 the DS1820 is the most expensive part.

there is some doc here (french ...)
http://z-graphix.com/linux/temperature/howto.html

what bugs me, is
1- how do you manage multiple sensors without using one rs232 per sensor
or a way to connect with something else (like rj45/lan or usb; i want to
use an old
box which has 2 rs232 both used and 4-ports serial card seems not really
cheap)
above link has some part for usb but seems there is not all details.
2- how to manage sensor on distance  10-20m: radio, wifi, ...


thanks
Regards

Julien



Re: % stdout?

2006-11-09 Thread Terry
Also, I think you mean:

fprintf(stdout, foo);

not

fprintf(stdout, bar);

right?

Terry

On Thu, Nov 09, 2006 at 04:49:20PM +, Andreas Kahari wrote:
 Have a look in your C code book.  The you will need to printf %% to get a 
 '%'.
 
 Andreas
 
 
 On 09/11/06, Cassio B. Caporal [EMAIL PROTECTED] wrote:
 Hey,
 
 I have problems to print '%' in stdout... Suppose code below:
 
 #include stdio.h
 
 main() {
  char foo[] = bar=30%\n;
  fprintf(stdout, bar);
 }
 
 OpenBSD returns : bar=30
 Linux returns   : bar=30%
 
 How can I solve this? Thanks,
 
 
 
 
 -- 
 Andreas Kahari
 Somewhere in the general Cambridge area, UK



Re: % stdout?

2006-11-09 Thread Andreas Kahari

Suppose the data in 'foo' comes from user input:

#include stdio.h

main()
{
   charfoo[] = bar=30%\n;
   fprintf(stdout, %s, foo);
}



Andreas


On 09/11/06, Jason Dixon [EMAIL PROTECTED] wrote:

On Nov 9, 2006, at 11:37 AM, Cassio B. Caporal wrote:

   Hey,

   I have problems to print '%' in stdout... Suppose code below:

   #include stdio.h

   main() {
char foo[] = bar=30%\n;
fprintf(stdout, bar);
   }

   OpenBSD returns : bar=30
   Linux returns   : bar=30%

   How can I solve this? Thanks,

$ cat foo.c
#include stdio.h

main() {
 char foo[] = bar=30%%\n;
 fprintf(stdout, foo);
}
$ gcc foo.c -o foo
$ ./foo
bar=30%


--
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net





--
Andreas Kahari
Somewhere in the general Cambridge area, UK



Re: % stdout?

2006-11-09 Thread Matthew Closson

On Thu, 9 Nov 2006, Cassio B. Caporal wrote:


Hey,

I have problems to print '%' in stdout... Suppose code below:

#include stdio.h

main() {
 char foo[] = bar=30%\n;
 fprintf(stdout, bar);
}

OpenBSD returns : bar=30
Linux returns   : bar=30%

How can I solve this? Thanks,


Use the format specifier with fprintf:

#include stdio.h

int main()
{
  char foo[] = bar=30%\n;
  fprintf(stdout, %s, foo);
}

cc test.c
./a.out
bar=30%


-Matt-



Re: % stdout?

2006-11-09 Thread Philip Guenther

On 11/9/06, Cassio B. Caporal [EMAIL PROTECTED] wrote:

I have problems to print '%' in stdout... Suppose code below:

#include stdio.h

main() {
 char foo[] = bar=30%\n;
 fprintf(stdout, bar);


When posting code, please cut-and-paste it into your message, as the
above code won't compile.  I presume you meant to write:
fprintf(stdout, foo);

That passes 'foo' as the format argument to fprintf().  The format
argument is a compact description of what should be output and *NOT*
simply a string to be output.  If you want to simply output a literal
string you should *not* pass that string as the format to fprintf, but
rather pass a format saying just output the next argument as a
string and pass the string as the next argument, ala:
 fprintf(stdout, %s, foo);

If the string being printed is under the control of an outside party,
then it is *critical* that you do something like the above to avoid
security holes.

IMHO, you should never invoke fprintf() with exactly two arguments,
nor printf() with exactly one argument.  Either use a format of %s
or switch to fputs()/puts().

(...though you have to reverse the order of the arguments when going
from fprintf() to fputs()...)


Philip Guenther



Re: % stdout?

2006-11-09 Thread Steffen Wendzel
On Thu, 09 Nov 2006 14:37:33 -0200 Cassio B. Caporal [EMAIL PROTECTED] 
wrote:

:   Hey,

Hi,

: 
:   I have problems to print '%' in stdout... Suppose code below:
: 
:   #include stdio.h
: 
:   main() {

your main should be of type 'int'.

:char foo[] = bar=30%\n;
:fprintf(stdout, bar);

You mean fprintf(stdout, foo); ?

:   }
: 
:   How can I solve this? Thanks,

If you want to print a '%', you need to use '%%' in your array.

--steffen

-- 
website: http://cdp.doomed-reality.org
hardened linux: http://drlinux.doomed-reality.org



Re: % stdout?

2006-11-09 Thread Tom Cosgrove
Seriously guys.  NOOO!!!

To print an arbitrary string use fprintf(stdout, %s, foo);

Come on.

Tom

 Jason Dixon 9-Nov-06 16:59 

 On Nov 9, 2006, at 11:37 AM, Cassio B. Caporal wrote:

  Hey,
 
  I have problems to print '%' in stdout... Suppose code below:
 
  #include stdio.h
 
  main() {
   char foo[] = bar=30%\n;
   fprintf(stdout, bar);
  }
 
  OpenBSD returns : bar=30
  Linux returns   : bar=30%
 
  How can I solve this? Thanks,

 $ cat foo.c
 #include stdio.h

 main() {
  char foo[] = bar=30%%\n;
  fprintf(stdout, foo);
 }
 $ gcc foo.c -o foo
 $ ./foo
 bar=30%



Re: % stdout?

2006-11-09 Thread Andy Hayward

On 11/9/06, Cassio B. Caporal [EMAIL PROTECTED] wrote:

I have problems to print '%' in stdout... Suppose code below:


Use:

   fprintf(stdout, %s, foo);

This is mentioned in the man page for fprintf.

-- ach



Re: openbsd + external sensor (t°, humidity, ...)

2006-11-09 Thread Jesus Roncero
On Thursday 09 November 2006 17:09, Julien TOUCHE wrote:
 Antti Harri wrote on 09/11/2006 14:37:
  My friend has the diagram and the part listing although some texts
  are in Finnish but I can translate them into English if you want. The
  parts are pretty cheap, less than 10 euros in here for one sensor,
  the DS1820 is the most expensive part.

 there is some doc here (french ...)
 http://z-graphix.com/linux/temperature/howto.html

 what bugs me, is
 1- how do you manage multiple sensors without using one rs232 per sensor
 or a way to connect with something else (like rj45/lan or usb; i want to
 use an old 
 box which has 2 rs232 both used and 4-ports serial card seems not really
 cheap)

You don't have to. You only need one rs232 and there you can connect as many 
sensors as you want. Have a look at how the 1-wire protocol works.

 above link has some part for usb but seems there is not all details.
 2- how to manage sensor on distance  10-20m: radio, wifi, ...

Umm, I think there are 1-wire products that use wireless technology, but you 
should do ok using wires (up to 100m without using external power suply).

Have a look at the pictures here: http://temp.roncero.org/informacion.php

-- 
Jeszs Roncero [EMAIL PROTECTED]
System Developer
Tel: +44 (0) 845 666 7778
http://www.mxtelecom.com



Re: Troubles trying to configure non-default VPN

2006-11-09 Thread nuffnough
On 11/9/06, jared r r spiegel [EMAIL PROTECTED] wrote:

 On Wed, Nov 08, 2006 at 07:50:46AM +1100, nuffnough wrote:
  I have an OpenBSD 3.9 box and I've been asked to configure it to
 terminate a
  VPN using AES-256 encryption with SHA authentication, DH Group 5 (rather
  than the default group 2) and a lifetime of one day.  I configured my
  isakmpd.conf file like this:

   if you've any interest in trying to use ipsecctl, and if you have other
   machines on 4.0 or -current, i was entirely 100% successful ( 'was' as
   now the 3.9 boxes this applied to are 4.0 ) with using ipsecctl from
   a late -current on 3.9 machines.



Upgrades will go ahead over the coming weekend.   My disks finally arrived!
(It is a bummer living in asia sometimes.  Everything goes slower)




  the ipsecctl in 3.9-REL was a bit less robust in what it understood in the
   config file, compared to 4.0.

   at worst, you could run it with lots of -v and then eyeball the FIFO
 commands
   it does and then write up an isakmpd.conf around that.

   but ipsecctl aside:

  **
  [Phase 1]
  Default=ISAKMP-peer-default
  10.1.2.138= ISAKMP-peer-xx
 
  [Phase 2]
  Connections=IPsec-xx1-rl1-2, IPsec-xx1-rl1-3
 
  [ISAKMP-peer-xx]
 ...
  [IPsec-xx1-rl1-2]
  Phase=  2
  ISAKMP-peer=ISAKMP-peer-xx

   is -bp == -xx ?


Yes.  Sorry about that.


 What ended up happening was that my end was initiating the tunnel using
  AES-128,  and a lifetime of 1 hour (the default configuration as
 indicated
  in the man page).

  I defined my own Transform ...
 ...
  My understanding from reading the man page is that is the syntax I need
 to
  use.  It also means that we should be attempting to send a 256 bit key
  length with a lifetime of 1 day (86400 seconds) whenever we're
 initiating
  the tunnel.  Also, MODP_1536 should be correct for DH Group 5.  Please
 let
  me know if I am wrong here.

   yup, 1536 is 5


Thanks for the confirmation.

  if it helps diagnose stuff for you, this doesn't catch _everything_, but
   it helped me a great deal with filtering out too much verboseness in the
   majority of my debug fricking with isakmpd:

 $ sudo /sbin/isakmpd -dDA=0 -D2=50 -D5=50 -D7=50 -D8=40 -D9=30


awesome.  I've just being using -DA=99 and getting lost.  :-)


 What actually happened was that my box stopped trying to initiate the
  tunnel.  With the old configuration I was getting a packet exchange
 every
  couple of minutes.

   was that perhaps because it was always unsuccessful and was just
 retrying?,


When I say stopped making any attempt, perhaps I should have been clearer.
Prior to the change I was seeing two ipsec packets every two minutes.  I
forget what they were now.  After I made the change, I saw none.  This was
using tcpdump -netttl -i rl0 | grep 10.1.2.138



  or did everything get established and you made it out the other side of
   phase-2 OK, but the actual parameters used were simply not the ones
 desired?


No Phase one.  Just a packet to initiate,  then a packet back to say that
the far end doesn't like me.  Debug on the other end indicated that when my
end initiates,  it does it with 128bit key length and a lifetime of one
hour.  Of course,  I didn't have the brilliant idea of just setting my end
up as passive,  to make sure that the other end initiates.  The required
parameters fall within the ranges of the default AES-SHA config.


  after they go through phase-1 and make it through phase-2, they ( the
   isakmpd processes, or at least your isakmpd and whatever the other side
 is )
   should be /relatively/ quiet.


Yep.  Also,  typically once phase-1 is established,  phase-2 problems are
relatively trivial.  And mostly just problems with my policy file.


 After I made this change all my other VPNs came up as
  usual but there was no traffic at all relating to this tunnel.
 
  Is my syntax incorrect?

   without running it through isakmpd to parse it, and given that i'm a bit
   rusty with isakmpd.conf, nothing jumps out at me.


The real (prolly newbie) question that I think I need the answer to is:
After I define a custom transform, am I still able to call the standard
pre-defined transforms at the same time?  I can't see a problem with it,
but then I don't (presently) understand how the system loads these
definitions.  I have about 20 other vpns with diverse encryption
parameters.  It would be moderately painful if I had to manually configure
them all just to make this new one work.


 Is there something I am missing about the structure of isakmpd.conf about
  the placement or reference of these new sections for lifetime and
  XX-AES-SHA?

   tbh i don't recall if order matters.  here's a c/p of an isakmpd.conf
   w/custom phase-1 and phase-2 i had running stable up until i switched
   over to an ipsecctl-based scheme. ( we had our own X509 fqdn certs
   from back in the certpatch days ).  either end of the tunnel was OK
   to initiate the negotiation, and 

Re: Error in php5-gd-5.1.4 packages for OpenBSD 4.0

2006-11-09 Thread Anders J
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Anders J wrote:
.
Yeah i must apologize, i missed that one.

//A

Will Maier wrote:
 On Thu, Nov 09, 2006 at 05:00:34PM +0100, Anders J wrote:
 I think something is wrong in the php5-gd-5.1.4 packages (all
 flavors) The dependency can't be satisfied (see below) and i find
 only freetype-1.3.1p2.tgz and not freetype.13.1 in
 /4.0/packages/i386
 
 It's not a package dependency; freetype.13.1 is provided by the X
 install sets. Read the FAQ.
 
 http://www.openbsd.org/faq/faq15.html#PkgInstall
 
 If you're still confused, read the port's Makefile.
iQCVAwUBRVOA+oJWODLq7fYLAQgogAP+OawdaOnmscq5wmz/2DfMf8dLa8gYDEw2
LWey1L6Rt9IYNwSBRmja5zfoHq7tS7+jfEV5sPWPNkPLDfcpDjqUJhFGxTuwEmGa
uTUoCld1BXtoxNCI9Ld4oV52Wx8ZGre7lIkyH7eUS7MJLt9sRNJsLXVhAcRFv//T
pFAvuDIUVcI=
=rOX3
-END PGP SIGNATURE-



Porting GEOM

2006-11-09 Thread Damian Wiest
Has anyone attempted to port GEOM from FreeBSD to OpenBSD?  I'm inclined 
to try my hand at it, but I thought I'd check to see if anyone else was
working on it.

-Damian



SOLVED AbiWord 2.4.5 on OpenBSD 4.0 dictionary issue

2006-11-09 Thread Jonathan Franks

On Nov 8, 2006, at 7:40 PM, Jonathan Franks wrote:


Hi all,

I'm having an issue with the Abiword package in 4.0. It seems to  
work fine except for the dictionary issue I am posting about.


Essentially, with Check Spelling As You Type enabled, the  
following error appears after the first word is typed:


Could not load the dictionary for the English (US) [en-US] language

In my attempts to resolve the issue, I came across this:

http://archives.neohapsis.com/archives/openbsd/2006-07/1169.html

I did attempt to create the symlinks referenced in the thread, but  
to no avail... in fact the referenced files aren't there to link to.


So I'm simply wondering if someone more savvy about AbiWord, or  
this issue, can point me in the right direction.


Any advice will be appreciated. dmesg follows:



After spending most of my day on this I have managed to resolve the  
issue. I installed the ispell package, and created a symlink in the / 
usr/local/share/AbiSuite-2.4/dictionary directory to the ispell  
dictionary (in my case /usr/local/lib/ispell/american.hash) .


According to this bit from the abiword-dev archive it's an endian  
problem, or was at the time... either way this solution works  
perfectly so I'm in business.


http://www.abiword.org/mailinglists/abiword-dev/99/June/0096.html

Anyhow I just figured I'd post my success here in case it might be  
helpful for someone else


-Jonathan



Problem when apply 001_httpd.patch

2006-11-09 Thread Maverick
Hi i am trying to apply the 001 patch
 What i have done is 
 
 cd /usr/src
 patch -p0  001_httpd.patch
 
 and i come back to me as: 
 
 Hmm... Looks like a unified diff to me...
 The text leading up to this was:
 --
 |Apply by doing:
 | cd /usr/src
 | patch -p0  001_httpd.patch
 |
 |And then rebuild and install httpd and its modules:
 | cd usr.sbin/httpd
 | make -f Makefile.bsd-wrapper obj
 | make -f Makefile.bsd-wrapper cleandir
 | make -f Makefile.bsd-wrapper depend
 | make -f Makefile.bsd-wrapper
 | make -f Makefile.bsd-wrapper install
 |
-- 
View this message in context: 
http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265560
Sent from the openbsd user - misc mailing list archive at Nabble.com.



Re: Problem when apply 001_httpd.patch

2006-11-09 Thread Andreas Maus

Hi.

So whats your question/problem ?

Andreas.

On 11/9/06, Maverick [EMAIL PROTECTED] wrote:

Hi i am trying to apply the 001 patch
 What i have done is

 cd /usr/src
 patch -p0  001_httpd.patch

 and i come back to me as:

 Hmm... Looks like a unified diff to me...
 The text leading up to this was:
 --
 |Apply by doing:
 | cd /usr/src
 | patch -p0  001_httpd.patch
 |
 |And then rebuild and install httpd and its modules:
 | cd usr.sbin/httpd
 | make -f Makefile.bsd-wrapper obj
 | make -f Makefile.bsd-wrapper cleandir
 | make -f Makefile.bsd-wrapper depend
 | make -f Makefile.bsd-wrapper
 | make -f Makefile.bsd-wrapper install
 |
--
View this message in context: 
http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265560
Sent from the openbsd user - misc mailing list archive at Nabble.com.





--
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?



Re: Problem when apply 001_httpd.patch

2006-11-09 Thread Joel Goguen

I don't see an issue there.  It looks like it applied properly.
Follow the directions it printed out and see that it compiles and
installs properly :)

On 11/9/06, Maverick [EMAIL PROTECTED] wrote:

Hi i am trying to apply the 001 patch
 What i have done is

 cd /usr/src
 patch -p0  001_httpd.patch

 and i come back to me as:

 Hmm... Looks like a unified diff to me...
 The text leading up to this was:
 --
 |Apply by doing:
 | cd /usr/src
 | patch -p0  001_httpd.patch
 |
 |And then rebuild and install httpd and its modules:
 | cd usr.sbin/httpd
 | make -f Makefile.bsd-wrapper obj
 | make -f Makefile.bsd-wrapper cleandir
 | make -f Makefile.bsd-wrapper depend
 | make -f Makefile.bsd-wrapper
 | make -f Makefile.bsd-wrapper install
 |
--
View this message in context: 
http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265560
Sent from the openbsd user - misc mailing list archive at Nabble.com.





--
Joel Goguen
Bachelor of Computer Science III
University of New Brunswick
http://iapetus.dyndns.org/



Re: Problem when apply 001_httpd.patch

2006-11-09 Thread Maverick
Oop
The rest of the post is gone :-(

The thing that i got back after patch -p0  001_httpd.patch  is this

Hmm... Looks like a unified diff to me...
The text leading up to this was:
--
|Apply by doing:
| cd /usr/src
| patch -p0  001_httpd.patch
|
|And then rebuild and install httpd and its modules:
| cd usr.sbin/httpd
| make -f Makefile.bsd-wrapper obj
| make -f Makefile.bsd-wrapper cleandir
| make -f Makefile.bsd-wrapper depend
| make -f Makefile.bsd-wrapper
| make -f Makefile.bsd-wrapper install
|
|
|If httpd had been started, you might want to run
| apachectl stop
|before running make install, and
| apachectl start
|afterwards.
|
|Index: usr.sbin/httpd/src/main//http_protocol.c
|===
|RCS file: /cvs/src/usr.sbin/httpd/src/main/http_protocol.c,v
|retrieving revision 1.30
|retrieving revision 1.30.4.1
|diff -u -p -r1.30 -r1.30.4.1
|--- usr.sbin/httpd/src/main//http_protocol.c 11 Feb 2006 19:15:57 -
1.30
|+++ usr.sbin/httpd/src/main//http_protocol.c 1 Nov 2006 21:18:38 -
1.30.4.1
--
File to patch:

I try the 003 patch but it happend to be the same sort of thing. Why do they
ask me for the file to patch :(
Can you please tell me what i have done wrong here?

:-(

Thanks you very much 





Andreas Maus-2 wrote:
 
 Hi.
 
 So whats your question/problem ?
 
 Andreas.
 
 On 11/9/06, Maverick [EMAIL PROTECTED] wrote:
 Hi i am trying to apply the 001 patch
  What i have done is

  cd /usr/src
  patch -p0  001_httpd.patch

  and i come back to me as:

  Hmm... Looks like a unified diff to me...
  The text leading up to this was:
  --
  |Apply by doing:
  | cd /usr/src
  | patch -p0  001_httpd.patch
  |
  |And then rebuild and install httpd and its modules:
  | cd usr.sbin/httpd
  | make -f Makefile.bsd-wrapper obj
  | make -f Makefile.bsd-wrapper cleandir
  | make -f Makefile.bsd-wrapper depend
  | make -f Makefile.bsd-wrapper
  | make -f Makefile.bsd-wrapper install
  |
 --
 View this message in context:
 http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265560
 Sent from the openbsd user - misc mailing list archive at Nabble.com.


 
 
 -- 
 Hobbes : Shouldn't we read the instructions?
 Calvin : Do I look like a sissy?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265976
Sent from the openbsd user - misc mailing list archive at Nabble.com.



Re: Problem when apply 001_httpd.patch

2006-11-09 Thread Maverick
Oop
The rest of the post is gone :-(

The thing that i got back after patch -p0  001_httpd.patch  is this

Hmm... Looks like a unified diff to me...
The text leading up to this was:
--
|Apply by doing:
| cd /usr/src
| patch -p0  001_httpd.patch
|
|And then rebuild and install httpd and its modules:
| cd usr.sbin/httpd
| make -f Makefile.bsd-wrapper obj
| make -f Makefile.bsd-wrapper cleandir
| make -f Makefile.bsd-wrapper depend
| make -f Makefile.bsd-wrapper
| make -f Makefile.bsd-wrapper install
|
|
|If httpd had been started, you might want to run
| apachectl stop
|before running make install, and
| apachectl start
|afterwards.
|
|Index: usr.sbin/httpd/src/main//http_protocol.c
|===
|RCS file: /cvs/src/usr.sbin/httpd/src/main/http_protocol.c,v
|retrieving revision 1.30
|retrieving revision 1.30.4.1
|diff -u -p -r1.30 -r1.30.4.1
|--- usr.sbin/httpd/src/main//http_protocol.c 11 Feb 2006 19:15:57 -
1.30
|+++ usr.sbin/httpd/src/main//http_protocol.c 1 Nov 2006 21:18:38 -
1.30.4.1
--
File to patch:

I try the 003 patch but it happend to be the same sort of thing. Why do they
ask me for the file to patch :(
Can you please tell me what i have done wrong here?

:-(

Thanks you very much 







Joel Goguen wrote:
 
 I don't see an issue there.  It looks like it applied properly.
 Follow the directions it printed out and see that it compiles and
 installs properly :)
 
 On 11/9/06, Maverick [EMAIL PROTECTED] wrote:
 Hi i am trying to apply the 001 patch
  What i have done is

  cd /usr/src
  patch -p0  001_httpd.patch

  and i come back to me as:

  Hmm... Looks like a unified diff to me...
  The text leading up to this was:
  --
  |Apply by doing:
  | cd /usr/src
  | patch -p0  001_httpd.patch
  |
  |And then rebuild and install httpd and its modules:
  | cd usr.sbin/httpd
  | make -f Makefile.bsd-wrapper obj
  | make -f Makefile.bsd-wrapper cleandir
  | make -f Makefile.bsd-wrapper depend
  | make -f Makefile.bsd-wrapper
  | make -f Makefile.bsd-wrapper install
  |
 --
 View this message in context:
 http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265560
 Sent from the openbsd user - misc mailing list archive at Nabble.com.


 
 
 -- 
 Joel Goguen
 Bachelor of Computer Science III
 University of New Brunswick
 http://iapetus.dyndns.org/
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265975
Sent from the openbsd user - misc mailing list archive at Nabble.com.



Re: Problem when apply 001_httpd.patch

2006-11-09 Thread Steffen Wendzel
On Thu, 9 Nov 2006 12:50:20 -0800 (PST) Maverick [EMAIL PROTECTED] wrote:

: Oop
: The rest of the post is gone :-(
: 
: The thing that i got back after patch -p0  001_httpd.patch  is this
: 
: Hmm... Looks like a unified diff to me...
: The text leading up to this was:
: --
: File to patch:
: 
: I try the 003 patch but it happend to be the same sort of thing. Why do they
: ask me for the file to patch :(
: Can you please tell me what i have done wrong here?
: 

did you extract the .tgz of the source code in the correct
directory? = does /usr/src/usr.sbin/... exist?

if not: get if from ftp.openbsd.org/pub/OpenBSD/4.0/...

--Steffen

-- 
website: http://cdp.doomed-reality.org
hardened linux: http://drlinux.doomed-reality.org



Re: Problem when apply 001_httpd.patch

2006-11-09 Thread viq

On 09/11/06, Maverick [EMAIL PROTECTED] wrote:

Oop
The rest of the post is gone :-(

The thing that i got back after patch -p0  001_httpd.patch  is this

Hmm... Looks like a unified diff to me...
The text leading up to this was:
--
|Apply by doing:
| cd /usr/src
| patch -p0  001_httpd.patch
|
|And then rebuild and install httpd and its modules:
| cd usr.sbin/httpd
| make -f Makefile.bsd-wrapper obj
| make -f Makefile.bsd-wrapper cleandir
| make -f Makefile.bsd-wrapper depend
| make -f Makefile.bsd-wrapper
| make -f Makefile.bsd-wrapper install
|
|
|If httpd had been started, you might want to run
| apachectl stop
|before running make install, and
| apachectl start
|afterwards.
|
|Index: usr.sbin/httpd/src/main//http_protocol.c
|===
|RCS file: /cvs/src/usr.sbin/httpd/src/main/http_protocol.c,v
|retrieving revision 1.30
|retrieving revision 1.30.4.1
|diff -u -p -r1.30 -r1.30.4.1
|--- usr.sbin/httpd/src/main//http_protocol.c 11 Feb 2006 19:15:57 -
1.30
|+++ usr.sbin/httpd/src/main//http_protocol.c 1 Nov 2006 21:18:38 -
1.30.4.1
--
File to patch:

I try the 003 patch but it happend to be the same sort of thing. Why do they
ask me for the file to patch :(
Can you please tell me what i have done wrong here?


Have you extracted the sources?


:-(

Thanks you very much


--
viq



Re: Problem when apply 001_httpd.patch

2006-11-09 Thread Allie D.
On Thu, November 9, 2006 12:49, Maverick wrote:
 Oop
 The rest of the post is gone :-(

 The thing that i got back after patch -p0  001_httpd.patch  is this

 Hmm... Looks like a unified diff to me...
 The text leading up to this was:
 --
 |Apply by doing:
 | cd /usr/src
 | patch -p0  001_httpd.patch
 |
 |And then rebuild and install httpd and its modules:
 | cd usr.sbin/httpd
 | make -f Makefile.bsd-wrapper obj
 | make -f Makefile.bsd-wrapper cleandir
 | make -f Makefile.bsd-wrapper depend
 | make -f Makefile.bsd-wrapper
 | make -f Makefile.bsd-wrapper install
 |
 |
 |If httpd had been started, you might want to run
 | apachectl stop
 |before running make install, and
 | apachectl start
 |afterwards.
 |
 |Index: usr.sbin/httpd/src/main//http_protocol.c
 |===
 |RCS file: /cvs/src/usr.sbin/httpd/src/main/http_protocol.c,v
 |retrieving revision 1.30
 |retrieving revision 1.30.4.1
 |diff -u -p -r1.30 -r1.30.4.1
 |--- usr.sbin/httpd/src/main//http_protocol.c 11 Feb 2006 19:15:57 -
 1.30
 |+++ usr.sbin/httpd/src/main//http_protocol.c 1 Nov 2006 21:18:38 -
 1.30.4.1
 --
 File to patch:

 I try the 003 patch but it happend to be the same sort of thing. Why do
 they
 ask me for the file to patch :(
 Can you please tell me what i have done wrong here?

 :-(

 Thanks you very much
Try and cd /usr/src before trying to patch ;) The patches assume you're
patching from that directory. Enjoy...







 Joel Goguen wrote:

 I don't see an issue there.  It looks like it applied properly.
 Follow the directions it printed out and see that it compiles and
 installs properly :)

 On 11/9/06, Maverick [EMAIL PROTECTED] wrote:
 Hi i am trying to apply the 001 patch
  What i have done is

  cd /usr/src
  patch -p0  001_httpd.patch

  and i come back to me as:

  Hmm... Looks like a unified diff to me...
  The text leading up to this was:
  --
  |Apply by doing:
  | cd /usr/src
  | patch -p0  001_httpd.patch
  |
  |And then rebuild and install httpd and its modules:
  | cd usr.sbin/httpd
  | make -f Makefile.bsd-wrapper obj
  | make -f Makefile.bsd-wrapper cleandir
  | make -f Makefile.bsd-wrapper depend
  | make -f Makefile.bsd-wrapper
  | make -f Makefile.bsd-wrapper install
  |
 --
 View this message in context:
 http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265560
 Sent from the openbsd user - misc mailing list archive at Nabble.com.




 --
 Joel Goguen
 Bachelor of Computer Science III
 University of New Brunswick
 http://iapetus.dyndns.org/




 --
 View this message in context:
 http://www.nabble.com/Problem-when-apply-001_httpd.patch-tf2603928.html#a7265975
 Sent from the openbsd user - misc mailing list archive at Nabble.com.



Re: questions about performance - ipsec - pf

2006-11-09 Thread Henning Brauer
* Frans Haarman [EMAIL PROTECTED] [2006-11-08 12:19]:
 Greetings,
 
 The idea is to switch to OpenBSD for our BGP
 D/PF. In the future we will get Gigabit connections so I am concerned
 about performance!
 
 The idea is to have 2 carped boxes voor OpenBGPD and Packetfilter.
 Then behind that 2 carped boxes for IPSEC  Packetfilter (future)
 
 I am assuming with currentday hardware this should be a breeze for the
 machines. But I'd love to hear from people filtering gigabit and what
 to be aware off when setting it up

we've been thru that a thousand times now, use the archives.
short summary: bandwidth irrelevant, pps counts. with careful selection 
of network cards and busses etc, you can get way highger thruput than 
you expect.

-- 
Henning Brauer, [EMAIL PROTECTED], [EMAIL PROTECTED]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg  Amsterdam



Problems applying 002_ssl.patch to 4.0 upgraded system

2006-11-09 Thread Scott Plumlee
Anyone else seeing this? This was a 3.9 system upgraded to 4.0.  I'm 
wondering if I missed something when clearing out the old source code?


/usr/src/lib/libssl/src/crypto/rsa/rsa_x931.c: In function 
`RSA_X931_hash_id':


/usr/src/lib/libssl/src/crypto/rsa/rsa_x931.c:165: error: `NID_sha256' 
undeclared (first use in this function)


/usr/src/lib/libssl/src/crypto/rsa/rsa_x931.c:165: error: (Each 
undeclared identifier is reported only once


/usr/src/lib/libssl/src/crypto/rsa/rsa_x931.c:165: error: for each 
function it appears in.)


/usr/src/lib/libssl/src/crypto/rsa/rsa_x931.c:168: error: `NID_sha384' 
undeclared (first use in this function)


/usr/src/lib/libssl/src/crypto/rsa/rsa_x931.c:171: error: `NID_sha512' 
undeclared (first use in this function)

*** Error code 1

Stop in /usr/src/lib/libssl/crypto.
*** Error code 1

Stop in /usr/src/lib/libssl.



Re: Problem when apply 001_httpd.patch

2006-11-09 Thread Ralph Gessner
Maverick wrote:
 Hi i am trying to apply the 001 patch
  What i have done is 
  
  cd /usr/src
  patch -p0  001_httpd.patch
  
  and i come back to me as: 

[SNIP]


It's the same procedure on 4.0 as it was on 3.9 and it will still
be in 4.1.

You ask the the same question on 11/29/06 in Applying patch? regarding
the sendmail patch for 3.9.

Extract the sources to /usr/src, patch the source and rebuild.

Do yourself a favor and read the FAQ!

http://www.openbsd.org/faq/faq10.html#Patches


Ralph



ADSL half-bridge mode Assign a default gateway not on the same subnet as my public IP

2006-11-09 Thread Damon McMahon

Greetings,

I'm trying to get my Netgear DG-632 to operate as a half-bridge to my
OpenBSD router.

Unfortunately the public IP address my ISP is dynamically assigning
(58.104.125.124) is not on the same subnet as their default gateway
(211.31.137.132), hence I suspect dhclient(8) is baulking when
attempting to establsh the default route.

Is there any method of getting around this? Potentially relevant
information follows:

# sh /etc/netstart
DHCPDISCOVER on sis1 to 255.255.255.255 port 67 interval 3
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
DHCPOFFER from 10.1.1.1
DHCPREQUEST on sis1 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
DHCPACK from 10.1.1.1
bound to 58.104.125.124 -- renewal in 30 seconds.
Nov 10 09:58:01 wendolene dhclient[17932]: connection closed
Nov 10 09:58:01 wendolene dhclient[17932]: exiting.
# netstat -anrf inet
Routing tables

Internet:
DestinationGatewayFlags Refs UseMtu  Interface
10/8   link#2 UC  00  -   sis1
10.1.1.15  127.0.0.1  UGHS00  33224   lo0
58.104.125/24  link#2 UC  00  -   sis1
58.104.125.124 127.0.0.1  UGHS00  33224   lo0
127/8  127.0.0.1  UGRS00  33224   lo0
127.0.0.1  127.0.0.1  UH  30  33224   lo0
192.168.0/24   link#1 UC  00  -   sis0
224/4  127.0.0.1  URS 00  33224   lo0

Any assistance will be much appreciated.

Regards,
Damon



Re: openbsd + external sensor (t°, humidity, ...)

2006-11-09 Thread Eric Huiban

Hi

i'm currently looking for solution to monitor external environment from
an openbsd server.

 



I'm currently trying to play such game... yes playing... not working...
:-) 


has anyone advise to find cheap sensors (temperature, but also humdity,
pressure, light, electricity before UPS, ...) which are known to  work
with openbsd ?
 



After a long time of lurking and looking through solutions like USB,
Ethernet, serial busses, home produced, commercial ones, etc : i ended to
buy a scraped terminal server allowing me to connect up to 40
traditionnal 9600 serial devices as well as 57600 bps modems (slip and ppp
can be provided by the termserver). It's dirt cheap when gaming with
sensors and actuators, and wiring is build around standard ethernet cables
with RJ45. But ethernet and IP compatibility with OpenBSD is total, and i
can totaly rely on the code already wrote by people hanging around this
list.

I buy sensors part by part when needed (through local retailers or
radiospares catalogue for example) and i glue that to the termserver using
8 to 40 pins Atmel AVR 8 bits RISC controlers (please have a look a
OpenBSD packages and ports when looking for dev. environment) and regular
MAX232 line driver. I don't need long distance connection but adapting the 
link to optical, fiber-optic, or differential (R422/485) driver is quite simple.
The controler allows me to easily perform all acquisitions, calibrations, 
and conversions from electricaly sensed values to physical values.


As regard cheap sensors, i prefer the old Philips H1 (capacitive gold film
sensor still available from some retailers) for relative humidity
(resistive Honeywell sensors seems also good to me). I simply prefer LM35
when dealing with temperature, and PT100 in more strict environment (i.e.
the area around my vegetables during all my shamefull fridge experiments).
Allegro hall effect sensors were easy to use as well as cheap. You can
find all the cheap sensors you want simply using a little bit of
imagination... and sometimes just by diverting the normal use of what you
already own within your spare parts. i.e. measuring the current needed to 
immobilize a free moving hammer found in some electro-mecanical door-bell 
may allow you to detect  quantify some movement or vibration. This kind of 
sensor may be really cheap and efficient. Modems are also great thing to recycle
from junk yard as monitor for power supply before UPS. Power availability can be 
sensed using an old 2400bps modem... there is an OK answer to any AT question 
while power is here !


If you're projecting to monitor water quality... common available sensors
(like pH , resistivity, etc) will lead you to more funky interfacing...
far away out of the scope of this list. The cost will be higher whatever
you choose... homebrew sensors or commercial ones.

All of the sensors i listed just above can be handled using counters
within the local controler. There is no need of bulky and costly Analog to
Digital Converter. In the worst cases i sometimes use ADC, but one of my 
favorite workaround is to use LM311 chip (Voltage to Frequency) or the 
traditionnal 555 in one of its low consumption latest design when i try 
to alleviate the headache about the connection to the controler. Then handling

a 16 bits counter is a simple joke for anybody.

On OpenBSD side... anything you can compile or script which allows you to
communicate over telnet can be used. There is no restriction here. I still
have no ppp/slip/IP stack for the controlers i use... i can't speak about
networking theses sensors. Someone on this list may be able to speak about
this ? 


And... Hu... As regard the stack of junk code i am able to
introduce inside my controlers during all my experiments... i have a non
disclosure agreement with myself just to avoid any shamefull situation for
me.  ;-)  However ATMEL datasheets and application notes are clear enough
for any apprentice.

All of this costs me more time than money during my experiments and
it's one of the criteria of my own game. One other criteria is reliability
because i don't like to repair failed parts i already built. And this
solution also fullfills it. 


Regards,
Eric.
p.s. i know that it is not a develloper answer... just a basic user
answer... but no flame please :o)



md5 -c digest comparison is case-sensitive

2006-11-09 Thread Matthew Clarke
Hi.

[ OpenBSD/i386-current as of a couple of days ago ]

Is there a good reason why md5 -c should say FAILED when the digest in
the checklist file and the digest calculated by md5 differ only in letter
case?  I can't think of any.

e.g.:
--

% ls -l Tortoise*
-rw-r--r--  1 clamat  clamat   78 Nov  9 16:43 
TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.md5
-rw-r--r--  1 clamat  clamat  9134080 Nov  9 16:26 
TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi
% cat TortoiseSVN*.md5
916C103C14664B784A54692CF5E00CA2  TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi
% md5 -c TortoiseSVN*.msi
MD5 (TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi) = 
916c103c14664b784a54692cf5e00ca2
% md5 -c TortoiseSVN*.md5
(MD5) TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi: FAILED

--

If not, here's a trivial patch:

Index: bin/md5/md5.c
===
RCS file: /cvs/src/bin/md5/md5.c,v
retrieving revision 1.35
diff -u -r1.35 md5.c
--- bin/md5/md5.c   15 Mar 2006 03:15:07 -  1.35
+++ bin/md5/md5.c   10 Nov 2006 00:42:43 -
@@ -486,7 +486,7 @@
close(fd);
(void)hf-end(context, digest);
 
-   if (strcmp(checksum, digest) == 0)
+   if (strcasecmp(checksum, digest) == 0)
(void)printf((%s) %s: OK\n, algorithm, filename);
else {
(void)printf((%s) %s: FAILED\n, algorithm, filename);

Matt.
-- 
With your own code to haunt you, who needs users?
-- Maarten Wiltink



Re: openbsd + external sensor (t°, humidity, ...)

2006-11-09 Thread Constantine A. Murenin

On 09/11/06, Eric Huiban [EMAIL PROTECTED] wrote:

 has anyone advise to find cheap sensors (temperature, but also humdity,
 pressure, light, electricity before UPS, ...) which are known to  work
 with openbsd ?

[...]

Modems are also great thing to recycle
from junk yard as monitor for power supply before UPS. Power availability can be
sensed using an old 2400bps modem... there is an OK answer to any AT question
while power is here !


This should be nominated for the best-recycling-advice-of-the-year
award, for innovation! :)



problems running getty on tty00

2006-11-09 Thread Robert Urban
Hi Folks,

I'm trying to configure the serial port (COM1) on a ProLiant DL380-G2
for logins running OpenBSD 3.9.

In /etc/ttys:
tty00   /usr/libexec/getty std.9600   vt220   on  secure

# dmesg | grep com
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo

I've HUP'ed init, and getty is running:
# ps ax|grep tty00
 7255 ??  I   0:00.01 /usr/libexec/getty std.9600 tty00

speed is correct:
# stty -a -f /dev/tty00
speed 9600 baud; 0 rows; 0 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc -xcase
iflags: -istrip icrnl -inlcr -igncr -iuclc ixon -ixoff ixany imaxbel
-ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -onocr -onlret -olcuc oxtabs -onoeot
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef;
eol2 = undef; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = undef;
stop = ^S; susp = ^Z; time = 0; werase = ^W;


Now the troubles...  I hooked up my trusty HP200LX (80186-based PDA), which
has a 9-pin serial cable, supports, xon/xoff, rtscts, or no flow control.
This PDA works just fine; I have used it for years on other PC serial ports.
I configured it not to do flow control.  When I hit RETURN, or any other
character, I just saw my characters echoed.  I disconnected it, and tested
it on another PC running linux... worked fine.  Later, I went back and
connected it to the DL380 again, hit RETURN, and immediately got a login
prompt.  I could log in, perform commands, etc.  Then I logged out.  After
that, it was back to the first behaviour.  Everything gets echoed, and no
login prompt comes.  I tried sending breaks (not sure if short or long), to
no avail.  It almost seems as if something else is competing for input from
tty00, and sometimes getty gets it, sometimes Mr. X.

I can kill getty, which will be restarted, but it doesn't help.

Any ideas?

Rob Urban



Re: 4.0 Lockup [Was: 3.9 Lockup]

2006-11-09 Thread Melameth, Daniel D.
STeve Andre' wrote:
 On Tuesday 07 November 2006 22:20, Melameth, Daniel D. wrote:
  STeve Andre' wrote:
   On Monday 06 November 2006 22:10, Melameth, Daniel D. wrote:
I'm having the same issue with 4.0 -stable--well, a bastardized
copy of -stable that also contains ral, cardbus and related
changes from -current.  I've used more than one fxp card as
well as more than one ral card and the issue stays the
same--fxp0: warnings and timeouts and, eventually under load or
after a few days, the box locks up with no apparent panic and
ddb.console=1 provides no help.  If I recall correctly, the
issue also exists if I replace fxp with xl. It would appear so
long as there are two Cardbus cards in this box, this issue
occurs--as fxp plus wi is rock solid. 

How do I troubleshoot this further?
   
   [snip]
   
   Ugh.  This brings back some memories.  I'm pretty sure it was a
   sat pro that I had some cardbus problems with some time ago.  I
   believe I did a bios update, which changed things; better but not
   perfect.  So try that, and look in the bios settings for anything
   that can tweak the cardbus slots.  Given my experiences with
   this, I'm thinking there is a good chance that your problem lies
   in the laptop itself. Good luck.
  
  Yea, I figured as much/was afraid of that.  Thanks for sharing.
 
 Thinking on this a little more, you might, just might see a difference
 between booting up with the cards, and inserting the cards after
 booting, or some combination of one card in and one card inserted
 post boot.  I dimly remember doing that and wondering what was
 going on, so that might affect your results.  Also change the speed
 of the system if you can to see what that does.  I think you are
 likely out of luck here, but something truly screwy might help you.
 
 Ah, and you mention backporting some of the ral code--have you tried
 running -current on it?  Can't hurt...

I'm not interested in having it work if it requires an eclectic
combination of add/removing hardware after booting or whatnot.  What do
you mean by changing the speed of the system?  I can try running
-current, but I doubt there'll be much change from my -stable--though,
yea, it can't hurt.  At the end of the day, I might just get another
laptop with on-board Ethernet instead and, therefore, drop this routing
over Cardbus bus stuff.

Thanks,
D



Re: ADSL half-bridge mode Assign a default gateway not on the same subnet as my public IP

2006-11-09 Thread Antoine Jacoutot

On Fri, 10 Nov 2006, Damon McMahon wrote:

I'm trying to get my Netgear DG-632 to operate as a half-bridge to my
OpenBSD router.

Unfortunately the public IP address my ISP is dynamically assigning
(58.104.125.124) is not on the same subnet as their default gateway
(211.31.137.132), hence I suspect dhclient(8) is baulking when
attempting to establsh the default route.

Is there any method of getting around this? Potentially relevant
information follows:


Allright, I have the same setup except that I have a fixed @IP.

$ cat /etc/hostname.rl1
inet ip.ip.ip.ip 255.255.255.255 NONE
!route add -host ng.ng.ng.ng -netmask 255.255.255.0 -interface  gw.gw.gw.gw 
-cloning

ip.ip.ip.ip = public @ip (your dhcp @ip)
ng.ng.ng.ng = the NetGear @ip (ex. 192.168.0.1)
gw.gw.gw.gw = your ISP gateway (the one that's not on the same subnet)

Maybe you could try hacking dhclient so that the correct argumebts are 
passed to ifconfig.


Cheers!

--
Antoine



OpenBSD 4.0 sparc64

2006-11-09 Thread Ikmal Ahmad

Hi all,

Based on http://www.openbsd.org.my/sparc64.html, seem that OpenBSD can
install on Sun Blade 100/150 machine.  I have this problem when do
disk installation on Blade 100.  Below is the error.

ok boot disk /bsd
Boot device: /[EMAIL PROTECTED],0/[EMAIL PROTECTED]/[EMAIL PROTECTED],0  File 
and args: /bsd
   ERROR: Last Trap: Fast Data Access MMU Miss

Error -256
   ERROR: Last Trap: Fast Data Access MMU Miss

Error -256
ok

I have upgrade OBP to the latest  version.  Here the OBP info:

Sun Blade 100 (UltraSPARC-IIe), Keyboard Present
Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.17.1, 256 MB memory installed,

Any idea how to solve this problem.

--
Thanks  Regards,
Ikmal aka EvoIVGSR

http://www.leakage.org/
http://root.justdied.com/mylife/
http://www.openbsd.org.my/
http://mirrors.mybsd.org.my/



Re: openbsd + external sensor (t°, humidity, ...)

2006-11-09 Thread Julien TOUCHE
Eric Huiban wrote on 10/11/2006 01:10:
 After a long time of lurking and looking through solutions like USB,
 Ethernet, serial busses, home produced, commercial ones, etc : i ended to
 buy a scraped terminal server allowing me to connect up to 40
 traditionnal 9600 serial devices as well as 57600 bps modems (slip and ppp
 can be provided by the termserver). It's dirt cheap when gaming with
 sensors and actuators, and wiring is build around standard ethernet cables
 with RJ45. But ethernet and IP compatibility with OpenBSD is total, and i
 can totaly rely on the code already wrote by people hanging around this
 list.

could you precise some references to buy similar one ?


else thanks a lot for your input

Regards

Julien