Re: pledge(2) API ideas for libraries

2016-06-13 Thread Ray Lai
pledge should be used to restrict a program to whatever it is necessary to do, rather than everything the library can do. So if I use libimaginarydb to parse a csv file I've already read into a memory buffer (nearly pledge("", NULL)), but the library can read/write/create files, do remote db connec

Re: wifind(8) find your wifi

2016-06-03 Thread Ray Lai
> On Jun 3, 2016, at 8:42 PM, Erling Westenvik wrote: > As much as I endorse and approve of any effort to create a good solution > for handling wifi's, I must say I find the use of perl and json > unnecessary for such a project. I've been using a "pure ksh" solution > named wiconfig since 2013 and

Re: wifind(8) find your wifi

2016-06-03 Thread Ray Lai
On Fri, 3 Jun 2016 10:33:47 +0100 skin...@britvault.co.uk (Craig Skinner) wrote: > Hi Ray, > > On 2016-06-03 Fri 00:26 AM |, Ray Lai wrote: > > > > I got tired of configuring my wifi every time I had to move my laptop. > > Here's a script a whipped up. > &

Re: wifind(8) find your wifi

2016-06-03 Thread Ray Lai
On Fri, 3 Jun 2016 15:52:34 +0200 Stefan Sperling wrote: > On Fri, Jun 03, 2016 at 03:22:19PM +0200, Kamil Cholewiński wrote: > > Perhaps it's time that the best tool be chosen and made a part of the > > base install? I've already seen like a 100 different OBSD WiFi scripts > > floating around th

Re: wifind(8) find your wifi

2016-06-03 Thread Ray Lai
> On Jun 3, 2016, at 8:59 PM, Etienne wrote: > On 06/03/16 05:12, Ray Lai wrote: >>> >>> #!/bin/sh >>> >>> if [[ $1 == "home" ]]; then >>>doas ifconfig run0 nwid foonet wpa wpakey ultrasecret >>>doas dhclient run0

Re: wifind(8) find your wifi

2016-06-02 Thread Ray Lai
> On Jun 3, 2016, at 6:17 AM, Gleydson Soares wrote: > > I usually just use a small script that lives in ~/bin > > cat ~/bin/wifi > > #!/bin/sh > > if [[ $1 == "home" ]]; then >doas ifconfig run0 nwid foonet wpa wpakey ultrasecret >doas dhclient run0 > fi Yup. The goal of wifind is to do

Re: wifind(8) find your wifi

2016-06-02 Thread Ray Lai
> On Jun 3, 2016, at 2:36 AM, Kamil Cholewiński wrote: >> On Thu, 02 Jun 2016, Ray Lai wrote: >> use JSON::PP; > > That's just my personal opinion, but JSON sucks for configuration files. > It's more of a human-readable data interchange format. > > It

wifind(8) find your wifi

2016-06-02 Thread Ray Lai
tname.if(5) HISTORY I got really tired of editing hostname.if(5) every time I moved my laptop. AUTHORS Ray Lai CAVEATS Please avoid nwid or wpakey with quotes, dollar signs, or backslashes. I'm sorry if you dislike Perl, but it comes stock with OpenBS

Re: Can't use sshfs as user

2016-05-22 Thread Ray Lai
I've fixed "sshfs -o idmap=user", please test and give feedback: https://marc.info/?l=openbsd-tech&m=146383589632694&w=2 Index: fuse_opt.c === RCS file: /home/cvs/src/lib/libfuse/fuse_opt.c,v retrieving revision 1.15 diff -u -p -r1.1

Re: pftpx

2006-05-25 Thread Ray Lai
On Thu, May 25, 2006 at 08:28:12PM +0100, Gaby vanhegan wrote: > The last mention of this on misc@ was march, and not much prior to > that. Does anybody have any good/bad experiences with pftpx? I plan > to use it to proxy incoming FTP connections, the opposite of what I'd > use ftp-proxy f

Re: bash vs. ksh

2006-05-10 Thread Ray Lai
On Wed, May 10, 2006 at 04:35:46PM -0400, Michael Erdely wrote: > Janjaap van Velthooven wrote: > >>Luke Bakken wrote: > cmd1 2>&1 >$WHERE > >What you would want is > >cmd1 >$WHERE 2>&1 > > I was going to respond with the exact same thing. Then, just for kicks, > I decided to read ksh(1) fr

Re: www.openbsd.org defaults to Japanese

2006-05-02 Thread Ray Lai
On Tue, May 02, 2006 at 11:26:37PM +, Tan Dang wrote: > Any reason why www.openbsd.org displays Japanese by default now? April Fools! -Ray-

Re: OpenBSD via serial line

2006-05-01 Thread Ray Lai
On Tue, May 02, 2006 at 12:15:09PM +1000, John Kintaro Tate wrote: > I was wondering about installing OpenBSD on a very old laptop (no cdrom) via > serial line. I am aware it would take literally ages. > > I am guessing slip would be the way to go, I have never used it before. Does > anyone have a

Re: Verizon PC5740 card (Curitel Communications) wireless WAN card

2006-04-24 Thread Ray Lai
On Mon, Apr 24, 2006 at 08:52:09PM -0500, Chris Paul wrote: > Thanks to Jolan's recommendation to fiddle with umodem.c has helped. I > now have > > #define UMODEMIBUFSIZE 2048 > #define UMODEMOBUFSIZE 2048 > > It works quite well now except that almost everytime I pull out the card, > OpenBSD f

Re: Problem Compiling Stevens' Socket Source Code

2006-04-24 Thread Ray Lai
On Tue, Apr 25, 2006 at 12:10:14AM +0200, Tobias Ulmer wrote: > Here's a patch that removes all(?) warnings/errors from the > intro chapter if you followed the instructions in the readme... > > > diff -ru unpv13e.orig/intro/byteorder.c unpv13e/intro/byteorder.c > --- unpv13e.orig/intro/byteorder

Re: heads up about filesystem troubles

2006-04-12 Thread Ray Lai
On Wed, Apr 12, 2006 at 04:49:29PM +0200, Jonathan Thornburg wrote: > Hi, > > >The window of danger was booting a kernel from any time _after_ 2 > >weeks ago and running a fsck from any time _before_ 4 days ago. If > >you have booted a new kernel, do not use the old fsck. > > Do I infer correctl

Re: OpenBSD todo list?

2006-04-10 Thread Ray Lai
On Mon, Apr 10, 2006 at 08:44:36PM -0700, Shawn Nock wrote: > A quick search of the archive and google didn't turn anything up, so > I'll ask here. > > Is there (if not could there be) a document that describes portions of > the tree that particularly need attention? I am looking for a way to >

Re: RedBlack trees

2006-04-06 Thread Ray Lai
On Thu, Apr 06, 2006 at 05:07:14PM -0300, Gustavo Rios wrote: > Hey folks, > > i saw OpenBSD comes with a library that implements a redblack tree > features. I know there are many ways to implement it. The difference > is in performance. I don't know the fastest one. > > May some of the openbsd f

Re: openbsd and the money

2006-03-27 Thread Ray Lai
On Mon, Mar 27, 2006 at 09:57:25PM +0200, Tobias Kirschstein wrote: > On Mon, 27 Mar 2006 13:50:04 +0200 > Henning Brauer <[EMAIL PROTECTED]> wrote: > > * Tobias Kirschstein <[EMAIL PROTECTED]> [2006-03-25 20:26]: > > > > Maybe our friends of humppa.com will make a "Humppa OpenBSD > > > > Support T

Re: Spamd and verbose logging...

2006-03-27 Thread Ray Lai
On Mon, Mar 27, 2006 at 09:53:01AM -0700, Jeff Ross wrote: > Hi all, > > I'm trying to understand why spamd isn't doing any verbose logging on my > mail server. Spamd is working fine, so this is more curiosity/learning > than anything else. > > NOTE: I have replaced the standard syslog with so

Re: UPEK Fingerprint-Reader (ThinkPad Notebooks)

2006-03-25 Thread Ray Lai
On Fri, Mar 24, 2006 at 02:24:31AM +, Deanna Phillips wrote: > "Karsten McMinn" <[EMAIL PROTECTED]> writes: > > > On 3/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> > >> Oops, that's a good heads up. I was considering getting an R51. Is that > >> going to have an unsupported wireles

Re: Reminder about the X Aperture

2006-03-16 Thread Ray Lai
On Thu, Mar 16, 2006 at 01:56:44PM -0800, A Rossi wrote: > > > modern PC video card architecture containing a large > > quantity of PURE EVIL. > > This joke has a whole new meaning... > http://ctrlaltdel-online.com/comic.php?d=20021029 > > As an aside, there are no alternative windows systems th

Re: Why packets are not blocked

2006-03-08 Thread Ray Lai
On Wed, Mar 08, 2006 at 10:29:53AM -0800, Bryan Irvine wrote: > On 3/7/06, Jim <[EMAIL PROTECTED]> wrote: > > When my kid gets grounded I block the gameroom computer from getting to the > > internet. The script that runs is > > > > #!/bin/sh - > > cp /home/jmays/pf.conf.noGameroom /etc/pf.conf > >

Re: Fw: Why packets are not blocked

2006-03-07 Thread Ray Lai
On Tue, Mar 07, 2006 at 09:48:14PM -0600, Jim wrote: > >>don't forget to flush/kill states if you want existing connections to > be torn down. > > How do I do that? pfctl -k -Ray-

Re: Dependancies with make search key=

2006-02-28 Thread Ray Lai
On Tue, Feb 28, 2006 at 04:04:46PM -0600, Harry Putnam wrote: > Maybe I don't understand what the dependancy lines are supposed to > do. I thought they would list any dependancies. > > I have no part of X installed so should I see some dependancies listed > here? ># make search key=ratpoison

Re: systrace filename exists rule

2006-02-27 Thread Ray Lai
On Mon, Feb 27, 2006 at 05:48:26PM +0200, [EMAIL PROTECTED] wrote: > i was writing a systrace rule and i could not find a way to create > a rule that would permit writing > to a file but only if it does not exists, so it could only create > new files but not override old ones. > Would that requ

Re: squid cachemgr: Unknown host: localhost

2006-02-24 Thread Ray Lai
On Fri, Feb 24, 2006 at 09:57:24PM +0100, Martin Schr?der wrote: > Hi, > I've a firewall/proxy with 3.7 running a named and transparent > squid. I want to use cachemgr.cgi, so I've setup apache to listen > on port 8080 and copied /usr/local/libexec/cachemgr.cgi to > /var/www/cgi-bin > > Now, the C

Re: auto-adding bad hosts to a table

2006-02-22 Thread Ray Lai
On Wed, Feb 22, 2006 at 04:48:19PM -0500, Daniel Ouellet wrote: > Ray Lai wrote: > >I thought you meant you could do something like: > > > > block in log-table to port 25 > > > >where is updated automatically. > > If you read on the PF and look at wh

Re: auto-adding bad hosts to a table

2006-02-22 Thread Ray Lai
On Wed, Feb 22, 2006 at 04:17:35PM -0500, Daniel Ouellet wrote: > Ray Lai wrote: > >On Wed, Feb 22, 2006 at 03:31:41PM -0500, Daniel Ouellet wrote: > >>Chris Smith wrote: > >>>In addition to preventing infected PC's from using their own SMTP engine > >&g

Re: auto-adding bad hosts to a table

2006-02-22 Thread Ray Lai
On Wed, Feb 22, 2006 at 03:31:41PM -0500, Daniel Ouellet wrote: > Chris Smith wrote: > >In addition to preventing infected PC's from using their own SMTP engine > >to send out spam by blocking port 25 from all but the mail server. I > >would also like to add those hosts automatically to a table i

Re: auto-adding bad hosts to a table

2006-02-22 Thread Ray Lai
On Wed, Feb 22, 2006 at 02:47:02PM -0500, Chris Smith wrote: > In addition to preventing infected PC's from using their own SMTP engine > to send out spam by blocking port 25 from all but the mail server. I > would also like to add those hosts automatically to a table in order to > block their a

Re: filesystem full problem

2006-02-17 Thread Ray Lai
On Fri, Feb 17, 2006 at 02:54:43PM +0100, Adam Papai wrote: > Hello list, > > I've run into a problem. > > My /var reached the 105% disk usage. I've deleted 1.5G from /var but the > df shows me still 2Gb. > > du -csh /var shows 38M > > What can I do? I tried: sync but nothin happens. The progra

Re: "iwlist scan" equivalent command under OpenBSD

2006-02-16 Thread Ray Lai
On Thu, Feb 16, 2006 at 05:17:30PM +0100, Ramiro Aceves wrote: > Hi OpenBSD fans. > > I have been googling around and have not been able to solve this > question. ?How can one discover what wireless networks are available > under OpenBSD? > I am used to the "iwlist scan eth0" under Linux, and I ha

Re: xargs PF or BPF

2006-02-14 Thread Ray Lai
On Tue, Feb 14, 2006 at 11:39:45AM +0100, Otto Moerbeek wrote: > On Tue, 14 Feb 2006, Michael Schmidt wrote: > > > Matthias Kilian wrote: > > > > > And watch out for silly file names containing whitespace. > > > > > > BTW: if this is a contest on creative use of find(1) and other > > > standard

Re: Interface ranges in pf.conf (i.e. tun[0-10])

2006-02-13 Thread Ray Lai
On Mon, Feb 13, 2006 at 11:13:17PM -0500, Ray Lai wrote: > On Tue, Feb 14, 2006 at 04:26:29AM +0100, Tobias Ulmer wrote: > > On Mon, Feb 13, 2006 at 09:28:12PM -0500, kyle wrote: > > > Im having trouble finding out if(I'm sure it does) the pf.conf supports > >

Re: Interface ranges in pf.conf (i.e. tun[0-10])

2006-02-13 Thread Ray Lai
try it out at the moment..Any help is > > appreciated - thanks! > > I don't know if this works with regular rules, but there is a recent > post from Ray Lai where he points out that it's possible to use just > interface instead of interface[0-n] [1]. Wow, I'm ref

Re: PF or BPF

2006-02-13 Thread Ray Lai
On Mon, Feb 13, 2006 at 05:28:22PM -0500, Jason Crawford wrote: > Well in the case of /usr/src, I think you must MIGHT hit the maximum > argument length for the shell by using xargs, unless you did it inside > of each directory in /usr/src. That and well, explaining xargs to Dave > will end up lead

Re: users filling partitions crashing system

2006-02-07 Thread Ray Lai
On Tue, Feb 07, 2006 at 11:00:41AM +, MikeyG wrote: > Is there any way to direct cores to be saved somewhere else? ... > Feb 6 10:36:36 boxname /bsd: WARNING: / was not properly unmounted > Feb 6 10:37:37 boxname savecore: reboot after panic: trap type 6, > code=2, pc=d033737c > Feb 6 10:37

Re: pf question - solved

2006-02-03 Thread Ray Lai
On Thu, Feb 02, 2006 at 05:59:54PM -0500, Dave Feustel wrote: > I found the solution in the pf faq: skip lo0. > This rule is not mentioned in Artymiak's book > which I had been reading. I will now read the > complete pf faq to see what I have not been > aware of. You can also do ``set skip on lo'

Re: Brain wash for live partition, or directory mirroring concept idea(s)?

2006-02-01 Thread Ray Lai
On Wed, Feb 01, 2006 at 11:37:19PM -0500, Daniel Ouellet wrote: > This way, continuous live mirroring can be done and no need for cronjob, > etc. And this would be much more efficient as well. https://marc.theaimsgroup.com/?l=openbsd-misc&m=86187916316 https://marc.theaimsgroup.com/?l=openb

Re: A small patch to make "input" style in license.template consistent

2006-01-30 Thread Ray Lai
On Sun, Jan 29, 2006 at 12:37:07PM -0300, Andr??s Delfino wrote: > Or... somehow I changed that word when sending the message. Anyway, > this is the correct diff: > > --- license.templateTue Jun 3 19:37:00 2003 > +++ license.template.1 Sun Jan 29 12:33:55 2006 > @@ -5,11 +5,14 @@ > should b

Re: Ralink - device timeout

2006-01-23 Thread Ray Lai
On Mon, Jan 23, 2006 at 01:20:36PM +0100, Joakim Aronius wrote: > * Jonathan Gray ([EMAIL PROTECTED]) wrote: > > On Mon, Jan 23, 2006 at 12:36:46PM +0100, Joakim Aronius wrote: > > > Hi Anders, > > > > > > >From your dmesg: > > > pcibios0 at bios0: rev 2.1 @ 0xfd7a0/0x860 > > > > > > >From RAL(4)

Re: ipv6 tentative address generation

2006-01-17 Thread Ray Lai
On Tue, Jan 17, 2006 at 01:11:29AM -0600, Travers Buda wrote: > Ipv6 allows for stateless configuration of a interface. The IEEE (aka > MAC or hardware address) is generally used to generate tentative > addresses which commonly end up being the assigned address provided > stateful addressing doe

Re: which cf wifi card for a Zaurus C3100?

2006-01-17 Thread Ray Lai
On Mon, Jan 16, 2006 at 05:29:02PM +0100, Maik Kuendig wrote: > can someone recommend a CF WiFi card for a Zaurus C3100? > > My dealer has the following cards available: > - D-Link DCF-660W > - Linksys WCF12-EU I use a Linksys WCF12 (no ``-EU'', bought in the US). Works great. -Ray-

Re: Linksys WMP55AG (ath0) Not Finding Wireless Network

2006-01-13 Thread Ray Lai
On Thu, Jan 12, 2006 at 10:55:35PM -0700, Theo de Raadt wrote: > > Some AR5212 chips seem to have problems, even though they are > > detected by OpenBSD. I read something about newer firmwares? > > The atheros chips do not use firmware. Please ignore my ignorance, I meant PHY: http://www.monkey

Re: Linksys WMP55AG (ath0) Not Finding Wireless Network

2006-01-12 Thread Ray Lai
Some AR5212 chips seem to have problems, even though they are detected by OpenBSD. I read something about newer firmwares? Try searching the archives. One person recently reported having success by setting COUNTRYCODE to "de" and rebuilding his kernel; it didn't work for me but I guess it's wort

Re: MAXNAMLEN, NAME_MAX, FILENAME_MAX Plus One or Not?

2006-01-06 Thread Ray Lai
On Sat, Jan 07, 2006 at 12:11:32AM +0100, Otto Moerbeek wrote: > > On Fri, 6 Jan 2006, Ray Lai wrote: > > > What are the proper uses of MAXNAMLEN, NAME_MAX, and FILENAME_MAX? > > Do they represent filenames with or without paths? Do they include > > the terminati

MAXNAMLEN, NAME_MAX, FILENAME_MAX Plus One or Not?

2006-01-06 Thread Ray Lai
What are the proper uses of MAXNAMLEN, NAME_MAX, and FILENAME_MAX? Do they represent filenames with or without paths? Do they include the terminating null or not? The source seems inconsistent: [EMAIL PROTECTED]/usr/src] egrep -R '(MAXNAMLEN|NAME_MAX) ?\+ ?1' . ./bin/csh/file.c:Charname[

How Do I Get snprintf(3) to Return -1?

2006-01-05 Thread Ray Lai
According to printf(3): snprintf() and vsnprintf() will write at most size-1 of the characters printed into the output string (the size'th character then gets the ter- minating `\0'); if the return value is greater than or equal to the size argument, the string was

sdiff implementation

2005-12-13 Thread Ray Lai
Ever since the GNU diffutils were removed from OpenBSD there hasn't been an sdiff. So I wrote one and placed it into the public domain. It can be found at . This sdiff supports all of GNU sdiff's options and is compatible with OpenBSD's diff. All feedback is welcome.

Re: additional features in bsd.rd

2005-11-23 Thread Ray Lai
On Tue, Nov 22, 2005 at 12:01:05PM +0100, Pete Vickers wrote: > 1. Get a dmesg output from CD-ROM booted bsd.rd to my other machine > for emailing etc. > # dmesg | nc 10.20.30.40 1234 > > 2. Get information off a machine, either for backup purposes or data > recovery etc. > # dd i

Re: Assigning static device names for USB devices

2005-10-18 Thread Ray Lai
On Sun, Oct 16, 2005 at 09:00:16PM +0300, Antti Harri wrote: > I have two USB printers, is there a way to assign > a fixed device name instead of device name being > assigned dynamically? If it's not possible at all, > are there plans to implement it? If it's not possible at all, how does one go a

Re: Webmail recommendations?

2005-10-05 Thread Ray Lai
On Tue, Oct 04, 2005 at 01:20:24PM -0500, Bob Bostwick (Lists) wrote: > Not sure if it will run on OBSD or not (haven't had time to try yet...), > but hands down Zimbra is the best looking web interface out there - > including Exchange OWA. > > http://www.zimbra.com/ Egads, it's 150 MB! Just for

Re: OpenBSD on IBM X40 ...

2005-09-29 Thread Ray Lai
On Thu, Sep 29, 2005 at 12:46:26PM +0200, Reyk Floeter wrote: > hi, > > Waldemar Brodkorb wrote: > > ... just rocks :} > > > > openbsd always rocks ;) > > > Thanks to the developers. I got some minor problems with one of the > > snapshots (ath0 kernel crash), but this is already fixed in > > -c

Re: Time limited internet connection

2005-09-26 Thread Ray Lai
On Sun, Sep 25, 2005 at 11:27:05PM +0200, Remy Heiden wrote: > OR: > > root cron job: > > 11pm: pfctl -f /etc/pf.conf-night > 6am: pfctl -f pf.conf-day Until the kid learns, "Hey, I can reboot daddy's firewall and have internet access again!" (Assuming /etc/pf.conf allows it.) -Ray-

Latest ath changes panics system

2005-09-21 Thread Ray Lai
On Mon, Sep 19, 2005 at 04:27:09AM -0600, Reyk Floeter wrote: > CVSROOT: /cvs > Module name: src > Changes by: [EMAIL PROTECTED] 2005/09/19 04:27:08 > > Modified files: > sys/dev/ic : ar5210.c ar5211.c ar5212.c ar5xxx.c ar5xxx.h >ath.c > > Log mes

Re: want to get a zaurus - anybody in japan willing to help?

2005-09-15 Thread Ray Lai
On Wed, Sep 14, 2005 at 11:33:28PM -0400, Joe . wrote: > On 9/14/05, Ted Unangst <[EMAIL PROTECTED]> wrote: > > > the fujitsu lifebook p2000 models work (early ones are best; they added > > acpi or something and dicked up usb in later models from what i've > > gathered). p1000 should be the same.

Trouble with ath

2005-09-13 Thread Ray Lai
Hi, I'm having trouble with the atheros minipci card that came with my ThinkPad X40. It worked fine in Windows XP, but in OpenBSD nothing but pings go through (and even those are a bit lossy). For example, here is one ping session: [EMAIL PROTECTED] ping -s 1500 192.168.2.1 PING 192.168.2.1 (19

Re: more 1 than client can use same port from router (for bittorrent)

2005-08-18 Thread Ray Lai
On Sat, Aug 06, 2005 at 05:19:46PM +0200, Erik Wikstrvm wrote: > On 2005-08-06 16:48, Vivek Ayer wrote: > >Hi guys, > > > >I was wondering if it was possible to port forward the same port to > >more than one client behind a router. Currently, my client is the only > >one using bittorrent behind the

Re: '.' in username

2005-07-21 Thread Ray Lai
On Wed, Jul 20, 2005 at 08:32:45PM -0700, Tim Hammerquist wrote: > telnet is still a wonderful tool that I use all the time. > > $ telnet hostname 25 > > $ telnet hostname 80 > > $ telnet hostname 22 > > It's great for testing basic service availability, version strings, or > even a manual sess

Re: Mirroring data over network with failover?

2005-07-15 Thread Ray Lai
On Fri, Jul 15, 2005 at 01:53:43PM +0200, Dexter Fillmore wrote: > Is there any way to mirroring data over network with failover in > OpenBSD? I mean something like a raid-1 over network. Maybe with CARP > in some way like it can handle pf with no data lost? Im looking for a > solution that can han