Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Otto Moerbeek
On Fri, Nov 09, 2007 at 08:40:15PM +0200, Enache Adrian wrote:

 On Fri, Nov 09, 2007 at 11:03:31AM +0100, Otto Moerbeek wrote:

  So your problem seems to be that rsync -S is inefficient to the point
  where it is not useable.  I do not use rsync a lot, so I do not know
  if there's a solution to that problem. It does seem strange that a
  feature to solve a problem actually make the problem worse. 
 
 Anything is inefficient in that case.
 
 Just create a huge dummy file:
 
 $ dd if=/dev/null seek=1m bs=1m of=file
 
 Then copy it (with cp, or any sparse-file aware program) to another
 filesystem. Watch how much time and power it takes to copy nothing
 from one place to another.
 
 Any way to obtain a 'map' of the file that tell you exactly where the
 written sectors are would make for a BIG improvement.
 
 You can't do that on OpenBSD without raw low-level fs hacks and
 reinventing half of dump(8) and fsck(8).
 
 Adi

Your example just shows copying big files takes long. The point being,
if the file was not sparse, it would take at least the same time.
Blaming sparseness for the long cp time is not fair. 

-Otto



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Richard Toohey

On 10/11/2007, at 10:05 AM, Daniel Ouellet wrote:


Otto Moerbeek wrote:
stat -s gives the raw info in one go. Some shell script hacking  
should

make it easy to detect sparse files.


Thanks Otto for the suggestion. That might help until it can be  
address for good. It would help speed up some of it. (;




This looked interesting (curiosity killed the cat?), so I started  
looking at sparse files (not heard of them before.)


Is this a sparse file?

# dd if=/dev/zero of=sparsefile bs=1024 seek=10240 count=0
0+0 records in
0+0 records out
0 bytes transferred in 0.000 secs (0 bytes/sec)
# ls -lh
[--cut--]
-rw-r--r--  1 root  wheel  10.0M Nov 11 08:43 sparsefile
# du -hsc sparsefile
32.0K   sparsefile
32.0K   total
# du sparsefile
64  sparsefile
# stat -s sparsefile
st_dev=7 st_ino=51969 st_mode=0100644 st_nlink=1 st_uid=0 st_gid=0  
st_rdev=0 st_size=10485760 st_atime=1194723829 st_mtime=1194723829  
st_ctime=1194723829 st_blksize=16384 st_blocks=64 st_flags=0


So because blocks allocated = 64, and block size is (usually) 512  
bytes = file is 32K (but ls and others will report 10Mb size.)


So if you scanned whatever director(y|ies) you are interested in,

If st_size  (st_blocks * 512) Then
*** this may be a sparse file?

(BUT - blocksize of 16384 is reported so I must be missing something?)

A stab at it in Perl (lifted from Perl Cookbook):

use strict;
use warnings;
use File::Find;
sub process_file {
my $f=$File::Find::name;
(my $dev,my $ino,my $mode,my $nlink,my $uid,my $gid,my  
$rdev,my $size,my $atime,my $mtime,my $ctime,my $blksize,my $blocks) 
=sat($f);

if ($blocks * 512  $size) {
print \t$f = SZ: $size BLSZ: $blksize BLKS: $blocks 
\n;

print \t . -s $f;
print \n;
}
}
find(\process_file,(/home/sparse-files));

The output is:

# perl check.pl
/home/sparse-files/sparsefile = SZ: 10485760 BLSZ: 16384  
BLKS: 64

10485760

Thanks.



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Otto Moerbeek
On Fri, Nov 09, 2007 at 03:47:10PM -0500, Daniel Ouellet wrote:

 Ted Unangst wrote:
 On 11/9/07, Daniel Ouellet [EMAIL PROTECTED] wrote:
 Just for example, a source file that is sparse badly, don't really have
 allocated disk block yet, but when copy over, via scp, or rsync will
 actually use that space on the destination servers. All the servers are
 identical (or suppose to be anyway) but what is happening is the copy of
 them are running out of space at time in the copy process. Like when it
 is copying them, it may easy use twice the amount of space in the
 process and sadly filling up the destinations then then the sync process
 stop making the distribution of the load unusable. I need to increase
 the capacity yes, except that it will take me times to do so.
 
 so what are you going to do when you find these sparse files?
 
 So far. When I find them. Not all of them, but huge waisting space one. 
 I delete them and replace them. with the original one, or even with the 

I am confused by what you say. A sparse file does NOT waste space, it
REDUCES disk usage, compared to a non-sparse (dense?) file with the
same contents. 

 one copy using rsync -S back to the original reduce it's size in 1/2 and 

If the size is reduced, it is not the same file. Please be more
accurate in your description. A file's size is not the same as it's
disk usage. 

 more at times. So, yes, very inefficiently, but manageable anyway. It's 
 a plaster for now if you want. Don't get me wrong. Sparse files makes no 
 problem what so ever when they stay on the same systems. It's when you 
 need to move them around servers, and specially across Internet 
 connected locations and keep them in sync as much as possible in as 
 shorter time as possible that it becomes unmanageable. That's really the 
 issue at hands. Not that sparse files are bad in any ways. Keeping them 
 in sync across multiples system is however.

You cannot blame sparse files for that. If the same file would not be
sparse, your problem would be at least as big.

-Otto


 
 I was looking if there was a more intelligent ways to do it. (; Like 
 finding them about some level of sparse, like let say 25% and then 
 compact them at the source to be none sparse again, or something 
 similar. Doesn't need to do every single one, even if that might be a 
 good thing in special cases, not all obviously.
 
 The problem is that some customers end up running out of space and I 
 really didn't know, plus the huge factor of waisted bandwidth and 
 filling up their connections transferring empty files if you like and 
 taking much longer in sync time that other wise it wouldn't if you sync 
 as is.
 
 Still is an interesting problem after I found out what it really was.
 
 I hope it explained the issue somewhat better.
 
 Thanks for the feedback never the less.
 
 Daniel



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Richard Toohey

On 10/11/2007, at 9:11 PM, Richard Toohey wrote:

(my $dev,my $ino,my $mode,my $nlink,my $uid,my $gid,my  
$rdev,my $size,my $atime,my $mtime,my $ctime,my $blksize,my $blocks) 
=sat($f);


Oops - should end with:

=stat($f);

not

=sat($f);



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Otto Moerbeek
On Sat, Nov 10, 2007 at 09:11:27PM +1300, Richard Toohey wrote:
 On 10/11/2007, at 10:05 AM, Daniel Ouellet wrote:
 
 Otto Moerbeek wrote:
 stat -s gives the raw info in one go. Some shell script hacking  
 should
 make it easy to detect sparse files.
 
 Thanks Otto for the suggestion. That might help until it can be  
 address for good. It would help speed up some of it. (;
 
 
 This looked interesting (curiosity killed the cat?), so I started  
 looking at sparse files (not heard of them before.)
 
 Is this a sparse file?

yes.

 
 # dd if=/dev/zero of=sparsefile bs=1024 seek=10240 count=0
 0+0 records in
 0+0 records out
 0 bytes transferred in 0.000 secs (0 bytes/sec)
 # ls -lh
 [--cut--]
 -rw-r--r--  1 root  wheel  10.0M Nov 11 08:43 sparsefile
 # du -hsc sparsefile
 32.0K   sparsefile
 32.0K   total
 # du sparsefile
 64  sparsefile
 # stat -s sparsefile
 st_dev=7 st_ino=51969 st_mode=0100644 st_nlink=1 st_uid=0 st_gid=0  
 st_rdev=0 st_size=10485760 st_atime=1194723829 st_mtime=1194723829  
 st_ctime=1194723829 st_blksize=16384 st_blocks=64 st_flags=0
 
 So because blocks allocated = 64, and block size is (usually) 512  
 bytes = file is 32K (but ls and others will report 10Mb size.)
 
 So if you scanned whatever director(y|ies) you are interested in,
 
   If st_size  (st_blocks * 512) Then
   *** this may be a sparse file?
 
 (BUT - blocksize of 16384 is reported so I must be missing something?)

yeah, look at stat(2):

 int64_tst_blocks;  /* blocks allocated for file */
 u_int32_t  st_blksize; /* optimal file sys I/O ops blocksize */

actually st_blocks's unit is disk sectors, to be precise.

I don't read perl, so I cannot comment on the script below.

-Otto
 
 A stab at it in Perl (lifted from Perl Cookbook):
 
 use strict;
 use warnings;
 use File::Find;
 sub process_file {
 my $f=$File::Find::name;
 (my $dev,my $ino,my $mode,my $nlink,my $uid,my $gid,my  
 $rdev,my $size,my $atime,my $mtime,my $ctime,my $blksize,my $blocks) 
 =sat($f);
 if ($blocks * 512  $size) {
 print \t$f = SZ: $size BLSZ: $blksize BLKS: $blocks 
 \n;
 print \t . -s $f;
 print \n;
 }
 }
 find(\process_file,(/home/sparse-files));
 
 The output is:
 
 # perl check.pl
 /home/sparse-files/sparsefile = SZ: 10485760 BLSZ: 16384  
 BLKS: 64
 10485760
 
 Thanks.



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Richard Toohey

On 10/11/2007, at 9:32 PM, Otto Moerbeek wrote:


yeah, look at stat(2):

 int64_tst_blocks;  /* blocks allocated for file */
 u_int32_t  st_blksize; /* optimal file sys I/O ops blocksize */

actually st_blocks's unit is disk sectors, to be precise.

I don't read perl, so I cannot comment on the script below.

-Otto


Thanks for the feedback.

I tried in C, but could not get past getting 0 for st_blocks every  
time (will be my C, but I can't see (C?) what it is yet ...)


# man -s 2 stat:
[cut]
 struct timespec st_ctimespec;  /* time of last file status  
change */

 off_t  st_size;   /* file size, in bytes */
 int64_tst_blocks; /* blocks allocated for file */
[cut]

check.c
---

#include sys/stat.h

int main(void) {
struct stat stat_stuff;
int result;
result=stat(/home/sparse-files/sparsefile,stat_stuff);
printf(%d %d\n,stat_stuff.st_size,stat_stuff.st_blocks);
}

# cc check.c -o check
# ./check
10485760 0



google team and the DIY way of life

2007-11-10 Thread xavier brinon
from the Official Google Blog

Posted by Reza Behforooz, Software Engineer

In my first month at Google, I complained to a friend on the Gmail
team about a couple of small things that I disliked about Gmail. I
expected him to point me to the bug database. But he told me to fix it
myself, pointing me to a document on how to bring up the Gmail
development environment on my workstation. The next day my code was
reviewed by Gmail engineers, and then I submitted it. A week later, my
change was live. I was amazed by the freedom to work across teams, the
ability to check in code to another project, the trust in engineers to
work on the right thing, and the excitement and speed of getting
things done for our users. Engineers across our offices (and across
projects) have access to the same code; I didn't have to ask for
anyone's permission to work on this.

I know, it's obvious that it's works if you share your code and let
others submit their diffs.
Just a reminder... See Google ? they shut up and code !



[EMAIL PROTECTED]: Re: identifying sparse files and get ride of them trick available?]

2007-11-10 Thread Otto Moerbeek
Forgat to send to the list.

-Otto

- Forwarded message from Otto Moerbeek [EMAIL PROTECTED] -

Date: Sat, 10 Nov 2007 10:36:20 +0100
From: Otto Moerbeek [EMAIL PROTECTED]
To: Richard Toohey [EMAIL PROTECTED]
Subject: Re: identifying sparse files and get ride of them trick available?

On Sat, Nov 10, 2007 at 09:44:46PM +1300, Richard Toohey wrote:
 
 On 10/11/2007, at 9:32 PM, Otto Moerbeek wrote:
 
 yeah, look at stat(2):
 
  int64_tst_blocks;  /* blocks allocated for file */
  u_int32_t  st_blksize; /* optimal file sys I/O ops blocksize */
 
 actually st_blocks's unit is disk sectors, to be precise.
 
 I don't read perl, so I cannot comment on the script below.
 
  -Otto
 
 Thanks for the feedback.
 
 I tried in C, but could not get past getting 0 for st_blocks every  
 time (will be my C, but I can't see (C?) what it is yet ...)

Wrong format specifier. -Wall is your friend.

-Otto

 
 # man -s 2 stat:
 [cut]
  struct timespec st_ctimespec;  /* time of last file status  
 change */
  off_t  st_size;   /* file size, in bytes */
  int64_tst_blocks; /* blocks allocated for file */
 [cut]
 
 check.c
 ---
 
 #include sys/stat.h
 
 int main(void) {
 struct stat stat_stuff;
 int result;
 result=stat(/home/sparse-files/sparsefile,stat_stuff);
 printf(%d %d\n,stat_stuff.st_size,stat_stuff.st_blocks);
 }
 
 # cc check.c -o check
 # ./check
 10485760 0

- End forwarded message -



Re: Powered by obsd stickers and other stuff

2007-11-10 Thread Iñigo Tejedor Arrondo
El sC!b, 10-11-2007 a las 03:04 -0300, Limaunion escribiC3:
 IC1igo Tejedor Arrondo wrote:
  El sC!b, 10-11-2007 a las 01:18 +0100, IC1igo Tejedor Arrondo escribiC3:
  
  oops
  
   The sources (5.3Mm at 33k of upload):
   http://inigo.homeunix.net/art.tgz  
  
  It is:
   http://inigo.homeunix.net/art/art.tgz  
 
 No luck here:
 
 Not Found
 
 The requested URL /art/art.tgz was not found on this server.
 
 Additionally, a 404 Not Found error was encountered while trying to use 
 an ErrorDocument to handle the request.

Excuse me, I realized this too late, a third post post seems to be
excessive. But Under the guise of using coralcdn (cache downloads and
has more bandwidth, only adding nyud.net to the url, thanks Dave) I send
it again, to avoid lot of 404 on my logs. Anyways the url dirs are
browseable:

http://inigo.homeunix.net.nyud.net/files/art/art.tgz

I hope you enjoy the pictures. Greetings.
Inigo



Problems with authpf

2007-11-10 Thread Johan Linner

Hi,

Just installed a new firewall using flashdist and 4.2.
When trying to authenticate by authpf we get the following error:
pfctl: /dev/fd/4: Permission denied
Unable to modify filters

ls -la /dev/fd/4
crw-rw-rw-  1 root  wheel   22,   4 Nov  6 17:03 /dev/fd/4

Don't now if this is a related problem, but all users but root get the 
following error on login:


ksh: No controlling tty (open /dev/tty: Permission denied)
ksh: warning: won't have full job control

ls -la /dev/tty
crw-rw-rw-  1 root  wheel1,   0 Nov  9 23:08 /dev/tty

I am stuck, the only references i find on Google are FreeBSD and 
mount_fdesc, mount -t fdesc fdesc /dev/fd


Any help or suggestions would be much appreciated...

/Johan Linnir



[solved] Re: problem installing some packages on 4.2

2007-11-10 Thread Ivo Chutkin

Hello Juan-Philippe,
Thank you for opening my eyes :-)))
I installed xbase42 and everything goes nice and smooth.
Thanks a lot.
Regards,
Ivo

Jean-Philippe Luiggi wrote:

Hello Ivo,

Did you check  : http://openbsd.org/faq/upgrade42.html because libexpat 
is now shipped with X (until 4.3).


Just install xbase42  (if you need to build ports, you may need xshare42).*

*Best regards,

Jean-philippe.

Ivo Chutkin a icrit :

Hello all,
I have problem installing packages via ftp on a new 4.2 installation.

# pkg_add -v 
ftp://ftp.stacken.kth.se/pub/OpenBSD/4.2/packages/i386/mc-4.6.1p1.tgz

Can't install gettext-0.14.6p0: lib not found expat.8.0




__ NOD32 2650 (20071109) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com




Re: Powered by obsd stickers and other stuff

2007-11-10 Thread Jona Joachim
On Sat, 10 Nov 2007 01:18:42 +0100, Iqigo Tejedor Arrondo wrote:

 Hello all
 
  Some art, at slw spanish foul asymetric connection. The sources are
 xcf, at 1600x1200.
 
  Clarify that I am not a designer :)
 
  I have make the typical Powered by stickers:
 http://inigo.homeunix.net/files/art/powered_by_puffy_black.png
 http://inigo.homeunix.net/files/art/powered_by_puffy_grey.png
 
  I hope that those stickers replace the vista compatible of the
 developers laptops :)
 
  There are some backgrounds:
 
  A blue rounded gradient with puffy:
 http://inigo.homeunix.net/files/art/background_blue_puff_1024x768.png
 http://inigo.homeunix.net/files/art/background_blue_puffy_text_1024x768.png

At first I thought you just copied that one:
http://www.openbsd-france.org/reposit/wallpapers/openbsd_yellow.png
and I wanted to accuse you of plagiarism but then I noticed there are some
differences between the two pictures :)

The pictures are quite nice. I especially like the old picture filter
one. The half wire / half red beastie looks kinda strange :)


Best regards,
Jona

-- 
I am chaos. I am the substance from which your artists and scientists
build rhythms. I am the spirit with which your children and clowns
laugh in happy anarchy. I am chaos. I am alive, and tell you that you
are free. Eris, Goddess Of Chaos, Discord  Confusion



CVS server out of memory on anga.funkfeuer.at

2007-11-10 Thread Paulo Rodriguez
Hello misc,

Just wanted to notify of the following. During checkout of -current code for 
Xenocara on anga, the following happens:

...
CVS server: updating xenocara/font/misc-misc
U xenocara/font/misc-misc/10x20.bdf
CVS [server aborted]: out of memory; can not allocate 2937909 bytes

If I understood correctly this is due to the datasize parameters on anga, not a 
local client issue on my side. Command line given was nothing funky:

#cvs -d [EMAIL PROTECTED]:/cvs checkout -P xenocara

Checkout from skyrock.fr worked fine, so for me everything is ok now.
Kind regards,

P



Re: Solved - Problems with authpf

2007-11-10 Thread Johan Linner

Johan Linner skrev:

Hi,

Just installed a new firewall using flashdist and 4.2.
When trying to authenticate by authpf we get the following error:
pfctl: /dev/fd/4: Permission denied
Unable to modify filters

ls -la /dev/fd/4
crw-rw-rw-  1 root  wheel   22,   4 Nov  6 17:03 /dev/fd/4

Don't now if this is a related problem, but all users but root get the 
following error on login:


ksh: No controlling tty (open /dev/tty: Permission denied)
ksh: warning: won't have full job control

ls -la /dev/tty
crw-rw-rw-  1 root  wheel1,   0 Nov  9 23:08 /dev/tty

I am stuck, the only references i find on Google are FreeBSD and 
mount_fdesc, mount -t fdesc fdesc /dev/fd


Any help or suggestions would be much appreciated...

/Johan Linnir



Wrong permissions on /dev, not sure if it is my misstake or a problem 
with the new release of flashdist:


chmod 755 /dev solved all the problems

/Johan



Re: google team and the DIY way of life

2007-11-10 Thread Karthik Kumar
Not again!

On Nov 10, 2007 3:01 PM, xavier brinon [EMAIL PROTECTED] wrote:

 from the Official Google Blog

 Posted by Reza Behforooz, Software Engineer

 In my first month at Google, I complained to a friend on the Gmail
 team about a couple of small things that I disliked about Gmail. I
 expected him to point me to the bug database. But he told me to fix it
 myself, pointing me to a document on how to bring up the Gmail
 development environment on my workstation. The next day my code was
 reviewed by Gmail engineers, and then I submitted it. A week later, my
 change was live. I was amazed by the freedom to work across teams, the
 ability to check in code to another project, the trust in engineers to
 work on the right thing, and the excitement and speed of getting
 things done for our users. Engineers across our offices (and across
 projects) have access to the same code; I didn't have to ask for
 anyone's permission to work on this.

 I know, it's obvious that it's works if you share your code and let
 others submit their diffs.
 Just a reminder... See Google ? they shut up and code !




-- 
Karthik
http://guilt.bafsoft.net



Re: CVS server out of memory on anga.funkfeuer.at

2007-11-10 Thread Martin Reindl
Paulo Rodriguez [EMAIL PROTECTED] wrote:

 Hello misc,
 
 Just wanted to notify of the following. During checkout of -current code for 
 Xenocara on anga, the following happens:
 
 ...
 CVS server: updating xenocara/font/misc-misc
 U xenocara/font/misc-misc/10x20.bdf
 CVS [server aborted]: out of memory; can not allocate 2937909 bytes
 
 If I understood correctly this is due to the datasize parameters on anga, not 
 a local client issue on my side. Command line given was nothing funky:
 
 #cvs -d [EMAIL PROTECTED]:/cvs checkout -P xenocara
 
 Checkout from skyrock.fr worked fine, so for me everything is ok now.
 Kind regards,
 
 P

IIRC that's a bug in GNU cvs on 64bit architectures. I thought it was
worked around in xenocara.

Well, I will have to move the machine back to i386 again, sigh.



Re: Printing with apsfilter

2007-11-10 Thread Douglas A. Tutty
On Sat, Nov 10, 2007 at 04:30:51AM +, Jacob Meuser wrote:
 On Fri, Nov 09, 2007 at 07:15:11PM -0700, Predrag Punosevac wrote:
 
  Any strong opinion on LPD vs LPRng vs CUPS issue? I am not a 
  professional system administrator and there is way too much Linux and 
  CUPS around me for my taste. I want to hear from the serious people what 
  are the benefits of one system over the another.
 
 lpd - part of the base system.  lightweight and very reliable.
 
 CUPS - relatively easy set up and ability to tweak options on the
fly.
 
 lprng - never used it.

On OpenBSD, I've never used anything but lpd with a text-mode dot-matrix
printer (no print filters).

On Debian, I've used lpd (they use OpenBSD's), LPRng, but never CUPS.

On Debian, you can use CUPS' foomatic-printfilters to get CUPS'
printfilters without installing the whole CUPS infrastructure (to save
disk space).  I've used foomatic-printfilters with LPRng and straight
lpd.  I don't like the CUPS way, it seems like overkill to me.  Then
again, if your printer driver isn't in the standard gs then you may need
a different gs.  On debian, where everything is broken up in packages,
you can get the gs-esp from CUPS and use it as a drop-in replacement for
gs-gpl with lpd/apsfilter.

It really is a piece-together thing unless you bow to CUPS and take the
whole lot.  

The difference between lpd and LPRng is one of access control.  Having
the fine-grained access control comes at the price of more difficult
setup (more docs to read).  I also haven't seen any updates to it for a
few years so I wonder about any security support.

Once you get your printer setup to take a ps file, it will be able to
take anything else once its converted to ps.  Most browsers, for
example, do this.

Doug.



dhcpd's options.c in a weird shape

2007-11-10 Thread Vincent GROSS
Hi folks,

there seem to be a lil' problem with /usr/src/usr/sbin/dhcpd/options.c.
the following patch highlights two weirds constructs inside the file,
one in the header, the other one in the MMS checking code.

--- /usr/src/usr.sbin/dhcpd/options.c   Sat Nov 10 04:53:05 2007
+++ ./options.c Sat Nov 10 15:17:50 2007
@@ -1,8 +1,4 @@
- options.c
-/* $OpenBSD: options.c,v 1.8.4.1 2007/10/10 06:10:27 ckuethe Exp $ */
-===
 /* $OpenBSD: options.c,v 1.19 2007/10/29 16:51:02 krw Exp $*/
- 1.19

 /* DHCP options parsing and reassembly. */

@@ -279,13 +275,9 @@
sizeof(u_int16_t))) {
mms = getUShort(
inpacket-options[DHO_DHCP_MAX_MESSAGE_SIZE].data);
- options.c
if (mms  576)
mms = 576;  /* mms must be = minimum IP MTU */
}
-===
-   }
- 1.19

if (mms) {
if (mms  576)

this is the resulting diff of the changes I made, IT IS NOT AN
OFFICIAL PATCH, USE IT AT YOUR OWN RISKS !

Cheers,

-- 
Vincent GROSS
GUIs normally make it simple to accomplish simple actions and
impossible to accomplish complex actions. --Doug Gwyn (22/Jun/91 in
comp.unix.wizards)



Re: dhcpd's options.c in a weird shape

2007-11-10 Thread Han Boetes
Vincent GROSS wrote:

 there seem to be a lil' problem with
 /usr/src/usr/sbin/dhcpd/options.c.  the following patch
 highlights two weirds constructs inside the file, one in the
 header, the other one in the MMS checking code.

 --- /usr/src/usr.sbin/dhcpd/options.c Sat Nov 10 04:53:05 2007
 +++ ./options.c   Sat Nov 10 15:17:50 2007
 @@ -1,8 +1,4 @@
 - options.c
 -/*   $OpenBSD: options.c,v 1.8.4.1 2007/10/10 06:10:27 ckuethe Exp $ */
 -===
  /*   $OpenBSD: options.c,v 1.19 2007/10/29 16:51:02 krw Exp $*/
 -   1.19

That's a conflict, and it's caused by you, and only exists in your
version. :-)

Just kill the file and check it out again.



# Han



Re: dhcpd's options.c in a weird shape

2007-11-10 Thread Kenneth R Westerback
On Sat, Nov 10, 2007 at 03:31:03PM +0100, Vincent GROSS wrote:
 Hi folks,
 
 there seem to be a lil' problem with /usr/src/usr/sbin/dhcpd/options.c.
 the following patch highlights two weirds constructs inside the file,
 one in the header, the other one in the MMS checking code.
 
 --- /usr/src/usr.sbin/dhcpd/options.c Sat Nov 10 04:53:05 2007
 +++ ./options.c   Sat Nov 10 15:17:50 2007
 @@ -1,8 +1,4 @@
 - options.c
 -/*   $OpenBSD: options.c,v 1.8.4.1 2007/10/10 06:10:27 ckuethe Exp $ */
 -===
  /*   $OpenBSD: options.c,v 1.19 2007/10/29 16:51:02 krw Exp $*/
 - 1.19
 
  /* DHCP options parsing and reassembly. */
 
 @@ -279,13 +275,9 @@
   sizeof(u_int16_t))) {
   mms = getUShort(
   inpacket-options[DHO_DHCP_MAX_MESSAGE_SIZE].data);
 - options.c
   if (mms  576)
   mms = 576;  /* mms must be = minimum IP MTU */
   }
 -===
 - }
 - 1.19
 
   if (mms) {
   if (mms  576)
 
 this is the resulting diff of the changes I made, IT IS NOT AN
 OFFICIAL PATCH, USE IT AT YOUR OWN RISKS !
 
 Cheers,
 
 -- 
 Vincent GROSS
 GUIs normally make it simple to accomplish simple actions and
 impossible to accomplish complex actions. --Doug Gwyn (22/Jun/91 in
 comp.unix.wizards)
 

Not sure what you think the problem is. You're apparently comparing
-stable and -current sources. Can you explain exactly what problem
you see?

 Ken



Re: dhcpd's options.c in a weird shape

2007-11-10 Thread Vincent GROSS
okay, pb solved, i just reused a stable tree to populate a current tree

thanks again

On Nov 10, 2007 4:14 PM, Kenneth R Westerback [EMAIL PROTECTED] wrote:

 On Sat, Nov 10, 2007 at 03:31:03PM +0100, Vincent GROSS wrote:
  Hi folks,
 
  there seem to be a lil' problem with /usr/src/usr/sbin/dhcpd/options.c.
  the following patch highlights two weirds constructs inside the file,
  one in the header, the other one in the MMS checking code.
 
  --- /usr/src/usr.sbin/dhcpd/options.c Sat Nov 10 04:53:05 2007
  +++ ./options.c   Sat Nov 10 15:17:50 2007
  @@ -1,8 +1,4 @@
  - options.c
  -/*   $OpenBSD: options.c,v 1.8.4.1 2007/10/10 06:10:27 ckuethe Exp $ */
  -===
   /*   $OpenBSD: options.c,v 1.19 2007/10/29 16:51:02 krw Exp $*/
  - 1.19
 
   /* DHCP options parsing and reassembly. */
 
  @@ -279,13 +275,9 @@
sizeof(u_int16_t))) {
mms = getUShort(
inpacket-options[DHO_DHCP_MAX_MESSAGE_SIZE].data);
  - options.c
if (mms  576)
mms = 576;  /* mms must be = minimum IP MTU */
}
  -===
  - }
  - 1.19
 
if (mms) {
if (mms  576)
 
  this is the resulting diff of the changes I made, IT IS NOT AN
  OFFICIAL PATCH, USE IT AT YOUR OWN RISKS !
 
  Cheers,
 
  --
  Vincent GROSS
  GUIs normally make it simple to accomplish simple actions and
  impossible to accomplish complex actions. --Doug Gwyn (22/Jun/91 in
  comp.unix.wizards)
 

 Not sure what you think the problem is. You're apparently comparing
 -stable and -current sources. Can you explain exactly what problem
 you see?

  Ken




-- 
Vincent GROSS
GUIs normally make it simple to accomplish simple actions and
impossible to accomplish complex actions. --Doug Gwyn (22/Jun/91 in
comp.unix.wizards)



How can I burn DVD+R Dual Layer media?

2007-11-10 Thread Andrés
I've read that the process is not the same as burning DVD+R, but, at
the same time, I couldn't get much information :S

Has anyone tried burning DVD+R Dual Layer media?, what are the steps?

Greetings.



partition and copy in one line?

2007-11-10 Thread Lars Noodén
I had a hard drive die and used the chance to move to 4.2.  Since the
'new' machine is of the same vintage as the one it replaced, I expect it
to start grinding to a halt soon, too.

Is there a way to copy one entire hard drive, partition table and all,
to another -- in one line?

I tried something like this one but it seems to work only for specific
partitions:
ssh target_address dd if=remotefile | dd of=localfile

I'd like to just steamroll over the previous partitions.

Regards,
-Lars



Re: Security Comparisons

2007-11-10 Thread knitti
On 11/10/07, Douglas A. Tutty [EMAIL PROTECTED] wrote:

 of philosophy.  Linux is about making all kinds of toys work in a
 hot-plug way and allow people to boast about their uptime.  OpenBSD is
 about security.

I would add usability (conciseness, least surprise and coherency) and
thus maintainability to the list. I end up having less to do for OpenBSD
Servers to keep them happy running than for some Debian boxes, and
Debian _is_ damn well maintainable.

--knitti



Re: Printing with apsfilter

2007-11-10 Thread Predrag Punosevac

Douglas A. Tutty wrote:

On Sat, Nov 10, 2007 at 04:30:51AM +, Jacob Meuser wrote:
  

On Fri, Nov 09, 2007 at 07:15:11PM -0700, Predrag Punosevac wrote:

 
  
Any strong opinion on LPD vs LPRng vs CUPS issue? I am not a 
professional system administrator and there is way too much Linux and 
CUPS around me for my taste. I want to hear from the serious people what 
are the benefits of one system over the another.
  

lpd - part of the base system.  lightweight and very reliable.

CUPS - relatively easy set up and ability to tweak options on the
   fly.

lprng - never used it.



On OpenBSD, I've never used anything but lpd with a text-mode dot-matrix
printer (no print filters).

On Debian, I've used lpd (they use OpenBSD's), LPRng, but never CUPS.

On Debian, you can use CUPS' foomatic-printfilters to get CUPS'
printfilters without installing the whole CUPS infrastructure (to save
disk space).  I've used foomatic-printfilters with LPRng and straight
lpd.  I don't like the CUPS way, it seems like overkill to me.  Then
again, if your printer driver isn't in the standard gs then you may need
a different gs.  On debian, where everything is broken up in packages,
you can get the gs-esp from CUPS and use it as a drop-in replacement for
gs-gpl with lpd/apsfilter.

It really is a piece-together thing unless you bow to CUPS and take the
whole lot.  


The difference between lpd and LPRng is one of access control.  Having
the fine-grained access control comes at the price of more difficult
setup (more docs to read).  I also haven't seen any updates to it for a
few years so I wonder about any security support.

Once you get your printer setup to take a ps file, it will be able to
take anything else once its converted to ps.  Most browsers, for
example, do this.

Doug.
  


After the Jacob's letter I wanted to clear to myself the issue of driver 
vs PPD files. Apparently all my printer were using
Ghostscript drivers and I always have Ghostscript on my computers 
because of TeX.  I do remember when I was running ./SETUP
script for apsfilter on FreeBSD box which uses LPD when I was prompted 
to select the driver it was always from Ghostscript collection
which was automatically found by apsfilter. PPD is of course just 
PostScript  Descriptor  for  non  PostScript  printers  ( I have never 
even seen postscript printer in my life as I was always poor).


Apparently CUPS is also smart enough to realize that there is 
Ghoastscript  on the system.


After reading more stuff of about printers I believe that there is 
definitely security benefit of keeping LPD on OpenBSD machines
(of course FreeBSD as well). CUPS seems way too vulnerable.  Am I right 
about this security.


It seems to me that LPRng just has more fancy way of creating 
/etc/printcap file comparing to LPD. The project was abanded  by its 
creator 2005 and then picked up by someone else. I wonder if I had 
200-300 printers attached to my printer server how easy hard would be to 
set those using only LPD.


As LPD is good enough itself to set the plain text to printer I want to 
see what is the easiest way to tell printer how to understand ps files
If that could be done with build in filter in LPD or the one that come 
with base installation  (I have to read more about this) then everything 
else would be irrelevant and unnecessary. I could just edit printcup 
file by hand and have the same or better functionality than

with CUPS.



Apparently old system administrators didn't have any problem with above.
just by editing printcup files



Re: Printing with apsfilter

2007-11-10 Thread Aaron W. Hsu
Predrag,

[EMAIL PROTECTED] said:
 As LPD is good enough itself to set the plain text to printer I want to  see
 what is the easiest way to tell printer how to understand ps files If that
 could be done with build in filter in LPD or the one that come  with base
 installation  (I have to read more about this) then everything  else would be
 irrelevant and unnecessary. I could just edit printcup  file by hand and have
 the same or better functionality than with CUPS. 

There used to be an article on the web about dealing with LPD printcap files 
and setting up filters. I used it to set up one of my HP printers. The process 
is really quite simple if you know what your printer's magic incantations are. 
However, that is sometimes hard to discover. All APSFilter does is create the 
relevant files and entries, and then has its own script for filtering. This 
can be done by hand, as well.

The easiest way to do all this is probably by have APSFilter make the filter 
script for you, but if you just add a filter script for PS files (man 
printcap) in your entries, then if you pass a postscript file to the printer, 
it's all good. :-) Normally, if you have a non-postscript native printer, you 
may have to  tell the filter to run some program like Ghostscript on the file 
to convert it to the native format for the printer.

-- 
((name Aaron Hsu)
 (email/xmpp [EMAIL PROTECTED])
 (site http://www.aaronhsu.com;))

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: Printing with apsfilter

2007-11-10 Thread kim

Jacob Meuser wrote:

On Fri, Nov 09, 2007 at 01:20:14PM -0700, [EMAIL PROTECTED] wrote:
  

Hello all,

I would like to get some advise on printing with apsfilter on 4.2. I
have an Epson CX5400 multifunction printer that I normally use with the
Gutenprint drivers and CUPS on other Unix systems. I am only using this
as a local printer, so I don't really need something as elaborate as
CUPS to do the job.

Gutenprint is not available in ports, so I used ghostscript, which does
not include this printer as a supported device. I have been able to get
it to print somewhat in black and white using one of the drivers, but no
color.

How feasible is it to use FreeBSD compatibility mode and Gutenprint,
etc. packages from FreeBSD to use with apsfilter to make this work?
  


probably more of a hassle than running -current, IMO.

  

What are other folks using on OpenBSD?
  


I don't have a working printer anymore but, I have used Epson printers
with OpenBSD for years.  there are now ports for:

print/gutenprint
print/ijs
print/foomatic-finters
print/foomatic-db
print/foomatic-db-engine

in -current, which allow the easy integration of gutenprint drivers
with the standard ghostscript port/package.  these drivers can then
be used with lpd, CUPS, direct printing, or whatever way you prefer.

but please read the messages that are displayed when the packages
are installed!!

  

Thanks

  

Hi Kim,
I do not use LPD(apsfilter) on OpenBSD but rather CUPS which is in
packages. That would probably be easy solution to your problem as you
could get PPD file directly from
http://www.linux-foundation.org/en/OpenPrinting
without the need for compiling Gutenprint.



not true.

plus, with the foomatic-db* packages, there is no need to go searching
for PPD files.

  
Thanks for the good info. Running -current seems a little daunting at 
the moment, so I think I will improvise until 4.3 release.


Cheers!



ifconfig regress in combination with pppoe(4)

2007-11-10 Thread Mitja Muženič
Hi all!

I just found the hard way that my old hostname.pppoe0 file which used to
work under 4.1 causes a spectacular failure on 4.2.

# sh /etc/netstart pppoe0
ifconfig: SIOCSIFGENERIC(SPPPIOSDEFS): Device busy

The reason turned out to be a whitespace character after the \ sign in
hostname.pppoe0.

Simplest way to recreate is to take the example from man and add a
whitespace at the end of the first or second line after \.

# cat hostname.pppoe0
inet 0.0.0.0 255.255.255.255 NONE \
pppoedev vr2 authproto chap \
authname '' authkey '' up
dest 0.0.0.1

Can somebody verify this? All my pppoe machines are remote.

Thanks,

Mitja



Re: Powered by obsd stickers and other stuff

2007-11-10 Thread Pau Amaro-Seoane
what about painted puffy?

it's been there for a while...

http://www.kde-look.org/content/show.php/Powered+by+OpenBSD?content=61218


2007/11/10, Jona Joachim [EMAIL PROTECTED]:
 On Sat, 10 Nov 2007 01:18:42 +0100, Iqigo Tejedor Arrondo wrote:

  Hello all
 
   Some art, at slw spanish foul asymetric connection. The sources are
  xcf, at 1600x1200.
 
   Clarify that I am not a designer :)
 
   I have make the typical Powered by stickers:
  http://inigo.homeunix.net/files/art/powered_by_puffy_black.png
  http://inigo.homeunix.net/files/art/powered_by_puffy_grey.png
 
   I hope that those stickers replace the vista compatible of the
  developers laptops :)
 
   There are some backgrounds:
 
   A blue rounded gradient with puffy:
  http://inigo.homeunix.net/files/art/background_blue_puff_1024x768.png
  http://inigo.homeunix.net/files/art/background_blue_puffy_text_1024x768.png

 At first I thought you just copied that one:
 http://www.openbsd-france.org/reposit/wallpapers/openbsd_yellow.png
 and I wanted to accuse you of plagiarism but then I noticed there are some
 differences between the two pictures :)

 The pictures are quite nice. I especially like the old picture filter
 one. The half wire / half red beastie looks kinda strange :)


 Best regards,
 Jona

 --
 I am chaos. I am the substance from which your artists and scientists
 build rhythms. I am the spirit with which your children and clowns
 laugh in happy anarchy. I am chaos. I am alive, and tell you that you
 are free. Eris, Goddess Of Chaos, Discord  Confusion



Re: ifconfig regress in combination with pppoe(4)

2007-11-10 Thread Darrin Chandler
On Sat, Nov 10, 2007 at 09:37:47PM +0100, Mitja Mu?eni? wrote:
 # sh /etc/netstart pppoe0
 ifconfig: SIOCSIFGENERIC(SPPPIOSDEFS): Device busy
 
 The reason turned out to be a whitespace character after the \ sign in
 hostname.pppoe0.
 
 Simplest way to recreate is to take the example from man and add a
 whitespace at the end of the first or second line after \.

I didn't play with this at all, but if it worked for you before then you
were lucky, I'd say. Only when \ is the last character should the line
be continued. If something (stripcom?) was removing trailing spaces then
I'd say that's a side-effect, and should not be relied upon.

-- 
Darrin Chandler|  Phoenix BSD User Group  |  MetaBUG
[EMAIL PROTECTED]   |  http://phxbug.org/  |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation



MacBook remote control

2007-11-10 Thread Richard Storm
Hello!
I have macbook:
hw.model=Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz
hw.vendor=Apple Inc.
hw.product=MacBook2,1
hw.version=1.0

On http://wiki.freebsd.org/AppleMacbook IR receiver section there is
tool available at http://fnop.net/~rpaulo/priv/freebsd/aird.tgz.

Here is patch that makes it compile/work under openbsd with my macbook
and remote control.

Ignore manpage, run like this:
./aird -vd -f /dev/uhid1 -M echo menu -P echo play -F echo
forward -B echo backward -U echo volumeup -D echo volumedown


--- aird.c.orig Tue Jul 31 21:26:36 2007
+++ aird.c  Sat Nov 10 22:56:10 2007
@@ -50,7 +50,6 @@
  */

 #include sys/cdefs.h
-__FBSDID($FreeBSD$);

 #include err.h
 #include errno.h
@@ -69,24 +68,17 @@
 #include sys/ioctl.h
 #include sys/stat.h

-#include libutil.h
 #include dev/usb/usb.h
 #include dev/usb/usbhid.h

-static struct pidfh *pfh;
-
 static voidsighandler(int sig);
 static voidusage(void);
 static voidruncmd(const char *cmd, int fd);


-static void
-sighandler(__unused int sig)
+static void sighandler(int sig)
 {

-   if (pfh)
-   pidfile_remove(pfh);
-
exit(EXIT_SUCCESS);
 }

@@ -96,7 +88,7 @@
fprintf(stderr, usage: %s [-vd] [-p pidfile] -f device 
[-M menu command]\n\t[-P play command] [-F forward command] 
[-B backward command]\n\t[-U volume up command] 
-   [-D volume down command]\n, getprogname());
+   [-D volume down command]\n, aird);

exit(1);
 }
@@ -132,8 +124,6 @@
const char *deventry;
unsigned char key;

-   pfh = NULL;
-
signal(SIGHUP, sighandler);
signal(SIGINT, sighandler);
signal(SIGCHLD, SIG_IGN);
@@ -207,23 +197,9 @@
err(EXIT_FAILURE, open %s, deventry);

if (!foreground) {
-   pfh = pidfile_open(pidfile, 0600, otherpid);
-   if (pfh == NULL) {
-   if (errno == EEXIST) {
-   errx(EXIT_FAILURE,
-   Daemon already running, pid: %jd.,
-   (intmax_t)otherpid);
-   }
-   /* If we cannot create pidfile from other reasons,
-  only warn. */
-   warn(Cannot open or create pidfile);
-   }
-   
if (daemon(0, 0)  0) {
-   pidfile_remove(pfh);
err(EXIT_FAILURE, daemon);
}
-   pidfile_write(pfh);
}

memset(prevbuf, 0, sizeof(prevbuf));
@@ -243,9 +219,6 @@
exit(EXIT_SUCCESS);
}

-   if (key  buf[3] != key)
-   continue;
-   
/*
 * Check for key repeats.
 */
@@ -273,7 +246,7 @@
repeating = 0;
}

-   switch (buf[4]) {
+   switch (buf[3]) {
/* Menu */  
case 0x02:
case 0x03:
@@ -308,7 +281,6 @@
}

}
-   pidfile_remove(pfh);
close(fd);

return (0);



paramtere not supported anymore? kern.machdep getting error .... (kde/gnome...)

2007-11-10 Thread badeguruji
Hello,

while trying to configure kde for openbsd. i referred to this document:

http://www.openbsdsupport.org/obsd_desktop.html

Check if
kern.machdep is set to 1 in your 

/etc/sysctl.conf file. If not, change it. You can use 

sysctl -w kern.machdep=1 to  activate it without rebooting.


but when i add that to sysctl, i get following error at system startup time: 
(which i also get when i try command line)

# sysctl -w kern.machdep=1
sysctl: second level name machdep in kern.machdep is invalid
# 

I tried to look into internet for definition of macdep but found nothing. what 
is it and what are its effects?


All things are not ok here(some related issues)

kde does not start properly on system startup. i have to ssh into the system 
from another host and start kde with 'startkde' command. and then it runs fine.

1. i do not get logon screen when i power on the system.
2. after starting x or kde from cmdline (from a ssh session from another 
machine), i can only end the gui session and do not get oiption to shutdown the 
system.
3. from a ssh session, i can only start kde as root, it fails as another 
user

i am researching but could not solve the puzzle yet. any/all help is 
appreciated.

Here are my changes to main config files to get x/kde running. (x is running 
fine on this box otherwise)

0./etc/sysctl.conf
no change as i installed X with initial install and it already has :
machdep.allowaperture=2

1. rc.conf.local
kdm_flags=

2. /etc/rc.local
if [ X${kdm_flags} != XNO ]; then
   /usr/local/bin/kdm ${kdm_flags} ;
   echo -n 'kdm '
fi

3./etc/X11/xinit/xinitrc
#xclock -geometry 50x50-1+1 
#xconsole -iconic 
#xterm -geometry 80x24 
#fvwm || xterm  
/usr/local/bin/startkde


4./etc/X11/xdm/Xsession
case $# in
1)
case $1 in
failsafe)
/usr/X11R6/bin/xterm -geometry 80x24-0-0
do_exit
;;
kde | default)
/usr/local/bin/startkde
do_exit
;;
gnome)
/usr/local/bin/gnome-session
do_exit
;;
esac
esac
#/usr/X11R6/bin/xterm 
#/usr/X11R6/bin/fvwm
/usr/local/bin/startkde


thank you.
BG
 

~~Kalyan-mastu~~



Re: paramtere not supported anymore? kern.machdep getting error .... (kde/gnome...)

2007-11-10 Thread Peter N. M. Hansteen
badeguruji [EMAIL PROTECTED] writes:

 while trying to configure kde for openbsd. i referred to this document:

 http://www.openbsdsupport.org/obsd_desktop.html

That document is seriously out of date, see the warning (red, even) at
the main page at that site, http://www.openbsdsupport.org/index.html

For an up to date guide, http://www.openbsd.org/faq/faq11.html is a
lot better place to start.  Then install the kde packages and pay
attention to the package messages.  At first glance it looks like
you're mostly there with the rc.local changes.  The xinitrc and
Xsession edits are not really needed if all you want is a kde desktop.
In addition to kdm startup, modern kde packages tend to want fam
and possibly dbus-daemon, again watch the package messages.

(and I'll save the rant about eejits dumping their barely edited
this-worked-for-me-except-the-stuff-I-forgot-to-mention HOWTOs on
the web and leave them there to mislead way past their rm by date for
sometime later)
-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.datadok.no/ http://www.nuug.no/
Remember to set the evil bit on all malicious network traffic
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



glxsb crypto crash

2007-11-10 Thread Mitja Muženič
Not my day, obviously

On a net5501 machine that I just upgraded to 4.2 I experienced a sudden
reboot and found this in dmesg:

uvm_fault(0xd078d120, 0x0, 0, 1) - e
fatal page fault (6) in supervisor mode
trap type 6 code 0 eip d03d4fab cs 8 eflags 10296 cr2 4 cpl 90
panic: trap type 6, code=0, pc=d03d4fab
Starting stack trace...
panic(0,d6a0215c,da48ed3c,0,d6a0215c) at panic+0x71
panic(d06a2ca7,6,0,d03d4fab,d067c27d) at panic+0x71
trap() at trap+0x119
--- trap (number 6) ---
swcr_authcompute(d6845068,d68440e0,0,d69a5900,2) at swcr_authcompute+0x33
glxsb_crypto_freesession(d6845068,d68440e0,0,d69a5900,90) at
glxsb_crypto_freese
ssion+0xe3
glxsb_crypto_process(d6845068,0,da48ef6c,d0332d78) at
glxsb_crypto_process+0xd4
crypto_invoke(d6845068,24,d0690993,0) at crypto_invoke+0xbc
crypto_thread(d6a0215c) at crypto_thread+0x38
Bad frame pointer: 0xd08c7eb8
End of stack trace.
syncing disks... 22 22 21 19 15 9 2 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up


It's a moderately loaded machine with approx. 40 ipsec tunnels active, this
crash happened within an hour since my last reboot.

Any hints on how to debug this? I'd settle for disabling the use of glxsb
crypto acceleration if necessary, don't have that much ipsec traffic (yet).


Regards, Mitja

dmesg:

OpenBSD 4.2 (GENERIC) #375: Tue Aug 28 10:38:44 MDT 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by AMD PCS (AuthenticAMD 586-class)
500 MHz
cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX
real mem  = 536440832 (511MB)
avail mem = 511070208 (487MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/70/19, BIOS32 rev. 0 @ 0xfac40
pcibios0 at bios0: rev 2.0 @ 0xf/0x1
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc8000/0xa800
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 1 function 0 AMD Geode LX rev 0x31
glxsb0 at pci0 dev 1 function 2 AMD Geode LX Crypto rev 0x00: RNG AES
vr0 at pci0 dev 6 function 0 VIA VT6105M RhineIII rev 0x96: irq 11,
address 00:00:24:c8:de:2c
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
0x004063, model 0x0034
vr1 at pci0 dev 7 function 0 VIA VT6105M RhineIII rev 0x96: irq 5, address
00:00:24:c8:de:2d
ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
0x004063, model 0x0034
vr2 at pci0 dev 8 function 0 VIA VT6105M RhineIII rev 0x96: irq 9, address
00:00:24:c8:de:2e
ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
0x004063, model 0x0034
vr3 at pci0 dev 9 function 0 VIA VT6105M RhineIII rev 0x96: irq 12,
address 00:00:24:c8:de:2f
ukphy3 at vr3 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
0x004063, model 0x0034
ppb0 at pci0 dev 14 function 0 TI PCI2250 PCI-PCI rev 0x02
pci1 at ppb0 bus 1
sis0 at pci1 dev 0 function 0 NS DP83815 10/100 rev 0x00, DP83816A: irq
10, address 00:00:24:c3:47:fc
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci1 dev 1 function 0 NS DP83815 10/100 rev 0x00, DP83816A: irq 7,
address 00:00:24:c3:47:fd
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
pcib0 at pci0 dev 20 function 0 AMD CS5536 ISA rev 0x03
pciide0 at pci0 dev 20 function 2 AMD CS5536 IDE rev 0x01: DMA, channel 0
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: SanDisk SDCFH-1024
wd0: 4-sector PIO, LBA, 977MB, 2001888 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
pciide0: channel 1 ignored (disabled)
ohci0 at pci0 dev 21 function 0 AMD CS5536 USB rev 0x02: irq 15, version
1.0, legacy support
ehci0 at pci0 dev 21 function 1 AMD CS5536 USB rev 0x02: irq 15
usb0 at ehci0: USB revision 2.0
uhub0 at usb0: AMD EHCI root hub, rev 2.00/1.00, addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
gpio0 at nsclpcsio0: 29 pins
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom0: console
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
usb1 at ohci0: USB revision 1.0
uhub1 at usb1: AMD OHCI root hub, rev 1.00/1.00, addr 1
biomask e145 netmask ffe5 ttymask ffe7
pctr: user-level cycle counter enabled
mtrr: K6-family MTRR support (2 registers)
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a swap on wd0b dump on wd0b
WARNING: / was not properly unmounted



plane simple vanilla X and 3 errors:

2007-11-10 Thread badeguruji
(EE) Unable to locate/open config file
(EE) Failed to load module dri (module does not exist, 0)
(EE) Failed to load module fbdev (module does not exist, 0)

i am worried about last 2. any advice is appreciated.

thank you.
BG
 

~~Kalyan-mastu~~



PPD vs printer driver question

2007-11-10 Thread Predrag Punosevac
For the past couple hours after the Jacob's answer about apsfilter I was 
reading about Unix printing.
I am getting more confused about the real meaning of PPD files and 
printer drivers.


According to this 
http://en.wikipedia.org/wiki/PostScript_Printer_Description


PPD files are post script description files that act as a drivers for 
post script printers. This seems clear to me.



According to same page CUPS-PPD are used by CUPS to do post-script 
printing on non-postscript printers by directing files through
CUPS-filter. Could somebody explain this things better to me. Every time 
I used CUPS the PPD files where enough to enable me printing.
Did I really use some other drivers beside these PPD files or did CUPS 
communicate with my printers with some generic driver and just

uses PPD files to do filtering.


In LPD it seems to me that this is more clear as when I run ./SETUP 
apsfilter I am really question to select the driver from the Ghostscript 
collection.



Thanks to ALL
Predrag



Re: PPD vs printer driver question

2007-11-10 Thread Predrag Punosevac

Predrag Punosevac wrote:
For the past couple hours after the Jacob's answer about apsfilter I 
was reading about Unix printing.
I am getting more confused about the real meaning of PPD files and 
printer drivers.


According to this 
http://en.wikipedia.org/wiki/PostScript_Printer_Description


PPD files are post script description files that act as a drivers for 
post script printers. This seems clear to me.



According to same page CUPS-PPD are used by CUPS to do post-script 
printing on non-postscript printers by directing files through
CUPS-filter. Could somebody explain this things better to me. Every 
time I used CUPS the PPD files where enough to enable me printing.
Did I really use some other drivers beside these PPD files or did CUPS 
communicate with my printers with some generic driver and just

uses PPD files to do filtering.


In LPD it seems to me that this is more clear as when I run ./SETUP 
apsfilter I am really question to select the driver from the 
Ghostscript collection.



Thanks to ALL
Predrag
This 
http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/III.PostScript-and-PPDs/III.PostScript-and-PPDs.html

did clarify more things to me but I would like to learn more.

Any Adobe or CUPS developers around?



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread ropers
Would people say that this edit is a decent description of these issues?

http://en.wikipedia.org/w/index.php?title=Sparse_filediff=170645177oldid=168346326



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread ropers
On 10/11/2007, Otto Moerbeek [EMAIL PROTECTED] wrote:

 Your example just shows copying big files takes long. The point being,
 if the file was not sparse, it would take at least the same time.
 Blaming sparseness for the long cp time is not fair.

 -Otto

But of course it would be semi-nice if the copy/sync commands were not
only aware that they are copying a sparse file, but if they also only
copied the data/space that the sparse file actually occupies (as
opposed to copying the full allocated data).

I say semi-nice because the benefits in speed and decreased bandwith
requirements would come at the expense of extra special case code,
ie. added complexity, which as we all know might not necessarily
always be worth it.



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Daniel Ouellet

Hi,

Before we go nuts on this issue, or look for the wrong things or create 
miss understanding.


Just allow me a little bit more time to try to come with a viseable 
example showing the problem, or the issue here.


Obviously as Otto pointed out to me, looks like I can't explain it to well.

I have spend many hours today trying to get a better example of this and 
showing it better as to not create any miss understanding and I think I 
have may be find a better way to explain it.


I will send it a bit later with examples. as I have been able to isolate 
a good case between many that may relate to many because of it's 
possible use, oppose to may personal issue.


I will update misc@ with hopefully a better example.

But I have a way around the problem, so that works for me, however I 
think it might be of interest to others and as such I will send a better 
example.


Thanks

Daniel



Re: plane simple vanilla X and 3 errors:

2007-11-10 Thread Unix Fan
(EE) Unable to locate/open config file

You're running X configless, meaning you didn't create an /etc/X11/xorg.conf 
file.. which is OK in the latest X (If you have modern computers).



(EE) Failed to load module dri (module does not exist, 0)

OpenBSD doesn't support DRM/DRI, So 3D/OpenGL acceleration isn't even 
available.. thus this is OK. Ignore it.



(EE) Failed to load module fbdev (module does not exist, 0)

OpenBSD doesn't have a framebuffer device on the i386/amd64 platform, just the 
boring VGA video modes.. not snazzy VBE/VESA lovelyness.. this is OK. Ignore 
it.



i am worried about last 2.

Why are you worried? They aren't important... ;) Does X11 start successfully? 
if it doesn't.. the errors you provided aren't responsible..



Have fun




Re: Printing with apsfilter

2007-11-10 Thread Girish Venkatachalam
On 13:32:21 Nov 10, Aaron W. Hsu wrote:
 There used to be an article on the web about dealing with LPD printcap files 
 and setting up filters. I used it to set up one of my HP printers. The 
 process 
 is really quite simple if you know what your printer's magic incantations 
 are. 
 However, that is sometimes hard to discover. All APSFilter does is create the 
 relevant files and entries, and then has its own script for filtering. This 
 can be done by hand, as well.
 
 The easiest way to do all this is probably by have APSFilter make the filter 
 script for you, but if you just add a filter script for PS files (man 
 printcap) in your entries, then if you pass a postscript file to the printer, 
 it's all good. :-) Normally, if you have a non-postscript native printer, you 
 may have to  tell the filter to run some program like Ghostscript on the file 
 to convert it to the native format for the printer.

Let me throw in my 2 cents of unsolicited comments. :)

I have been very happy with the power and flexibility of a2ps.

Its capabilities are amazing. Throw in any input file and it can neatly
decorate it for you, syntax highlight, put appropriate headers and
footers, page numbering, duplex printing, printing 4 pages in 1 sheet
and so on.

I believe the power comes from the postscript language and most likely
the psutils package. 

Saving paper has been the highest priority for me and being a command
line utility a2ps has always appealed to me...

Now I only know what you people seem to be saying about PPD files and
drivers. I have never used CUPS either.

However long ago I have read that postscript is a PCL - printer command
language.

And most printers these days support printing using postscript and the
LPD daemon which listens at TCP port 515 .

In fact I have tested 

$ nc -v PRINTER_IP 515

and checked whether the printer supported LPD printing.

AIUI LPRng helps you print directly without messing around with
/etc/printcap.

A simple command line can do the job.

Something like

$ export [EMAIL PROTECTED]

$ lpr foo.ps

Here 192.168.1.40 is the IP of the printer and foo.ps is the output
generated by a2ps.

Note that for the above to work you neither need a printer daemon on
your host nor any /etc/printcap entry!

Hopefully this does not add to the confusion. :)

Please point out if there are any mistakes in the blurb above.

Ever willing to learn.

Thanks.

Have a nice day!

regards,
Girish



Re: partition and copy in one line?

2007-11-10 Thread Girish Venkatachalam
On 18:38:38 Nov 10, Lars Nood??n wrote:
 I had a hard drive die and used the chance to move to 4.2.  Since the
 'new' machine is of the same vintage as the one it replaced, I expect it
 to start grinding to a halt soon, too.
 
 Is there a way to copy one entire hard drive, partition table and all,
 to another -- in one line?
 
 I tried something like this one but it seems to work only for specific
 partitions:
   ssh target_address dd if=remotefile | dd of=localfile
 
 I'd like to just steamroll over the previous partitions.

There are much more qualified folks out there but if I were you I would
simple do a dump(8) and a restore(8) of each of the partitions.

dd(1) can do it too but it might be far more messy and need more
experimentation.

I am talking thro' the hat here but the advantage with dump(8) and
restore(8) is it might be much faster and understands FFS quite well
unlike the raw dd command.

Thanks.

regards,
Girish



Re: partition and copy in one line?

2007-11-10 Thread Douglas A. Tutty
On Sat, Nov 10, 2007 at 06:38:38PM +0200, Lars Nood??n wrote:
 I had a hard drive die and used the chance to move to 4.2.  Since the
 'new' machine is of the same vintage as the one it replaced, I expect it
 to start grinding to a halt soon, too.
 
 Is there a way to copy one entire hard drive, partition table and all,
 to another -- in one line?
 
 I tried something like this one but it seems to work only for specific
 partitions:
   ssh target_address dd if=remotefile | dd of=localfile
 
 I'd like to just steamroll over the previous partitions.
 

FAQ#10.2.  use dump(8) and restore(8).  Or tar(1)

I've never needed to.

Doug.



Re: Security Comparisons

2007-11-10 Thread Douglas A. Tutty
On Sat, Nov 10, 2007 at 05:52:03PM +0100, knitti wrote:
 On 11/10/07, Douglas A. Tutty [EMAIL PROTECTED] wrote:
 
  of philosophy.  Linux is about making all kinds of toys work in a
  hot-plug way and allow people to boast about their uptime.  OpenBSD is
  about security.
 
 I would add usability (conciseness, least surprise and coherency) and
 thus maintainability to the list. I end up having less to do for OpenBSD
 Servers to keep them happy running than for some Debian boxes, and
 Debian _is_ damn well maintainable.
 

True.  Although I have't run into the problem, there have been many
cries for help on the debian-user list when udev renames drive devices
and a machine refuses to boot.  The answer has been to use linux's
ability to mount by LABEL= instead of /dev/* so that the kernel looks at
all the devices for the approprate filesystem label.  Just an example of
a surprise gotcha.

Doug.



Re: Printing with apsfilter

2007-11-10 Thread Douglas A. Tutty
On Sat, Nov 10, 2007 at 12:04:57PM -0700, Predrag Punosevac wrote:
 Douglas A. Tutty wrote:
 On Sat, Nov 10, 2007 at 04:30:51AM +, Jacob Meuser wrote:
 On Fri, Nov 09, 2007 at 07:15:11PM -0700, Predrag Punosevac wrote:

 The difference between lpd and LPRng is one of access control.  Having
 the fine-grained access control comes at the price of more difficult
 setup (more docs to read).  I also haven't seen any updates to it for a
 few years so I wonder about any security support.
 
 It seems to me that LPRng just has more fancy way of creating 
 /etc/printcap file comparing to LPD. The project was abanded  by its 
 creator 2005 and then picked up by someone else. I wonder if I had 
 200-300 printers attached to my printer server how easy hard would be to 
 set those using only LPD.
 

And this is the big difference between lpd and LPRng.  With LPRng you
can specify who can use what of those printers even if all the
originators are on the same box.  I think that lpd just lets you specify
what boxes can make print requests.

Doug.



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Daniel Ouellet

Hi,

I will try to make this very simple and show the issue by example only 
when possible. I use two old servers on the Internet for the tests. The 
source use real example sparse file, but that have only ~1GB of usable 
data in it. The size show by 'ls -al' as an example gives~17GB. That's 
what we will use for the demonstration and explications of the issues as 
presented at first were network bandwidth waist, much servers resources 
waisted as well for way more then it should be and the issue of not be 
able to even complete the sync in some cases as well in the process. 
Also, a miss judgment at the start as looking at df output to know 
quickly the space I would need to transfer the content, I forgot the 
possible issue with sparse files. If I use 20% or 30% of a file system, 
it's was fair for me to assume anyway that I would definitely be able to 
copy these files on other systems that provide a minimum of the same 
size of more. That's where I went wrong and had to work around it.


A simple mistakes one would say, however interesting to find why as it 
snot obvious at first specially if you look at the final df look on 
remote servers as well. If the remote system was much bigger then the 
source, there isn't any problem for the transfer. Still waist bandwidth 
in some cases, but it will work as the remote file systems will grow up, 
but not fill up like I show in the example below. However, you would 
never see it at first glance as doing df at the source or at the 
destination, you see no differences in size, forgetting the space 
required to transfer the data, but again, who would think that if you 
don't use 50% of the space available, that you would be in a situation 
where you couldn't transfer it? I could even have thought that may be if 
I wanted to, I could even have done a full backup as I use 30%, so there 
is plenty of space right?


So, that's what created the look for what the hell could be wrong 
process and prompt me to look for a possible way to eliminate sparse 
files in specific cases.


Again, just to be sure no one go crazy, sparse files are not a bad 
thing. They have pretty useful at times. But you can get bitten by them 
too, in some cases. (;


1. ==
Some numbers:
# df /home
Filesystem  512-blocks  Used Avail Capacity  Mounted on
/dev/wd0h  2096316   1973256 1824899%/home

# ls -al /home/sparcefile
-rw-r--r--  1 douellet  douellet  17416290304 Nov 10 02:02 /home/sparcefile

You can see that partition can only suppose ~1GB of real data and the 
file is showing up at ~17GB. So, definitely sparse file. Nothing wrong 
there.


2. ==
To answer the question about network data transfer usages. Yes a sparse 
file will use that much waisted bandwidth, depending what you use to 
transfer the file. Three example:


2.1 ==
rsync without -S, just can't do. The remote disk fill itself up and then 
transfer session crash, plain an simple. Plus it takes an insane amount 
of time:


And just to see it live as well, I keep doing df /var/www/sites as it 
was doing it to see it in action. It filled up, then crash the transfer.


Destination is:
Filesystem  512-blocks  Used Avail Capacity  Mounted on
/dev/wd1a 41280348  12668632  2654770032%/var/www/sites
Filesystem  512-blocks  Used Avail Capacity  Mounted on
/dev/wd1a 41280348  39216344   -12   100%/var/www/sites
Filesystem  512-blocks  Used Avail Capacity  Mounted on
/dev/wd1a 41280348  12668632  2654770032%/var/www/sites


Sat Nov 10 18:06:19 EST 2007
rsync: writefd_unbuffered failed to write 16385 bytes: phase unknown 
[sender]: Broken pipe (32)
rsync: write failed on /var/www/sites/testing/sparcefile: No space 
left on device (28)
rsync error: error in file IO (code 11) at 
/usr/obj/i386/rsync-2.6.6p0/rsync-2.6.6/receiver.c(291)
rsync: connection unexpectedly closed (1140235 bytes received so far) 
[generator]
rsync error: error in rsync protocol data stream (code 12) at 
/usr/obj/i386/rsync-2.6.6p0/rsync-2.6.6/io.c(434)
rsync: connection unexpectedly closed (1056064 bytes received so far) 
[sender]
rsync error: error in rsync protocol data stream (code 12) at 
/usr/obj/ports/rsync-2.6.6p0/rsync-2.6.6/io.c(434)

Sat Nov 10 18:39:22 EST 2007

2.2 ==
With -S you can transfer it but still will take a lots of time and the 
bandwidth usage is representing the real data of the file content, not 
it's size. So rsync is doing an ok job here and will send the changes 
only, witch is what we want. PF also reflect that.


# ./fullsync-test
Sat Nov 10 20:09:52 EST 2007
Sat Nov 10 20:40:51 EST 2007

# pfctl -si | grep Bytes
  Bytes In   3697287510
  Bytes Out   103655890

Note, I did reset pf stats just before starting the test.

2.3 ==
Now using scp as many times it's can also be use for quick sync of 
changed files. Here however, we 

Re: ifconfig regress in combination with pppoe(4)

2007-11-10 Thread Jacob Yocom-Piatt

Mitja Muenih wrote:

Hi all!

I just found the hard way that my old hostname.pppoe0 file which used to
work under 4.1 causes a spectacular failure on 4.2.

# sh /etc/netstart pppoe0
ifconfig: SIOCSIFGENERIC(SPPPIOSDEFS): Device busy

The reason turned out to be a whitespace character after the \ sign in
hostname.pppoe0.

Simplest way to recreate is to take the example from man and add a
whitespace at the end of the first or second line after \.

# cat hostname.pppoe0
inet 0.0.0.0 255.255.255.255 NONE \
pppoedev vr2 authproto chap \
authname '' authkey '' up
dest 0.0.0.1

Can somebody verify this? All my pppoe machines are remote.

  



can verify that i had similar problems: updated to 4.2-release from 4.1 
on i386 with working hostname.pppoe0; read manpage, changed format 
slightly to the one you show above; all attempts at getting the 
interface to come up did not work, however, on reboot pppoe0 came up and 
is working; have not fiddled since


based on the troubles i had, i would not even consider upgrading a 
remote machine that uses pppoe until i could get this to work cleanly on 
a local machine. maybe pre-empting the change in hostname.pppoe syntax 
could do it, not sure. still have yet to upgrade my pppoe machines at 
work, can try this tomorrow and report back.


cheers,
jake


Thanks,

Mitja




Re: Printing with apsfilter

2007-11-10 Thread William Boshuck
On Sat, Nov 10, 2007 at 08:46:19PM -0500, Douglas A. Tutty wrote:
 ...
 And this is the big difference between lpd and LPRng.  With LPRng you
 can specify who can use what of those printers even if all the
 originators are on the same box.  I think that lpd just lets you specify
 what boxes can make print requests.
 
 Doug.

Well, you can use rg in /etc/printcap.



Re: identifying sparse files and get ride of them trick available?

2007-11-10 Thread Daniel Ouellet

ropers wrote:

Would people say that this edit is a decent description of these issues?

http://en.wikipedia.org/w/index.php?title=Sparse_filediff=170645177oldid=168346326


I can't really comment well for proper writing for sure. (;

But one thing that is not right as Otto pointed out to me and that my 
tests showed just to well. The size of the files size doesn't changed. 
The transfer data however is different depending of what utility or 
options you use to transfer it. That part I didn't express it properly 
in my previous emails and Otto kindly corrected it as well. In some 
cases it might be good to have the capability to compact it. meaning 
making it none sparse again, but I can't put a good judgment as to if 
that would be good in most cases, witch I am sure it's not the case for 
many, specially for database files for example come to mind.


I guess what I can conclude with is in some cases there is substantial 
waist of bandwidth (depend on utility use for sync), CPU resources, way 
more time consume in the sync process as well, ( in my example case, up 
to 50+ minutes instead of possible  2 minutes) and possible sync 
process that will break, or stop if sparse are getting to big. But 
that's a case by case obviously. No rules that I can think of right now. 
And the last point I have to include is that may be in some cases you 
can't even do it, or it will stop doing it when you expect it less. (;


Best,

Daniel



Re: ifconfig regress in combination with pppoe(4)

2007-11-10 Thread Daniel Melameth
On 11/10/07, Jacob Yocom-Piatt [EMAIL PROTECTED] wrote:
 Mitja Muenih wrote:
  I just found the hard way that my old hostname.pppoe0 file which used to
  work under 4.1 causes a spectacular failure on 4.2.
 
  # sh /etc/netstart pppoe0
  ifconfig: SIOCSIFGENERIC(SPPPIOSDEFS): Device busy
 
  The reason turned out to be a whitespace character after the \ sign in
  hostname.pppoe0.
 
  Simplest way to recreate is to take the example from man and add a
  whitespace at the end of the first or second line after \.
 
  # cat hostname.pppoe0
  inet 0.0.0.0 255.255.255.255 NONE \
  pppoedev vr2 authproto chap \
  authname '' authkey '' up
  dest 0.0.0.1
 
  Can somebody verify this? All my pppoe machines are remote.

 can verify that i had similar problems: updated to 4.2-release from 4.1
 on i386 with working hostname.pppoe0; read manpage, changed format
 slightly to the one you show above; all attempts at getting the
 interface to come up did not work, however, on reboot pppoe0 came up and
 is working; have not fiddled since

 based on the troubles i had, i would not even consider upgrading a
 remote machine that uses pppoe until i could get this to work cleanly on
 a local machine. maybe pre-empting the change in hostname.pppoe syntax
 could do it, not sure. still have yet to upgrade my pppoe machines at
 work, can try this tomorrow and report back.

Had a similar issue when upgrading from 4.1--syntax changed--but I
have no whitespace issue.  I simply updated hostname.pppoe0 per the
man page and it works like it did before--but now I actually see the
gateway output in ifconfig pppoe0.



Problems with pf and rdr

2007-11-10 Thread Urban Hillebrand
Hi everyone,

I have a problem with pf redirection. I used this simple setup to reproduce
this issue:

An external host (HostA) connects to port 55111 on my external interface
($IF_EXT) on my openbsd box. This connection is forwarded to the ssh-port of
an internal Server (ServerA) using my internal interface ($IF_INT).

To allow this connection through my packet filter, it was my understanding
that I4d have at least 3 options (I am aware that redirection occurs before
filtering):

(1) allow the incoming connection on IF_EXT + allow outgoing connection on
IF_INT:
This is of course working without problems.

(2) using rdr pass instead of rdr:
This works for allowing the incoming connection on $IF_EXT, but I still seem
to need an outgoing rule on $IF_INT.

(3) using quick with my rule for $IF_EXT:
Same thing happens as with (2).

Below are the rules I used for (3):
rdr on $IF_EXT inet proto tcp from $HostA to $IF_EXT port 55111 - 10.2.0.58
port 22
pass in log quick on $IF_EXT inet proto tcp from $HostA to 10.2.0.58

And here is the output from pflog (hostname changed to HostA):
Nov 11 05:12:42.874890 rule 12/(match) pass in on xl0: HostA.33844 
vm-obsd42-1.urban.intra.ssh: [|tcp] (DF)
Nov 11 05:12:42.875015 rule 3/(match) block out on de0: HostA.33844 
vm-obsd42-1.urban.intra.ssh: [|tcp] (DF)

To verify, here are rules 3 and 12 from pfctl -srvv (external source IP
changed):
@3 block drop out log all
@12 pass in log quick on xl0 inet proto tcp from x.x.x.x to 10.2.0.58 flags
S/SA keep state

I have no problem working around this problem - but I am still curious if I
fundamentally misunderstood something here or if this is not working as
expected. Any ideas?

Thanks
-Urban



Re: ifconfig regress in combination with pppoe(4)

2007-11-10 Thread Daniel Melameth
On 11/10/07, Daniel Melameth [EMAIL PROTECTED] wrote:
 On 11/10/07, Jacob Yocom-Piatt [EMAIL PROTECTED] wrote:
  Mitja Muenih wrote:
   I just found the hard way that my old hostname.pppoe0 file which used to
   work under 4.1 causes a spectacular failure on 4.2.
  
   # sh /etc/netstart pppoe0
   ifconfig: SIOCSIFGENERIC(SPPPIOSDEFS): Device busy
  
   The reason turned out to be a whitespace character after the \ sign in
   hostname.pppoe0.
  
   Simplest way to recreate is to take the example from man and add a
   whitespace at the end of the first or second line after \.
  
   # cat hostname.pppoe0
   inet 0.0.0.0 255.255.255.255 NONE \
   pppoedev vr2 authproto chap \
   authname '' authkey '' up
   dest 0.0.0.1
  
   Can somebody verify this? All my pppoe machines are remote.
 
  can verify that i had similar problems: updated to 4.2-release from 4.1
  on i386 with working hostname.pppoe0; read manpage, changed format
  slightly to the one you show above; all attempts at getting the
  interface to come up did not work, however, on reboot pppoe0 came up and
  is working; have not fiddled since
 
  based on the troubles i had, i would not even consider upgrading a
  remote machine that uses pppoe until i could get this to work cleanly on
  a local machine. maybe pre-empting the change in hostname.pppoe syntax
  could do it, not sure. still have yet to upgrade my pppoe machines at
  work, can try this tomorrow and report back.

 Had a similar issue when upgrading from 4.1--syntax changed--but I
 have no whitespace issue.  I simply updated hostname.pppoe0 per the
 man page and it works like it did before--but now I actually see the
 gateway output in ifconfig pppoe0.

Thought it might make sense to note this in the Upgrade Guide--so if
nick@ is interested:

Index: upgrade42.html
===
RCS file: /cvs/www/faq/upgrade42.html,v
retrieving revision 1.24
diff -u -r1.24 upgrade42.html
--- upgrade42.html  1 Nov 2007 02:40:20 -   1.24
+++ upgrade42.html  11 Nov 2007 05:56:07 -
@@ -70,6 +70,7 @@
   lia href=#dedc[alpha Only] Some de(4) NICs will become dc(4)/a
   lia href=#acpi[i386 Only] apm(4) takes precedence over acpi(4)/a
   lia href=#rc.confrc.conf/a
+  lia href=#pppoepppoe(4) configuration changes/a
   lia href=#kernModified kernel/a
   /ul
 lia href=#upgradeThe upgrade process/a
@@ -310,6 +311,16 @@
 Otherwise, pull your existing ttrc.conf/tt into the top of your
 existing ttrc.conf.local/tt file iand remove the last line/i
 before doing the rest of this process.
+
+p
+a name=pppoe/a
+libpppoe(4) configuration changes:/bbr
+The configuration of PPPoE has changed slightly.  Please see
+a 
href=http://www.openbsd.org/cgi-bin/man.cgi?query=pppoeapropos=0sektion=4;
+manpath=OpenBSD+4.2arch=i386
+pppoe(4)/a for details, but normal scenarios will require a couple of
+changes to the PPPoE configuration file, typically
+tt/etc/hostname.pppoe0/tt, or the PPPoE connection will not work.

 p
 a name=kern/a