2^64 - 39 ...

2015-09-06 Thread Paul Stoeber
... is the greatest composite OpenBSD prime. $ uname -srm OpenBSD 5.7 amd64 $ n=$(echo "2^64 - 39" | bc) $ /usr/games/factor $n 18446744073709551577: 18446744073709551577 $ /usr/local/bin/gfactor $n 18446744073709551577: 139646831 132095686967

Re: I found a sort bug! - How to sort big files?

2015-03-16 Thread Paul Stoeber
> Current sort(1) is unmaintanable in many ways. I say switch. I've seen with gdb that the current sort(1) somehow manages to make radixsort(3) do the work when the sort key is somewhere in the middle of the line. I don't even want to know... (and my reading comprehension of C is too weak to go an

Re: ctrl+alt+backspace bypasses xlock and allows terminal access

2012-03-23 Thread Paul Stoeber
This is what I do on 5.0/i386. I have this line in /etc/ttys: ttyC5 "/bin/Lock" vt220 on secure To lock the computer I run this executable /bin/Lock: #!/bin/sh pass=sparken exe=/bin/Lock fifo=/var/Lock case "$1" in ttyC*) t=/dev/$1 tty=$t exec $exe exe < $t > $t 2> $t ;; exe)

Re: UTF-8

2010-08-11 Thread Paul Stoeber
Matthew Szudzik wrote (2010-08-05 19:50:16): > http://en.wikipedia.org/wiki/IDN_homograph_attack Try this in a default 4.7/i386 wscons console: printf 'set -x\nnslookup www.AAA.com\nnslookup www.AA\300.com\n' > 1 less 1 sh 1 See: sys/dev/ic/pcdisplay_chars.c Remedy: #!/bin/sh # Public do

automatic login with xdm

2008-12-10 Thread Paul Stoeber
My attempts at modifying /etc/ttys gave results inferior to the supported xdm_flags="", so... 1. Have xdm_flags="" in /etc/rc.conf.local 2. Apply this diff, then cd xenocara/app/xdm && make -f Makefile.bsd-wrapper build 3. Add printf '%s\0%s' username password > /var/x

Re: How to set proxy authentication when installing?

2006-11-18 Thread Paul Stoeber
Jing Peng wrote: > Hello everyone! I am a university student and I can't visit the web > server outside of China. So ,I use proxy to install OpenBSD(the proxy > need for authentication). When I get into the step bellow, I do not > know how to set proxy authentication correctly. I tried for times, b

getting the source of a snapshot

2006-10-18 Thread Paul Stoeber
The FAQ says: It is sometimes asked if there is any way to get a copy of exactly the code used to build a snapshot. The answer is no. For this to change, it would be sufficient if the output of find src XF4 -path '*/CVS/Entries' -exec perl -ne \ 'm:^(/[^/]*/[^/]*): && print substr($ARGV

Xorg, i810 - X crashes when switching from wscons to X

2006-10-16 Thread Paul Stoeber
This is on -current i386. See dmesg below (the "apg_release_helper" lines seem to be a byproduct of the X crash, since they are not normally in my dmesg). I'm getting this crash very infrequently, and I don't know what to do about it. See compressed Xorg.0.log below the dmesg. I think it's not

blurb blurb

2006-10-11 Thread Paul Stoeber
I've been thinking about the legal blurbs in the source files, the most permissive being the one in, for example, src/bin/chio/parse.y I feel it's a bit silly to bother with them, since they have no technical significance. But perhaps it's worthwhile, every once in a while, to ponder the real wor

the cvs repository doesn't obey the attic criterion

2006-10-11 Thread Paul Stoeber
the cvs info manual says: But in case you want to know, the rule is that the RCS file is stored in the attic if and only if the head revision on the trunk has state `dead'. counterexamples: /cvs/src/sbin/swapon/Attic/swapon.8,v /cvs/src/distrib/vax/ramdisk/d

Re: overwritten file recovery - how ?

2006-09-30 Thread Paul Stoeber
On Sat, 30 Sep 2006 19:24:43 +0200 Bambero <[EMAIL PROTECTED]> wrote: > Hello > > I need to recovery overwritten txt file. > > Ex. > echo "my data" > testfile.txt > echo "" > testfile.txt > > I have partition image file creted using dd. > Is it possible to dump it and search using grep for examp

Re: a question about errno

2006-09-30 Thread Paul Stoeber
On Fri, 29 Sep 2006 05:30:35 + I wrote: > Should a userland program be allowed to depend on errno==0 on entry > to main()? (At least one in the tree does.) That claim is unfounded, because usr.bin/head/head.c (which I failed to mention; apologies) is not an example. The question remains unse

Re: a question about errno

2006-09-29 Thread Paul Stoeber
On Fri, 29 Sep 2006 14:40:04 -0600 Theo de Raadt <[EMAIL PROTECTED]> wrote: > > On 9/28/06, Paul Stoeber <[EMAIL PROTECTED]> wrote: > > > Should a userland program be allowed to depend on errno==0 on entry > > > to main()? (At least one in the tree does.) >

a question about errno

2006-09-28 Thread Paul Stoeber
Should a userland program be allowed to depend on errno==0 on entry to main()? (At least one in the tree does.) I see no place in the C library that explicitly ensures this, and it might be false if the user runs the program under LD_PRELOAD tricks.

Re: kernel profiling boot startup call graph kgmon gprof

2006-09-25 Thread Paul Stoeber
(update of http://marc.theaimsgroup.com/?l=openbsd-misc&m=115914181032738&w=2) Polishing. --- /dev/null Mon Sep 25 16:30:26 2006 +++ sys/conf/gen_addr_etext Mon Sep 25 15:41:13 2006 @@ -0,0 +1,19 @@ +#!/bin/sh +f=addr_etext.h +l='#define ADDR_ETEXT \' +if [ $# = 0 ]; then + echo "$l"

Re: OpenBSD Order and austin@ encrypted block

2006-09-24 Thread Paul Stoeber
On Sun, 24 Sep 2006 20:40:37 -0400 Chris Zakelj <[EMAIL PROTECTED]> wrote: > Got my pre-order entered a couple days ago, but I still haven't been > able to find what keyserver is being used, and thus, I have no idea what > austin's PGP message block says. It says that the information is for ID EA

Re: kernel profiling boot startup call graph kgmon gprof

2006-09-24 Thread Paul Stoeber
(update of http://marc.theaimsgroup.com/?l=openbsd-misc&m=115898040215357&w=2) Here's an improved version of the patch. It does away with kmstartup(), completing the coverage of the recorded call graph. --- /dev/null Sun Sep 24 23:24:37 2006 +++ sys/conf/gen_addr_etext Sat Sep 23 00:36:45

kernel profiling boot startup call graph kgmon gprof

2006-09-22 Thread Paul Stoeber
The kernel profiling facility does not currently provide a call graph of system startup. With the patch below, it does. Time profiling is not the purpose of this patch and remains limited. One printf() is lost. The information it provided can be gathered at build time. A kernel that would prev

feature req: vnconfig should work on readonly fs; round 3

2006-09-11 Thread Paul Stoeber
Let's see if I can get this closer to right. The patch is against and tested on -current. Thank you, Pedro, for your help. --- sys/dev/vnd.c.orig Sun Sep 10 19:18:28 2006 +++ sys/dev/vnd.c Mon Sep 11 15:54:30 2006 @@ -142,7 +142,10 @@ #defineVNF_HAVELABEL 0x0400 #defineV

a question about concurrency

2006-09-09 Thread Paul Stoeber
Quoting sys/dev/vnd.c rev 1.62: 1121 /* 1122 * Wait interruptibly for an exclusive lock. 1123 * 1124 * XXX 1125 * Several drivers do this; it should be abstracted and made MP-safe. 1126 */ 1127 int 1128 vndlock(sc) 1129 struct vnd_softc *sc; 1130 { 1131

feature req: vnconfig should work on readonly fs; round 2

2006-09-08 Thread Paul Stoeber
The patch appears to work for me on 3.9 i386, and I do need your comments on it. Thank you, Joachim. --- sys/dev/vnd.c.orig Fri Sep 8 03:41:21 2006 +++ sys/dev/vnd.c Sat Sep 9 05:09:38 2006 @@ -142,7 +142,10 @@ #defineVNF_HAVELABEL 0x0400 #defineVNF_BUSY0x0800

feature req: vnconfig should work on readonly fs

2006-09-08 Thread Paul Stoeber
The patch appears to work for me on OpenBSD 3.9 i386. --- sys/dev/vnd.c.orig Fri Sep 8 03:41:21 2006 +++ sys/dev/vnd.c Fri Sep 8 04:56:05 2006 @@ -817,7 +817,7 @@ * have to worry about them. */ NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, vi