Backing up an Android phone to an OpenBSD laptop

2012-09-26 Thread Robert Connolly
Hello.

I'm just looking for advice, not a howto. I realize this is not an OpenBSD
specific topic, but since I'm trying to get Linux and OpenBSD to cooperate,
anyone I ask for advice will refer me elsewhere.

I want to do backups of my Android phone whenever it is at home. The best
software package I know of for this is rsync. I own an ARM development
system (a Trim Slice), running Linux, and can therefore compile anything I
want for the Android phone (statically linked). I have a couple options,
that I can think of:

Run rsync's daemon on the phone, from a boot script. Configure hotplugd on
OpenBSD to run an rsync client when the phone connects via USB. I like this
idea because it reduces needed privileges on my laptop... I trust the phone
less than my laptop, so I would rather give my laptop access to the phone
than my phone access to my laptop. I dislike this idea because the phone
uses 5 watts while charging, and I would prefer to charge it from a
household outlet to reduce load on the laptop.

The second option is to run rsync's deamon on my laptop, and rsync from the
phone via an ifup script that checks the SSID. This works nice because I
can charge the phone from an outlet, and do the rsync wirelessly. This is
harder to secure though, because I would want the rsync client to have no
other access to my laptop.

Am I missing other considerations? Which of these two options is better?



Re: current snapshot pipex kernel panic

2012-09-26 Thread csszep
Thank you!

It works as expected.

Otherwise the mppe no option is missing from the manual page.

2012/9/26 YASUOKA Masahiko yasu...@yasuoka.net:
 Hello,

 On Tue, 25 Sep 2012 16:16:12 +0200
 csszep css...@gmail.com wrote:
 I wanted to try a simple npppd setup and i got a panic.

 I'm looking into this problem and fixing it.  But it will take more
 days.

 To workaround the problem, please add

   mppe no

 to the tunnel configuration.

 --yasuoka



tmux: create window failed (too many open files)

2012-09-26 Thread Sébastien Marie
Hi,

I'm running -current (not latest, only GENERIC.MP#20), see dmesg below.

I run in a error in tmux (a long session: 10 days for now), when a want to 
create a new window (C-b C-c), I have this error:

 Create window failed: exec ksh: Too many open files

Note, my default shell in tmux.conf is exec ksh (see ~/.tmux.conf below)


My limit for open files are standard:
semarie@bert:~$ ulimit -n
512


Currently, I have only 4 windows in this sessions, but:

semarie@bert:~$ fstat -u semarie | grep tmux
semarie  tmux3941   wd /home 4053504 drwx--   r 2560
semarie  tmux39410 /   17084 crw--w  rwttyp5
semarie  tmux39411 /   17084 crw--w  rwttyp5
semarie  tmux39412 /   17084 crw--w  rwttyp5
semarie  tmux39413 kqueue 0xd8c0f3d4 0 state: W
semarie  tmux39414 /home 4053890 -rw-r--r--   r 1859
semarie  tmux39415* unix stream 0xd31c7680 - 0xd4105380
semarie  tmux1509   wd /home 4053504 drwx--   r 2560
semarie  tmux15090 /   17621 crw-rw-rw-  rw null
semarie  tmux15091 /   17621 crw-rw-rw-  rw null
semarie  tmux15092 /   17621 crw-rw-rw-  rw null
semarie  tmux15093 kqueue 0xd8c0f310 0 state: W
semarie  tmux15094 /home 4053942 -rw-r--r--   r 1805
semarie  tmux15095* unix stream 0xd4105380 - 0xd31c7680
semarie  tmux15096* unix stream 0xd3228740
semarie  tmux15097 /   17084 crw--w  rwttyp5
semarie  tmux15099 /   17621 crw-rw-rw-   r null
semarie  tmux1509   10 /   17079 crw-rw-rw-  rwptyp2
semarie  tmux1509   11 /   17621 crw-rw-rw-   r null
semarie  tmux1509   12 /   17621 crw-rw-rw-   r null
semarie  tmux1509   13 /   17621 crw-rw-rw-   r null
semarie  tmux1509   14 /   17621 crw-rw-rw-   r null
semarie  tmux1509   15 /   17621 crw-rw-rw-   r null
semarie  tmux1509   16 /   17621 crw-rw-rw-   r null
[...]
semarie  tmux1509  503 /   17621 crw-rw-rw-   r null
semarie  tmux1509  504 /   17621 crw-rw-rw-   r null
semarie  tmux1509  505 /   17621 crw-rw-rw-   r null
semarie  tmux1509  506 /   17621 crw-rw-rw-   r null
semarie  tmux1509  507 /   17621 crw-rw-rw-   r null
semarie  tmux1509  508 /   17621 crw-rw-rw-   r null
semarie  tmux1509  509 /   17618 crw-rw-rw-   r  tty
semarie  tmux1509  510 /   17618 crw-rw-rw-   r  tty

There are 510 descriptors opened... 

Any hints ?

Does tmux could not closed not-need descriptors for old created windows ?

It will try too keep this session running for debug if need...

I could also upgrade to latest snapshot if needed. But I don't show any commit 
to tmux that seems related to that. But I could be wrong: please let me know.

Thanks.
-- 
Sebastien Marie

My ~/.tmux.conf

set -g default-command exec ksh
set -g status-right #(sysctl -n vm.loadavg)

# Statusbar properties.
set -g display-time 3000
set -g status-bg black
set -g status-fg cyan
set-window-option -g window-status-current-attr bright,reverse
set-window-option -g window-status-current-bg cyan
set-window-option -g window-status-current-fg black 

# divers
set -g default-path 
set -g bell-action any 
set -g set-titles on
set -g base-index 1
set -g history-limit 5000
set -g update-environment DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK 
SSH_AGENT_PID SSH_CONNECTION DBUS_SESSION_BUS_ADDRESS XDG_SESSION_COOKIE 
KRB5CCNAME


My dmesg:

OpenBSD 5.2-current (GENERIC.MP) #20: Tue Sep 11 11:54:03 MDT 2012
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2400 @ 1.83GHz (GenuineIntel 686-class) 1.83 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM
real mem  = 2137399296 (2038MB)
avail mem = 2091552768 (1994MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 03/09/06, BIOS32 rev. 0 @ 0xffa10, SMBIOS 
rev. 2.4 @ 0xf7b70 (44 entries)
bios0: vendor Dell Inc. version A03 date 03/09/2006
bios0: Dell Inc. MM061
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG BOOT SSDT
acpi0: wakeup devices LID_(S3) PBTN(S4) PCI0(S3) USB0(S0) USB1(S0) USB2(S0) 
USB3(S0) EHCI(S0) CH31(S0) AZAL(S3) PCIE(S4) RP01(S4) RP02(S3) RP03(S3) 
RP04(S3) RP05(S3) RP06(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2400 @ 1.83GHz 

Re: Backing up an Android phone to an OpenBSD laptop

2012-09-26 Thread Ted Unangst
On Tue, Sep 25, 2012 at 23:25, Robert Connolly wrote:

 The second option is to run rsync's deamon on my laptop, and rsync from the
 phone via an ifup script that checks the SSID. This works nice because I
 can charge the phone from an outlet, and do the rsync wirelessly. This is
 harder to secure though, because I would want the rsync client to have no
 other access to my laptop.

There's no reason why the phone has to log in to your laptop as the
same user that you do.  If you are afraid that somebody will
exploit your phone, then exploit rsync, then exploit the openbsd
kernel in order to get access to your files, in that case I'd advise
taking a deep breath. :)



Re: rc_cmd doesn't pick up overridden functions

2012-09-26 Thread Victor Leschuk
Thank you. I found the cause of the problem: the daemon changed its process
name after start so the value in /var/run/rc.d file was wrong. That is why
the stop script didn't work (actually it appeared that start script was
working correctly). I set up correct pexp value and everything worked fine.

Let us consider this as solved.

Sorry for bothering.



On Tue, Sep 25, 2012 at 11:51 PM, Stuart Henderson s...@spacehopper.orgwrote:

 On 2012-09-25, Victor Leschuk vlesc...@gmail.com wrote:
  Hello all,
 
  I am trying to create an rc.d script for my application. Current code
 looks
  like the following: https://gist.github.com/3783889 . The man for
 rc.subr
  says that I can override rc_* functions as well as pexp variable. However
  with the script above commands like:
 
  /etc/rc.d/my_daemon stop
 
  do not call overridden functions (it can be seen in sh -x and if you
 place
  echo in function body). Also I noticed that stop handler (default one as
  overridden isn't called) ignored my pexp value and passed just
 ^${daemon}
  to pkill. What am I doing wrong?

 In general this works fine, many examples in the tree use this
 successfully.

 What you show, with the /path/to/daemon etc and my_daemon
 filename does not seem likely to be the real path/name, so it would
 be better to show *exactly* what you're doing.



Re: tmux: create window failed (too many open files)

2012-09-26 Thread Nicholas Marriott
Are you running a tmux command from any shell script or cron or
anything?

There are only two places tmux itself opens /dev/null and they are both
after fork so this must be /dev/null passed with imsg from a client.

Also please should me output of tmux info.


On Wed, Sep 26, 2012 at 09:29:50AM +0200, S?bastien Marie wrote:
 Hi,
 
 I'm running -current (not latest, only GENERIC.MP#20), see dmesg below.
 
 I run in a error in tmux (a long session: 10 days for now), when a want to 
 create a new window (C-b C-c), I have this error:
 
  Create window failed: exec ksh: Too many open files
 
 Note, my default shell in tmux.conf is exec ksh (see ~/.tmux.conf below)
 
 
 My limit for open files are standard:
 semarie@bert:~$ ulimit -n
 512
 
 
 Currently, I have only 4 windows in this sessions, but:
 
 semarie@bert:~$ fstat -u semarie | grep tmux
 semarie  tmux3941   wd /home 4053504 drwx--   r 2560
 semarie  tmux39410 /   17084 crw--w  rwttyp5
 semarie  tmux39411 /   17084 crw--w  rwttyp5
 semarie  tmux39412 /   17084 crw--w  rwttyp5
 semarie  tmux39413 kqueue 0xd8c0f3d4 0 state: W
 semarie  tmux39414 /home 4053890 -rw-r--r--   r 1859
 semarie  tmux39415* unix stream 0xd31c7680 - 0xd4105380
 semarie  tmux1509   wd /home 4053504 drwx--   r 2560
 semarie  tmux15090 /   17621 crw-rw-rw-  rw null
 semarie  tmux15091 /   17621 crw-rw-rw-  rw null
 semarie  tmux15092 /   17621 crw-rw-rw-  rw null
 semarie  tmux15093 kqueue 0xd8c0f310 0 state: W
 semarie  tmux15094 /home 4053942 -rw-r--r--   r 1805
 semarie  tmux15095* unix stream 0xd4105380 - 0xd31c7680
 semarie  tmux15096* unix stream 0xd3228740
 semarie  tmux15097 /   17084 crw--w  rwttyp5
 semarie  tmux15099 /   17621 crw-rw-rw-   r null
 semarie  tmux1509   10 /   17079 crw-rw-rw-  rwptyp2
 semarie  tmux1509   11 /   17621 crw-rw-rw-   r null
 semarie  tmux1509   12 /   17621 crw-rw-rw-   r null
 semarie  tmux1509   13 /   17621 crw-rw-rw-   r null
 semarie  tmux1509   14 /   17621 crw-rw-rw-   r null
 semarie  tmux1509   15 /   17621 crw-rw-rw-   r null
 semarie  tmux1509   16 /   17621 crw-rw-rw-   r null
 [...]
 semarie  tmux1509  503 /   17621 crw-rw-rw-   r null
 semarie  tmux1509  504 /   17621 crw-rw-rw-   r null
 semarie  tmux1509  505 /   17621 crw-rw-rw-   r null
 semarie  tmux1509  506 /   17621 crw-rw-rw-   r null
 semarie  tmux1509  507 /   17621 crw-rw-rw-   r null
 semarie  tmux1509  508 /   17621 crw-rw-rw-   r null
 semarie  tmux1509  509 /   17618 crw-rw-rw-   r  tty
 semarie  tmux1509  510 /   17618 crw-rw-rw-   r  tty
 
 There are 510 descriptors opened... 
 
 Any hints ?
 
 Does tmux could not closed not-need descriptors for old created windows ?
 
 It will try too keep this session running for debug if need...
 
 I could also upgrade to latest snapshot if needed. But I don't show any 
 commit to tmux that seems related to that. But I could be wrong: please let 
 me know.
 
 Thanks.
 -- 
 Sebastien Marie
 
 My ~/.tmux.conf
 
 set -g default-command exec ksh
 set -g status-right #(sysctl -n vm.loadavg)
 
 # Statusbar properties.
 set -g display-time 3000
 set -g status-bg black
 set -g status-fg cyan
 set-window-option -g window-status-current-attr bright,reverse
 set-window-option -g window-status-current-bg cyan
 set-window-option -g window-status-current-fg black 
 
 # divers
 set -g default-path 
 set -g bell-action any 
 set -g set-titles on
 set -g base-index 1
 set -g history-limit 5000
 set -g update-environment DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK 
 SSH_AGENT_PID SSH_CONNECTION DBUS_SESSION_BUS_ADDRESS XDG_SESSION_COOKIE 
 KRB5CCNAME
 
 
 My dmesg:
 
 OpenBSD 5.2-current (GENERIC.MP) #20: Tue Sep 11 11:54:03 MDT 2012
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
 cpu0: Genuine Intel(R) CPU T2400 @ 1.83GHz (GenuineIntel 686-class) 1.83 GHz
 cpu0: 
 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM
 real mem  = 2137399296 (2038MB)
 avail mem = 2091552768 (1994MB)
 mainbus0 at root
 bios0 at mainbus0: AT/286+ BIOS, date 03/09/06, BIOS32 rev. 0 @ 0xffa10, 
 SMBIOS rev. 2.4 @ 0xf7b70 (44 entries)
 bios0: vendor Dell Inc. version A03 date 03/09/2006
 bios0: Dell Inc. MM061
 acpi0 at bios0: rev 0
 acpi0: sleep states S0 S3 S4 S5
 acpi0: tables DSDT FACP APIC MCFG BOOT SSDT
 

Re: tmux: create window failed (too many open files)

2012-09-26 Thread Sébastien Marie
On Wed, Sep 26, 2012 at 09:20:25AM +0100, Nicholas Marriott wrote:
 Are you running a tmux command from any shell script or cron or
 anything?

I used X11 (cwm).

I open a terminal (rxvt), maximize size, and run:

$ tmux attach -d -t semarie

(normally, via an alias)

 There are only two places tmux itself opens /dev/null and they are both
 after fork so this must be /dev/null passed with imsg from a client.
 
 Also please should me output of tmux info.

(in a ksh in the session)
semarie@bert:~$ tmux info
semarie@bert:~$ echo $?
1
semarie@bert:~$ 

so via the tmux command-line (C-b : + info)

pid 1509, started Sat Sep 15 10:17:49 2012  
  [137/137]
socket path /tmp/tmux-1000/default, debug level 0
system is OpenBSD 5.2 GENERIC.MP#20 i386
configuration file is /home/semarie/.tmux.conf
protocol version is 7

Clients:
 0: /dev/ttyp3 (5, 7): semarie [80x24 rxvt-256color bs=177 xterm=95] 
[flags=0x1/0x3b, references=0]

Sessions: [5/10]
 0: semarie: 4 windows (created Sat Sep 15 10:17:49 2012) [127x42] [flags=0x0]
1: ksh [127x42] [flags=0x8, references=1, last layout=-1]
   0: /dev/ttyp5 24460 131 1/42, 80 bytes; UTF-8 0/42, 0 bytes
2: ksh [127x42] [flags=0x8, references=1, last layout=-1]
   0: /dev/ttyp6 19418 421 3/42, 285 bytes; UTF-8 0/42, 0 bytes
3: ksh [127x42] [flags=0x8, references=1, last layout=-1]
   0: /dev/ttyp2 2926 10 4/21, 405 bytes; UTF-8 0/21, 0 bytes
4: ksh [127x42] [flags=0x8, references=1, last layout=-1]
   0: /dev/ttyp1 29566 185 153/156, 45190 bytes; UTF-8 2/156, 880 bytes
Terminals:  
  [117/137]
rxvt-256color [references=1, flags=0x1]:
 1: acsc: (string) ``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~
 0: AX: (flag) true
 2: bel: (string) \007
 3: blink: (string) \033[5m
 4: bold: (string) \033[1m
 5: Cc: [missing]
 6: civis: (string) \033[?25l
 7: clear: (string) \033[H\033[2J
 8: cnorm: (string) \033[?25h
 9: colors: (number) 256
10: Cr: [missing]
11: Cs: [missing]
12: csr: (string) \033[%i%p1%d;%p2%dr
13: Csr: [missing]
14: cub: (string) \033[%p1%dD
15: cub1: (string) \010
16: cud: (string) \033[%p1%dB
17: cud1: (string) \012
18: cuf: (string) \033[%p1%dC
19: cuf1: (string) \033[C
20: cup: (string) \033[%i%p1%d;%p2%dH
21: cuu: (string) \033[%p1%dA
22: cuu1: (string) \033[A
23: dch: [missing]
24: dch1: [missing]
25: dim: [missing]
26: dl: (string) \033[%p1%dM
27: dl1: (string) \033[M
28: E3: [missing]
29: el: (string) \033[K
30: el1: (string) \033[1K
31: enacs: (string) \033(B\033)0
32: fsl: (string) \007
33: home: (string) \033[H
34: hpa: (string) \033[%i%p1%dG
35: ich: (string) \033[%p1%d@
36: ich1: (string) \033[@
37: il: (string) \033[%p1%dL
38: il1: (string) \033[L
39: invis: [missing]
40: is1: (string) \033[?47l\033=\033[?1l
   [75/137]
41: is2: (string) \033[r\033[m\033[2J\033[H\033[?7h\033[?1;3;4;6l\033[4l
42: is3: [missing]
43: kcbt: (string) \033[Z
44: kcub1: (string) \033[D
45: kcud1: (string) \033[B
46: kcuf1: (string) \033[C
47: kcuu1: (string) \033[A
48: kDC: (string) \033[3$
49: kDC3: [missing]
50: kDC4: [missing]
51: kDC5: (string) \033[3^
52: kDC6: (string) \033[3@
53: kDC7: [missing]
54: kdch1: (string) \033[3~
55: kDN: (string) \033[b
56: kDN3: [missing]
57: kDN4: [missing]
58: kDN5: (string) \033Ob
59: kDN6: [missing]
60: kDN7: [missing]
61: kend: (string) \033[8~
62: kEND: (string) \033[8$
63: kEND3: [missing]
64: kEND4: [missing]
65: kEND5: (string) \033[8^
66: kEND6: (string) \033[8@
67: kEND7: [missing]
68: kf1: (string) \033[11~
69: kf10: (string) \033[21~
70: kf11: (string) \033[23~
71: kf12: (string) \033[24~
72: kf13: (string) \033[25~
73: kf14: (string) \033[26~
74: kf15: (string) \033[28~
75: kf16: (string) \033[29~
76: kf17: (string) \033[31~
77: kf18: (string) \033[32~
78: kf19: (string) \033[33~
79: kf2: (string) \033[12~
80: kf20: (string) \033[34~
81: kf3: (string) \033[13~
82: kf4: (string) \033[14~
83: kf5: (string) \033[15~
84: kf6: (string) \033[17~
85: kf7: (string) \033[18~
86: kf8: (string) \033[19~
87: kf9: (string) \033[20~
88: kHOM: (string) \033[7$
89: kHOM3: [missing]
90: kHOM4: [missing]
91: kHOM5: (string) \033[7^
92: kHOM6: (string) \033[7@
93: kHOM7: [missing]
94: khome: (string) \033[7~
95: kIC: (string) \033[2$
96: kIC3: [missing]
97: kIC4: [missing]
98: kIC5: (string) \033[2^
99: kIC6: (string) \033[2@
100: kIC7: [missing]
101: kich1: (string) \033[2~
102: kLFT: (string) \033[d
103: kLFT3: [missing]
104: kLFT4: [missing]
105: kLFT5: (string) \033Od
106: kLFT6: [missing]
107: kLFT7: [missing]
108: kmous: (string) \033[M
109: knp: (string) \033[6~
110: kNXT: (string) \033[6$
111: kNXT3: [missing]
112: kNXT4: [missing]
113: kNXT5: (string) \033[6^
114: kNXT6: (string) \033[6@
115: kNXT7: [missing]
116: kpp: (string) \033[5~
117: kPRV: (string) 

GAGNANT(E) MICROSOFT 2012

2012-09-26 Thread BILL GATES FONDATION

Honorable lauréat(e),
Ceci n'est pas un virus ni un spam, nous  vous  contactons par cette missive
afin de vous informer de votre Gain de 250.000 euros (Deux Cent Cinquante
Mille Euros) de la loterie BILL GATES FONDATION.
Veuillez compléter le formulaire ci dessous  et contacter  l'autorité chargée
de votre remise de gain.

NOM:.
PRENOM:..
TELEPHONE:...
PAYS:
PROFESSION:.


CONTACT HUISSIER
MAITRE KARL JONES DAY
Téléphone : 0044 704 570 2287 / FAX: 0044 703 182 0617
Email :avocatgatesfondat...@mail.mn


Cordialement.
CHRISTOPHER BOSWELL
Du conseil de la loterie
BILL GATES FONDATION



Re: tmux: create window failed (too many open files)

2012-09-26 Thread Sébastien Marie
Hi,

After some tests (on a new tmux server, started with tmux -L test ...), I 
could (partially) reproduce the problem.

Partially, because:
 in fstat output there are 2 kinds of bugged entries: tty and null
  tty:  181 descriptors
  null: 320 descriptors

And I arrived to keep descriptors opened against /dev/tty , but not against 
/dev/null (for the moment, but I monitor what in my use what generate this...).

This occurs with urlview (textproc/urlview), with a custom url_handler.

Basically urlview take a text in stdin (generally an email), and display a menu 
(ncurses) of URLs found in the text. The user choose an URL, and urlview start 
a command (in my case, a custom script).

First, my configuration:
$ cat ~/.urlview
# command to invoke for selected URL
COMMAND /home/semarie/.local/bin/urlview_handler.sh

Next, the command started by urlview:
$ cat /home/semarie/.local/bin/urlview_handler.sh
#!/bin/sh

# if TMUX enable, update environment
if [ -n ${TMUX} ] ; then
  eval  `tmux show-environment | grep -v '^-' | sed 's/=\(.*\)$/=\\1\/'`
  unset `tmux show-environment | grep'^-' | sed 's/^-//'`
  export `tmux show-environment | grep -v '^-' | sed 's/=\(.*\)$//'`
fi

# check DISPLAY
if [ -n ${DISPLAY} ] ; then
  exec chrome $@
fi

# if not DISPLAY
exec lynx $@



And when I launch the command:
$ echo 'http://www.openbsd.org/' | urlview

3 new descriptors against tty are opened and not closed after the command. 
There are directly correlate with the 3 tmux show-environment in the script.

I don't remind exactly the purpose of updating the environnement in the 
script... should be to keep kerberos ticket or display environnement in 
text-mode ... but ?

Additionnaly, running the url_hander alone (without urlview) don't trigger the 
problem.

I will disabling the part of updating environment in my script (and if I 
always need it, I will recall when something won't work !)

I will post when I have more info.

Please let me known if more informations are needed.

Thanks.
-- 
Sebastien Marie



Re: Favorite IDE for C programming on OpenBSD

2012-09-26 Thread Giovanni Bechis
Joel Rees j...@alpsgiken.gr.jp wrote:
 Anyone tried Kylix under Linux emulation?  ;-
 
I tried an old version and it worked, if I remember correctly it was
OpenBSD 3.8.
 Cheers
  Giovanni



Re: tmux: create window failed (too many open files)

2012-09-26 Thread Nicholas Marriott
Try this please:

Index: server-client.c
===
RCS file: /cvs/src/usr.bin/tmux/server-client.c,v
retrieving revision 1.79
diff -u -p -r1.79 server-client.c
--- server-client.c 3 Sep 2012 09:32:38 -   1.79
+++ server-client.c 26 Sep 2012 14:42:04 -
@@ -912,8 +912,10 @@ server_client_msg_identify(
return;
}
 
-   if (!isatty(fd))
-   return;
+   if (!isatty(fd)) {
+   close(fd);
+   return;
+   }
data-term[(sizeof data-term) - 1] = '\0';
tty_init(c-tty, c, fd, data-term);
if (data-flags  IDENTIFY_UTF8)


On Wed, Sep 26, 2012 at 01:40:53PM +0200, S?bastien Marie wrote:
 Hi,
 
 After some tests (on a new tmux server, started with tmux -L test ...), I 
 could (partially) reproduce the problem.
 
 Partially, because:
  in fstat output there are 2 kinds of bugged entries: tty and null
   tty:  181 descriptors
   null: 320 descriptors
 
 And I arrived to keep descriptors opened against /dev/tty , but not against 
 /dev/null (for the moment, but I monitor what in my use what generate 
 this...).
 
 This occurs with urlview (textproc/urlview), with a custom url_handler.
 
 Basically urlview take a text in stdin (generally an email), and display a 
 menu (ncurses) of URLs found in the text. The user choose an URL, and urlview 
 start a command (in my case, a custom script).
 
 First, my configuration:
 $ cat ~/.urlview
 # command to invoke for selected URL
 COMMAND /home/semarie/.local/bin/urlview_handler.sh
 
 Next, the command started by urlview:
 $ cat /home/semarie/.local/bin/urlview_handler.sh
 #!/bin/sh
 
 # if TMUX enable, update environment
 if [ -n ${TMUX} ] ; then
   eval  `tmux show-environment | grep -v '^-' | sed 's/=\(.*\)$/=\\1\/'`
   unset `tmux show-environment | grep'^-' | sed 's/^-//'`
   export `tmux show-environment | grep -v '^-' | sed 's/=\(.*\)$//'`
 fi
 
 # check DISPLAY
 if [ -n ${DISPLAY} ] ; then
   exec chrome $@
 fi
 
 # if not DISPLAY
 exec lynx $@
 
 
 
 And when I launch the command:
 $ echo 'http://www.openbsd.org/' | urlview
 
 3 new descriptors against tty are opened and not closed after the command. 
 There are directly correlate with the 3 tmux show-environment in the script.
 
 I don't remind exactly the purpose of updating the environnement in the 
 script... should be to keep kerberos ticket or display environnement in 
 text-mode ... but ?
 
 Additionnaly, running the url_hander alone (without urlview) don't trigger 
 the problem.
 
 I will disabling the part of updating environment in my script (and if I 
 always need it, I will recall when something won't work !)
 
 I will post when I have more info.
 
 Please let me known if more informations are needed.
 
 Thanks.
 -- 
 Sebastien Marie



Re: openbsd router performance (i know.. again)

2012-09-26 Thread noah pugsley
What is your performance like with -current and no knob twisting?

On Wed, Sep 26, 2012 at 4:45 AM, rik rikc...@gmail.com wrote:

 Hi,
 I'm a happy Openbsd user; we've beeing using it since 2001 as
 router/firewall in our datacenter facility (we host as ONG some no profit
 project and website).
 At the moment we're using a couple of SuperMicro with the following specs:
 OpenBSD 5.0 (GENERIC.MP) #59: Wed Aug 17 10:19:44 MDT 2011
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
 cpu0: Intel(R) Pentium(R) 4 CPU 3.00GHz (GenuineIntel 686-class) 2.98 GHz
 cpu0:

 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,
 MWAIT,DS-CPL,CNXT-ID,CX16,xTPR,PDCM
 real mem  = 3890663424 (3710MB)
 avail mem = 3816964096 (3640MB)
 ppb3 at pci0 dev 28 function 4 Intel 82801G PCIE rev 0x01: apic 2 int 17
 em0 at pci4 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: msi,
 address 00:30:xx:xx:xx:xx
 ppb4 at pci0 dev 28 function 5 Intel 82801G PCIE rev 0x01: apic 2 int 16
 em1 at pci5 dev 0 function 0 Intel PRO/1000MT (82573L) rev 0x00: msi,
 address 00:30:xx:xx:xx:xx

 the netcard are on-board.
 Unfortunately we're a bit straggling with the performances as we have
 almost 100% interrupt with 110Mbps and 12k pps
 We've already increased net.inet.ip.ifq.maxlen to 500 in order to avoid
 packet loss and also disabling pf has no influence.
 Do you think these performances are fair and we have to upgrade to better
 hardware to have higher pps and Mpbs?
 Beside trying to upgrade to the last stable and not use MP we have no idea
 how to procede
 Thanks for your help
 Alessandro



Re: tmux: create window failed (too many open files)

2012-09-26 Thread Sébastien Marie
The patch seems to resolv the problem.

Only seems, because I only known to reproduce it for the 'tty' descriptor, but 
I hope the 'null' descriptor will be in the same case :-)

But I will use this version for test it.

Thanks a lot.
-- 
Sebastien Marie

On Wed, Sep 26, 2012 at 03:42:23PM +0100, Nicholas Marriott wrote:
 Try this please:
 
 Index: server-client.c
 ===
 RCS file: /cvs/src/usr.bin/tmux/server-client.c,v
 retrieving revision 1.79
 diff -u -p -r1.79 server-client.c
 --- server-client.c   3 Sep 2012 09:32:38 -   1.79
 +++ server-client.c   26 Sep 2012 14:42:04 -
 @@ -912,8 +912,10 @@ server_client_msg_identify(
   return;
   }
  
 - if (!isatty(fd))
 - return;
 + if (!isatty(fd)) {
 + close(fd);
 + return;
 + }
   data-term[(sizeof data-term) - 1] = '\0';
   tty_init(c-tty, c, fd, data-term);
   if (data-flags  IDENTIFY_UTF8)
 
 
 On Wed, Sep 26, 2012 at 01:40:53PM +0200, S?bastien Marie wrote:
  Hi,
  
  After some tests (on a new tmux server, started with tmux -L test ...), I 
  could (partially) reproduce the problem.
  
  Partially, because:
   in fstat output there are 2 kinds of bugged entries: tty and null
tty:  181 descriptors
null: 320 descriptors
  
  And I arrived to keep descriptors opened against /dev/tty , but not against 
  /dev/null (for the moment, but I monitor what in my use what generate 
  this...).
  
  This occurs with urlview (textproc/urlview), with a custom url_handler.
  
  Basically urlview take a text in stdin (generally an email), and display a 
  menu (ncurses) of URLs found in the text. The user choose an URL, and 
  urlview start a command (in my case, a custom script).
  
  First, my configuration:
  $ cat ~/.urlview
  # command to invoke for selected URL
  COMMAND /home/semarie/.local/bin/urlview_handler.sh
  
  Next, the command started by urlview:
  $ cat /home/semarie/.local/bin/urlview_handler.sh
  #!/bin/sh
  
  # if TMUX enable, update environment
  if [ -n ${TMUX} ] ; then
eval  `tmux show-environment | grep -v '^-' | sed 's/=\(.*\)$/=\\1\/'`
unset `tmux show-environment | grep'^-' | sed 's/^-//'`
export `tmux show-environment | grep -v '^-' | sed 's/=\(.*\)$//'`
  fi
  
  # check DISPLAY
  if [ -n ${DISPLAY} ] ; then
exec chrome $@
  fi
  
  # if not DISPLAY
  exec lynx $@
  
  
  
  And when I launch the command:
  $ echo 'http://www.openbsd.org/' | urlview
  
  3 new descriptors against tty are opened and not closed after the 
  command. There are directly correlate with the 3 tmux show-environment in 
  the script.
  
  I don't remind exactly the purpose of updating the environnement in the 
  script... should be to keep kerberos ticket or display environnement in 
  text-mode ... but ?
  
  Additionnaly, running the url_hander alone (without urlview) don't trigger 
  the problem.
  
  I will disabling the part of updating environment in my script (and if I 
  always need it, I will recall when something won't work !)
  
  I will post when I have more info.
  
  Please let me known if more informations are needed.
  
  Thanks.
  -- 
  Sebastien Marie



Re: Backing up an Android phone to an OpenBSD laptop

2012-09-26 Thread Raymond Lillard

On 09/25/2012 11:25 PM, Robert Connolly wrote:

Hello.

I'm just looking for advice, not a howto. I realize this is not an OpenBSD
specific topic, but since I'm trying to get Linux and OpenBSD to cooperate,
anyone I ask for advice will refer me elsewhere.

I want to do backups of my Android phone whenever it is at home. The best
software package I know of for this is rsync. I own an ARM development
system (a Trim Slice), running Linux, and can therefore compile anything I
want for the Android phone (statically linked). I have a couple options,
that I can think of:

Run rsync's daemon on the phone, from a boot script. Configure hotplugd on
OpenBSD to run an rsync client when the phone connects via USB. I like this
idea because it reduces needed privileges on my laptop... I trust the phone
less than my laptop, so I would rather give my laptop access to the phone
than my phone access to my laptop. I dislike this idea because the phone
uses 5 watts while charging, and I would prefer to charge it from a
household outlet to reduce load on the laptop.

The second option is to run rsync's deamon on my laptop, and rsync from the
phone via an ifup script that checks the SSID. This works nice because I
can charge the phone from an outlet, and do the rsync wirelessly. This is
harder to secure though, because I would want the rsync client to have no
other access to my laptop.

Am I missing other considerations? Which of these two options is better?



There is an rsync client app in available for download.  I have used it
to sync to OBSD for over a year without a problem.



Re: tmux: create window failed (too many open files)

2012-09-26 Thread Sébastien Marie
ok, I found why I have some 'null' descriptors... it nears the same case that 
with 'tty' descriptors.

I have a custom script (again) for X11 locking, that first destroy kerberos 
tickets. And I use tmux show-environment for get KRB5CCNAME environment 
variable that I used in the tmux session.

As the script is run by cwm, the input descriptor should be /dev/null.

The patch resolvs all the problem.

For simple test, this command could be used:
$ tmux info  /dev/null

This will dup the descriptor in the tmux server, and it will not close it. So 
after some time, too many descriptors are opened...

Thanks again.
-- 
Sebastien Marie

On Wed, Sep 26, 2012 at 05:19:56PM +0200, Sébastien Marie wrote:
 The patch seems to resolv the problem.
 
 Only seems, because I only known to reproduce it for the 'tty' descriptor, 
 but I hope the 'null' descriptor will be in the same case :-)
 
 But I will use this version for test it.
 
 Thanks a lot.
 -- 
 Sebastien Marie
 
 On Wed, Sep 26, 2012 at 03:42:23PM +0100, Nicholas Marriott wrote:
  Try this please:
  
  Index: server-client.c
  ===
  RCS file: /cvs/src/usr.bin/tmux/server-client.c,v
  retrieving revision 1.79
  diff -u -p -r1.79 server-client.c
  --- server-client.c 3 Sep 2012 09:32:38 -   1.79
  +++ server-client.c 26 Sep 2012 14:42:04 -
  @@ -912,8 +912,10 @@ server_client_msg_identify(
  return;
  }
   
  -   if (!isatty(fd))
  -   return;
  +   if (!isatty(fd)) {
  +   close(fd);
  +   return;
  +   }
  data-term[(sizeof data-term) - 1] = '\0';
  tty_init(c-tty, c, fd, data-term);
  if (data-flags  IDENTIFY_UTF8)



Re: openbsd router performance (i know.. again)

2012-09-26 Thread rik
Hi,
at the moment we have the default configuration, beside the increase of
net.inet.ip.ifq.maxlen to 500 (I trust OpenBSD programmers more than I
trust myself about tuning).
I haven't had yet the opportunity to upgrade it to -current, I'll do in the
next few days.
Just a small punctualization about the pps, I have 22-24k in total, 10-12k
per card (internet facing and LAN facing)
Thanks again
Alessandro


On Wed, Sep 26, 2012 at 5:31 PM, noah pugsley noah.pugs...@gmail.comwrote:

 What is your performance like with -current and no knob twisting?

 On Wed, Sep 26, 2012 at 4:45 AM, rik rikc...@gmail.com wrote:

 Hi,
 I'm a happy Openbsd user; we've beeing using it since 2001 as
 router/firewall in our datacenter facility (we host as ONG some no profit
 project and website).
 At the moment we're using a couple of SuperMicro with the following specs:
 OpenBSD 5.0 (GENERIC.MP) #59: Wed Aug 17 10:19:44 MDT 2011
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
 cpu0: Intel(R) Pentium(R) 4 CPU 3.00GHz (GenuineIntel 686-class) 2.98
 GHz
 cpu0:

 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,
 MWAIT,DS-CPL,CNXT-ID,CX16,xTPR,PDCM
 real mem  = 3890663424 (3710MB)
 avail mem = 3816964096 (3640MB)
 ppb3 at pci0 dev 28 function 4 Intel 82801G PCIE rev 0x01: apic 2 int 17
 em0 at pci4 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: msi,
 address 00:30:xx:xx:xx:xx
 ppb4 at pci0 dev 28 function 5 Intel 82801G PCIE rev 0x01: apic 2 int 16
 em1 at pci5 dev 0 function 0 Intel PRO/1000MT (82573L) rev 0x00: msi,
 address 00:30:xx:xx:xx:xx

 the netcard are on-board.
 Unfortunately we're a bit straggling with the performances as we have
 almost 100% interrupt with 110Mbps and 12k pps
 We've already increased net.inet.ip.ifq.maxlen to 500 in order to avoid
 packet loss and also disabling pf has no influence.
 Do you think these performances are fair and we have to upgrade to better
 hardware to have higher pps and Mpbs?
 Beside trying to upgrade to the last stable and not use MP we have no idea
 how to procede
 Thanks for your help
 Alessandro



Re: Favorite IDE for C programming on OpenBSD

2012-09-26 Thread Francisco Valladolid H.
Hi,
VIM is the reply.!

Regards.

On Wed, Sep 26, 2012 at 8:34 AM, Giovanni Bechis giova...@bigio.snb.it wrote:
 Joel Rees j...@alpsgiken.gr.jp wrote:
 Anyone tried Kylix under Linux emulation?  ;-

 I tried an old version and it worked, if I remember correctly it was
 OpenBSD 3.8.
  Cheers
   Giovanni




-- 
Francisco Valladolid H.
 -- http://blog.bsdguy.net - Jesus Christ follower.



Excelente curso: Plan de Desarrollo para Capacitadores

2012-09-26 Thread Ma. del Mar M. Navarro
Apreciable Ejecutivo:

TIEM de México
Empresa Líder en Capacitación y Actualización de Capital Humano

Debido al gran éxito obtenido, ponemos nuevamente a su disposición este
excelente curso denominado:
“Plan de Desarrollo para Capacitadores”



Ciudad de México, 09 y 10 de Octubre de 2012

Inscríbase 5 días antes de la fecha del Curso y obtenga un descuento del 15%
con Inversión Inmediata
Además por cada dos participantes inscritos en tarifa de Inversión normal, el
tercero es completamente gratis

No deje pasar esta oportunidad e Invierta en su Desarrollo Personal y
Profesional

Toda estrategia de crecimiento en cualquier organización requiere de un
sistema eficaz de capacitación, dentro del cual la especialización de expertos
en los centros de trabajo juega un papel primordial para su desarrollo.

Al optimizar las técnicas y mecanismos de adquisición de conocimientos,
desarrollo de habilidades, e incorporación de actitudes que modifiquen la
conducta, así como la generación de la creatividad eficaz, se provocara el
desarrollo de tecnología y productividad a través de la capacitación interna.

Este Plan de Desarrollo para Capacitadores, responde a esta vital necesidad.

Beneficios:
Los participantes serán capaces de impartir cursos presenciales con una
metodología que:

Garantice la asimilación de información y el desarrollo de habilidades
Asegure la satisfacción de sus capacitandos como resultado de una impartición
ágil y amena, orientada a los objetivos de aprendizaje.
Aprenderán a conducir exitosamente cursos de capacitación de su especialidad
de acuerdo a un modelo activo de enseñanza-aprendizaje y con un alto nivel de
calidad.
Objetivos:

Conocerán los fundamentos teóricos del proceso enseñanza-aprendizaje de
adultos
Desarrollarán las habilidades que les permita:
Preparar sesiones de cursos presenciales
Conducir cursos de capacitación presenciales
Evaluar cursos de capacitación presencial
Dirigido a:
Gerentes, supervisores, encargados del departamento de capacitación y todas
aquellas personas que entre sus actividades cotidianas impartan capacitación e
instrucciones para trabajo.

Duración: 16 horas

Para mayor información, favor de responder este correo con los siguientes
datos:
• Empresa:
• Nombre:
• Ciudad:
• Teléfono:

O si lo prefiere comuníquese a los teléfonos:

Del DF al 5611-0969 con 10 líneas
Interior del País Lada sin Costo
01 800 900 TIEM (8436)
Aceptamos todas las TDC y Débito.
**Promoción: 3 meses sin Intereses pagando con American Express
**Aplica solo con Inversión Normal

®Todos los Derechos Reservados ©2011 TIEM Talento e Innovación Empresarial de
México
Este Mensaje le ha sido enviado como usuario de TIEM de México o bien un
usuario le refirió para recibir este boletín.
Como usuario de TIEM de México, en este acto autoriza de manera expresa que
TIEM de México le puede contactar vía correo electrónico u otros medios.
Si usted ha recibido este mensaje por error, haga caso omiso de él y reporte
su cuenta respondiendo este correo con el subject BAJABD
Tenga en cuenta que la gestión de nuestras bases de datos es de suma
importancia y no es intención de la empresa la inconformidad del receptor.



Re: openbsd router performance (i know.. again)

2012-09-26 Thread Yusof Khalid - FreeBSD / OpenBSD
Hi list,

Any happy ALIX user here ? I plan to deploy alix board on 2 of my client..
currently serving as gateway/firewall/squid and a little bit of samba.

On Thu, Sep 27, 2012 at 4:05 AM, rik rikc...@gmail.com wrote:

 Hi,
 at the moment we have the default configuration, beside the increase of
 net.inet.ip.ifq.maxlen to 500 (I trust OpenBSD programmers more than I
 trust myself about tuning).
 I haven't had yet the opportunity to upgrade it to -current, I'll do in the
 next few days.
 Just a small punctualization about the pps, I have 22-24k in total, 10-12k
 per card (internet facing and LAN facing)
 Thanks again
 Alessandro


 On Wed, Sep 26, 2012 at 5:31 PM, noah pugsley noah.pugs...@gmail.com
 wrote:

  What is your performance like with -current and no knob twisting?
 
  On Wed, Sep 26, 2012 at 4:45 AM, rik rikc...@gmail.com wrote:
 
  Hi,
  I'm a happy Openbsd user; we've beeing using it since 2001 as
  router/firewall in our datacenter facility (we host as ONG some no
 profit
  project and website).
  At the moment we're using a couple of SuperMicro with the following
 specs:
  OpenBSD 5.0 (GENERIC.MP) #59: Wed Aug 17 10:19:44 MDT 2011
  dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
  cpu0: Intel(R) Pentium(R) 4 CPU 3.00GHz (GenuineIntel 686-class) 2.98
  GHz
  cpu0:
 
 
 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,
  MWAIT,DS-CPL,CNXT-ID,CX16,xTPR,PDCM
  real mem  = 3890663424 (3710MB)
  avail mem = 3816964096 (3640MB)
  ppb3 at pci0 dev 28 function 4 Intel 82801G PCIE rev 0x01: apic 2 int
 17
  em0 at pci4 dev 0 function 0 Intel PRO/1000MT (82573E) rev 0x03: msi,
  address 00:30:xx:xx:xx:xx
  ppb4 at pci0 dev 28 function 5 Intel 82801G PCIE rev 0x01: apic 2 int
 16
  em1 at pci5 dev 0 function 0 Intel PRO/1000MT (82573L) rev 0x00: msi,
  address 00:30:xx:xx:xx:xx
 
  the netcard are on-board.
  Unfortunately we're a bit straggling with the performances as we have
  almost 100% interrupt with 110Mbps and 12k pps
  We've already increased net.inet.ip.ifq.maxlen to 500 in order to avoid
  packet loss and also disabling pf has no influence.
  Do you think these performances are fair and we have to upgrade to
 better
  hardware to have higher pps and Mpbs?
  Beside trying to upgrade to the last stable and not use MP we have no
 idea
  how to procede
  Thanks for your help
  Alessandro




-- 
--
7.2-RELEASE-p6



Re: Is anyone receiving mailing at andy@ ?

2012-09-26 Thread Guy Hunter
I ordered clothes recently and only received an update once the items 
had shipped.
This was 3 weeks after I placed the initial order.  Maybe the clothing 
is made as

required, I'm not sure.

But I suggest waiting a little longer.

On 26/09/2012 23:48, Pierre ANCELOT wrote:

Is anyone receiving mailing at andy@ ?

I ordered a T-Shirt the 18th, we are day 26 and I didn't receive an
update about it.
Is it normal or am I being impatient?

Thanks.




Re: openbsd router performance (i know.. again)

2012-09-26 Thread Sean Kamath
On Sep 26, 2012, at 6:01 PM, Yusof Khalid - FreeBSD / OpenBSD
frysha...@gmail.com wrote:

 Hi list,

 Any happy ALIX user here ? I plan to deploy alix board on 2 of my client..
 currently serving as gateway/firewall/squid and a little bit of samba.

Search the mail archives for raves about Alix boards (and others).

Sean