Re: OpenBSD proxy aka. port forwarding

2014-06-03 Thread Predrag Punosevac
Giancarlo Razzolini  wrote:

> Em 03-06-2014 18:45, Predrag Punosevac escreveu:
> > I am trying to configure our OpenBSD shell gateway as a proxy for X2Go
> > clients. Obviously by default port forwarding on privileged ports as
> > well as X11 forwarding is disabled. I read through man pages for
> > sshd_config but I am still not clear how should I edit them to enable
> > that a  regular can use their  LDAP account to log into shell gateway
> > which will proxy ssh connection to one of internal computing nodes.
> > The idea is to let people use X2Go clients with shell gateway as a
> > proxy to log into internal computing nodes and being able to run
> > MATLAB with GUI.
> >
> > Predrag
> >
> Your e-mail was a little confusing. Since x2go runs on top of ssh
> itself, and OpenBSD do not have a port of it, I'm presuming you have a
> x2go server running linux, behind your internet exposed OpenBSD gateway.

Correct! X2Go servers (30 of them) run on Linux computing nodes which
are accessible only via OpenBSD ssh gateway.

> Your life might be a lot easier if your clients login directly to your
> x2go server. All you need is to do is use pf and rdr your clients to the
> internal machine. If you have more than one x2go server, you might want
> to take a look at the relayd(8) daemon. It has functionality for doing
> ssh forwarding, with failover and round-robin capabilities.
> 


I am going to answer my own question. I have not been able to use
OpenBSD shell gateway as a proxy from the X2Go client probably due to
the fact that only root can do forwarding on privilaged ports.

However combining 

ssh -L 8080:x2goserver.int.mydomain.org:22 shell.mydomain.org

With editing /etc/ssh/sshd_config 

GSSAPIAuthentication yes
AllowAgentForwarding yes
AllowTcpForwarding yes
X11Forwarding yes

And pointing x2go client on my local machine to 

localhost:8080

I had no problem running MATLAB on the remote computing node and having
it GUI displayed locally on my desktop. 


Cheers,
Predrag



Re: OpenBSD proxy aka. port forwarding

2014-06-03 Thread Predrag Punosevac
Giancarlo Razzolini  wrote:

> Em 03-06-2014 18:45, Predrag Punosevac escreveu:
> > I am trying to configure our OpenBSD shell gateway as a proxy for X2Go
> > clients. Obviously by default port forwarding on privileged ports as
> > well as X11 forwarding is disabled. I read through man pages for
> > sshd_config but I am still not clear how should I edit them to enable
> > that a  regular can use their  LDAP account to log into shell gateway
> > which will proxy ssh connection to one of internal computing nodes.
> > The idea is to let people use X2Go clients with shell gateway as a
> > proxy to log into internal computing nodes and being able to run
> > MATLAB with GUI.
> >
> > Predrag
> >
> Your e-mail was a little confusing. Since x2go runs on top of ssh
> itself, and OpenBSD do not have a port of it, I'm presuming you have a
> x2go server running linux, behind your internet exposed OpenBSD gateway.

Correct! X2Go servers (30 of them) run on Linux computing nodes which
are accessible only via OpenBSD ssh gateway.

> Your life might be a lot easier if your clients login directly to your
> x2go server. All you need is to do is use pf and rdr your clients to the
> internal machine. If you have more than one x2go server, you might want
> to take a look at the relayd(8) daemon. It has functionality for doing
> ssh forwarding, with failover and round-robin capabilities.
> 

I do not want to mess with relayd and more advanced capabilities you are
talking about. Namely most users ssh to shell gateway with the intent of
sshing to one of computing nodes and running some scripts.  They usually
select computing node by checking status page of my lab first which
displays current loads (CPU, memory etc) of all computing nodes. Only in
exceptional circumstances they use X2Go client and gateway as a proxy to
X2Go servers when they want to do some visualization in MATLAB for
example or in R/Python.

I have to compute diff of sshd_config files from OpenBSD and Red Hat
because their sshd_config allows the set up I am talking about out of
box as many other things which pose high security risk.

Predrag

> Cheers,
> 
> -- 
> Giancarlo Razzolini
> GPG: 4096R/77B981BC



Re: OpenBSD proxy aka. port forwarding

2014-06-03 Thread Giancarlo Razzolini
Em 03-06-2014 18:45, Predrag Punosevac escreveu:
> I am trying to configure our OpenBSD shell gateway as a proxy for X2Go
> clients. Obviously by default port forwarding on privileged ports as
> well as X11 forwarding is disabled. I read through man pages for
> sshd_config but I am still not clear how should I edit them to enable
> that a  regular can use their  LDAP account to log into shell gateway
> which will proxy ssh connection to one of internal computing nodes.
> The idea is to let people use X2Go clients with shell gateway as a
> proxy to log into internal computing nodes and being able to run
> MATLAB with GUI.
>
> Predrag
>
Your e-mail was a little confusing. Since x2go runs on top of ssh
itself, and OpenBSD do not have a port of it, I'm presuming you have a
x2go server running linux, behind your internet exposed OpenBSD gateway.
Your life might be a lot easier if your clients login directly to your
x2go server. All you need is to do is use pf and rdr your clients to the
internal machine. If you have more than one x2go server, you might want
to take a look at the relayd(8) daemon. It has functionality for doing
ssh forwarding, with failover and round-robin capabilities.

Cheers,

-- 
Giancarlo Razzolini
GPG: 4096R/77B981BC



OpenBSD proxy aka. port forwarding

2014-06-03 Thread Predrag Punosevac
I am trying to configure our OpenBSD shell gateway as a proxy for X2Go
clients. Obviously by default port forwarding on privileged ports as
well as X11 forwarding is disabled. I read through man pages for
sshd_config but I am still not clear how should I edit them to enable
that a  regular can use their  LDAP account to log into shell gateway
which will proxy ssh connection to one of internal computing nodes.
The idea is to let people use X2Go clients with shell gateway as a
proxy to log into internal computing nodes and being able to run
MATLAB with GUI.

Predrag



Re: Contributing to OpenBSD documentation

2014-06-03 Thread Enric Morales
Hi Mark, Anders,

On 03 Jun 2014 12:40, Marc Espie wrote:
> Find stuff that doesn't work properly and figure out what's going on.
> 
> Even without code, complete *reproduceable* bug reports are invaluable
> resources.
> 
> (hint: anything that dumps cores is a bug).

I too was trying to find areas where I can help. The first one was
buying a couple of T-shirts (i just received an opensource-ami and a
wireframe blowfish) but thanks to your message, Mark, I'll send some
core dumps I had lying around. Specifically, firefox and some other apps
were coredumping quite often (not sure the coredumps can be tied to
OpenBSD, though), but I'll surely keep an eye on that.

Cheers,


-- 
Enric Morales




Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Raf Czlonka
On Tue, Jun 03, 2014 at 05:56:50PM BST, Johan Svensson wrote:

> I can successfully run this command:
> if i use audioctl1 instead of audio1 it works, i dont know why tho.
> 
> # audioctl -f /dev/audioctl1
> [...]

That's because, instead of providing audio device to the '-f' option,
you need to provide audio *control* device.

man 1 audioctl

Regards,

Raf



Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Johan Svensson

On 06/03/14 20:08, Alexandre Ratchov wrote:

On Tue, Jun 03, 2014 at 07:59:49PM +0200, Johan Svensson wrote:

On 06/03/14 19:33, Alexandre Ratchov wrote:

On Tue, Jun 03, 2014 at 07:25:25PM +0200, Alexandre Ratchov wrote:

sndiod_flags="-f rsnd/1 -f rsnd/0"

This will kind of "exchange" the first two devices. I.e. this
exposes "snd/0" as sub-device of "rsnd/1" and "snd/1" as sub-device
of "rsnd/0".


If device renumbering seems confusing/ugly, another option would be
to keep the kernel order:

sndiod_flags="-f rsnd/0 -f rsnd/1"

then export AUDIODEVICE=snd/1 in your ~/.profile or equivalent

-- Alexandre

grep sndiod /etc/rc.conf.local
#sndiod_flags="-f rsnd/0 -s onboard -f rsnd/1 -s default"
sndiod_flags="-f rsnd/1 -f rsnd/0"
#sndiod_flags="-f rsnd/0 -f rsnd/1"

I've tried all three of the settings, the first and the last defaults to
builtin soundcard. But if I use the second configuration setting this shows
up in dmesg:

ehci0: Error opening low/full speed isoc endpoint.
A low/full speed device is attached to a USB2 hub, and transaction
translations are not yet supported.
Reattach the device to the root hub instead.
uaudio_chan_open: error creating pipe: err=INVAL endpt=0x03


the usb stack is incomplete and doesn't support rate matching hubs
yet; sorry your sound card can't work on this machine yet.

recently discussed here:

http://comments.gmane.org/gmane.os.openbsd.misc/212991

-- Alexandre

Okey, that explains it. Thanks for your help.

/Johan



Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Alexandre Ratchov
On Tue, Jun 03, 2014 at 07:59:49PM +0200, Johan Svensson wrote:
> On 06/03/14 19:33, Alexandre Ratchov wrote:
> >On Tue, Jun 03, 2014 at 07:25:25PM +0200, Alexandre Ratchov wrote:
> >>sndiod_flags="-f rsnd/1 -f rsnd/0"
> >>
> >>This will kind of "exchange" the first two devices. I.e. this
> >>exposes "snd/0" as sub-device of "rsnd/1" and "snd/1" as sub-device
> >>of "rsnd/0".
> >>
> >If device renumbering seems confusing/ugly, another option would be
> >to keep the kernel order:
> >
> >sndiod_flags="-f rsnd/0 -f rsnd/1"
> >
> >then export AUDIODEVICE=snd/1 in your ~/.profile or equivalent
> >
> >-- Alexandre
> grep sndiod /etc/rc.conf.local
> #sndiod_flags="-f rsnd/0 -s onboard -f rsnd/1 -s default"
> sndiod_flags="-f rsnd/1 -f rsnd/0"
> #sndiod_flags="-f rsnd/0 -f rsnd/1"
> 
> I've tried all three of the settings, the first and the last defaults to
> builtin soundcard. But if I use the second configuration setting this shows
> up in dmesg:
> 
> ehci0: Error opening low/full speed isoc endpoint.
> A low/full speed device is attached to a USB2 hub, and transaction
> translations are not yet supported.
> Reattach the device to the root hub instead.
> uaudio_chan_open: error creating pipe: err=INVAL endpt=0x03
> 

the usb stack is incomplete and doesn't support rate matching hubs
yet; sorry your sound card can't work on this machine yet.

recently discussed here:

http://comments.gmane.org/gmane.os.openbsd.misc/212991

-- Alexandre



Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Johan Svensson

On 06/03/14 19:33, Alexandre Ratchov wrote:

On Tue, Jun 03, 2014 at 07:25:25PM +0200, Alexandre Ratchov wrote:

sndiod_flags="-f rsnd/1 -f rsnd/0"

This will kind of "exchange" the first two devices. I.e. this
exposes "snd/0" as sub-device of "rsnd/1" and "snd/1" as sub-device
of "rsnd/0".


If device renumbering seems confusing/ugly, another option would be
to keep the kernel order:

sndiod_flags="-f rsnd/0 -f rsnd/1"

then export AUDIODEVICE=snd/1 in your ~/.profile or equivalent

-- Alexandre

grep sndiod /etc/rc.conf.local
#sndiod_flags="-f rsnd/0 -s onboard -f rsnd/1 -s default"
sndiod_flags="-f rsnd/1 -f rsnd/0"
#sndiod_flags="-f rsnd/0 -f rsnd/1"

I've tried all three of the settings, the first and the last defaults to 
builtin soundcard. But if I use the second configuration setting this 
shows up in dmesg:


ehci0: Error opening low/full speed isoc endpoint.
A low/full speed device is attached to a USB2 hub, and transaction 
translations are not yet supported.

Reattach the device to the root hub instead.
uaudio_chan_open: error creating pipe: err=INVAL endpt=0x03


I dont know if that helps.

//Johan



Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Alexandre Ratchov
On Tue, Jun 03, 2014 at 07:25:25PM +0200, Alexandre Ratchov wrote:
> 
> sndiod_flags="-f rsnd/1 -f rsnd/0"
> 
> This will kind of "exchange" the first two devices. I.e. this
> exposes "snd/0" as sub-device of "rsnd/1" and "snd/1" as sub-device
> of "rsnd/0".
> 

If device renumbering seems confusing/ugly, another option would be
to keep the kernel order:

sndiod_flags="-f rsnd/0 -f rsnd/1"

then export AUDIODEVICE=snd/1 in your ~/.profile or equivalent

-- Alexandre



Re: OpenSMTPD recipient table with db file

2014-06-03 Thread Martijn Rijkeboer
> support for "recipient" using db tables has been added after 5.5:
>
>   
> http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/smtpd/table_db.c.diff?r1=1.5;r2=1.6;f=h
>
> the diff will apply as is on smtpd from 5.5 so you can backport it

Thanks.

Kind regards,


Martijn Rijkeboer



Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Alexandre Ratchov
On Tue, Jun 03, 2014 at 06:22:01PM +0200, Remco wrote:
> Johan Svensson wrote:
> 
> > I am trying to change my default output device from my builtin soundcard
> > to an usb soundcard which is an output only device. I have tried:
> > 
> > # audioctl -f /dev/audio1
> > audioctl: /dev/audio1: Device not configured
> > 
> 
> It seems this device does not exist from the kernel's point of view.
> (there's also /dev/audioctl1, but using that probably doesn't make a 
> difference)
> 
> > I think there should be some controller that you configuring the audio
> > device. But i manually tried to change the symlinks in the dev directory:
> > # ls -la * | grep -E "mixer|audio"
> > lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 audio -> audio1
> > crw-rw-rw-  1 root   wheel  42, 128 Jun  3 17:01 audio0
> > crw-rw-rw-  1 root   wheel  42, 129 May 28 19:07 audio1
> > crw-rw-rw-  1 root   wheel  42, 130 May 28 19:07 audio2
> > lrwxr-xr-x  1 root   wheel9 Jun  3 16:58 audioctl -> audioctl1
> > crw-rw-rw-  1 root   wheel  42, 192 May 28 19:07 audioctl0
> > crw-rw-rw-  1 root   wheel  42, 193 May 28 19:07 audioctl1
> > crw-rw-rw-  1 root   wheel  42, 194 May 28 19:07 audioctl2
> > lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 mixer -> mixer1
> > crw-rw-rw-  1 root   wheel  42,  16 May 28 19:07 mixer0
> > crw-rw-rw-  1 root   wheel  42,  17 May 28 19:07 mixer1
> > crw-rw-rw-  1 root   wheel  42,  18 May 28 19:07 mixer2
> > 
> > But it is still defaulting to my builtin soundcard. How can i change the
> > default sounddevice from audio0 to audio1?
> > 
> 
> I think using sndiod(1) is the answer, in the most simplistic form, 
> something like this in your rc.conf.local(8) should suffice:
> sndiod_flags="-f rsnd/0 -s onboard -f rsnd/1 -s default"
> 
> This should make your audio0 device available as "snd/0.onboard" and your 
> audio1 device as the default sound device. (Both should be available as 
> "snd/0" and "snd/1" respectively as well IIRC).
> 

This changed a while ago: the device number in "snd/N" corrsponds
to the number of the -f option of sndiod. And "snd/0" is always the
default. So I'd suggest:

sndiod_flags="-f rsnd/1 -f rsnd/0"

This will kind of "exchange" the first two devices. I.e. this
exposes "snd/0" as sub-device of "rsnd/1" and "snd/1" as sub-device
of "rsnd/0".

-- Alexandre



Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Johan Svensson

On 06/03/14 18:22, Remco wrote:

Johan Svensson wrote:


I am trying to change my default output device from my builtin soundcard
to an usb soundcard which is an output only device. I have tried:

# audioctl -f /dev/audio1
audioctl: /dev/audio1: Device not configured


It seems this device does not exist from the kernel's point of view.
(there's also /dev/audioctl1, but using that probably doesn't make a
difference)


I think there should be some controller that you configuring the audio
device. But i manually tried to change the symlinks in the dev directory:
# ls -la * | grep -E "mixer|audio"
lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 audio -> audio1
crw-rw-rw-  1 root   wheel  42, 128 Jun  3 17:01 audio0
crw-rw-rw-  1 root   wheel  42, 129 May 28 19:07 audio1
crw-rw-rw-  1 root   wheel  42, 130 May 28 19:07 audio2
lrwxr-xr-x  1 root   wheel9 Jun  3 16:58 audioctl -> audioctl1
crw-rw-rw-  1 root   wheel  42, 192 May 28 19:07 audioctl0
crw-rw-rw-  1 root   wheel  42, 193 May 28 19:07 audioctl1
crw-rw-rw-  1 root   wheel  42, 194 May 28 19:07 audioctl2
lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 mixer -> mixer1
crw-rw-rw-  1 root   wheel  42,  16 May 28 19:07 mixer0
crw-rw-rw-  1 root   wheel  42,  17 May 28 19:07 mixer1
crw-rw-rw-  1 root   wheel  42,  18 May 28 19:07 mixer2

But it is still defaulting to my builtin soundcard. How can i change the
default sounddevice from audio0 to audio1?


I think using sndiod(1) is the answer, in the most simplistic form,
something like this in your rc.conf.local(8) should suffice:
sndiod_flags="-f rsnd/0 -s onboard -f rsnd/1 -s default"

This should make your audio0 device available as "snd/0.onboard" and your
audio1 device as the default sound device. (Both should be available as
"snd/0" and "snd/1" respectively as well IIRC).


/Regards
Johan Svensson

DMESG:
dmesg | grep audio
audio0 at azalia0
audio0 at azalia0
audio0 at azalia0
audio0 at azalia0
uaudio0 at uhub2 port 1 configuration 1 interface 1 "NuForce, Inc.
NuForce \M-5DAC 2" rev 1.10/0.01 addr 3
uaudio0: ignored setting with type 8193 format

If I'm correct format 8193 (== 0x2001) means "IEC1937 AC-3".
This is an encoded format. AFAICT the uaudio driver only supports plain PCM
formats. ("unencoded" audio samples)

Do you know if your device only supports AC-3 inputs or can it also handle
PCM signals ?

(running 'lsusb -v', from the usbutils package, on the device should give a
good clue what your device supports)


uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0
I have updated my rc.conf.local line with sndiod_flags="-f rsnd/0 -s 
onboard -f rsnd/1 -s default"

but the default output device is still builtin sounddevice.



Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Johan Svensson

On 06/03/14 18:22, Remco wrote:

Johan Svensson wrote:


I am trying to change my default output device from my builtin soundcard
to an usb soundcard which is an output only device. I have tried:

# audioctl -f /dev/audio1
audioctl: /dev/audio1: Device not configured


It seems this device does not exist from the kernel's point of view.
(there's also /dev/audioctl1, but using that probably doesn't make a
difference)


I think there should be some controller that you configuring the audio
device. But i manually tried to change the symlinks in the dev directory:
# ls -la * | grep -E "mixer|audio"
lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 audio -> audio1
crw-rw-rw-  1 root   wheel  42, 128 Jun  3 17:01 audio0
crw-rw-rw-  1 root   wheel  42, 129 May 28 19:07 audio1
crw-rw-rw-  1 root   wheel  42, 130 May 28 19:07 audio2
lrwxr-xr-x  1 root   wheel9 Jun  3 16:58 audioctl -> audioctl1
crw-rw-rw-  1 root   wheel  42, 192 May 28 19:07 audioctl0
crw-rw-rw-  1 root   wheel  42, 193 May 28 19:07 audioctl1
crw-rw-rw-  1 root   wheel  42, 194 May 28 19:07 audioctl2
lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 mixer -> mixer1
crw-rw-rw-  1 root   wheel  42,  16 May 28 19:07 mixer0
crw-rw-rw-  1 root   wheel  42,  17 May 28 19:07 mixer1
crw-rw-rw-  1 root   wheel  42,  18 May 28 19:07 mixer2

But it is still defaulting to my builtin soundcard. How can i change the
default sounddevice from audio0 to audio1?


I think using sndiod(1) is the answer, in the most simplistic form,
something like this in your rc.conf.local(8) should suffice:
sndiod_flags="-f rsnd/0 -s onboard -f rsnd/1 -s default"

This should make your audio0 device available as "snd/0.onboard" and your
audio1 device as the default sound device. (Both should be available as
"snd/0" and "snd/1" respectively as well IIRC).


/Regards
Johan Svensson

DMESG:
dmesg | grep audio
audio0 at azalia0
audio0 at azalia0
audio0 at azalia0
audio0 at azalia0
uaudio0 at uhub2 port 1 configuration 1 interface 1 "NuForce, Inc.
NuForce \M-5DAC 2" rev 1.10/0.01 addr 3
uaudio0: ignored setting with type 8193 format

If I'm correct format 8193 (== 0x2001) means "IEC1937 AC-3".
This is an encoded format. AFAICT the uaudio driver only supports plain PCM
formats. ("unencoded" audio samples)

Do you know if your device only supports AC-3 inputs or can it also handle
PCM signals ?

(running 'lsusb -v', from the usbutils package, on the device should give a
good clue what your device supports)


uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0

I can successfully run this command:
if i use audioctl1 instead of audio1 it works, i dont know why tho.

# audioctl -f /dev/audioctl1
name=USB audio
version=
config=uaudio
encodings=slinear_le:16:2:1,slinear_le:24:3:1
properties=independent
full_duplex=0
fullduplex=0
blocksize=8816
hiwat=7
lowat=5
output_muted=0
monitor_gain=0
mode=
play.rate=44100
play.channels=2
play.precision=16
play.bps=2
play.msb=1
play.encoding=slinear_le
play.gain=127
play.balance=32
play.port=0x0
play.avail_ports=0x0
play.seek=0
play.samples=0
play.eof=0
play.pause=0
play.error=0
play.waiting=0
play.open=0
play.active=0
play.buffer_size=65536
play.block_size=8816
play.errors=0
record.rate=44100
record.channels=2
record.precision=16
record.bps=2
record.msb=1
record.encoding=slinear_le
record.gain=127
record.balance=32
record.port=0x0
record.avail_ports=0x0
record.seek=0
record.samples=0
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=0
record.active=0
record.buffer_size=65536
record.block_size=8816
record.errors=0

here is the output from the device in lsusb:

Bus 000 Device 003: ID 1852:db96 GYROCOM C&C Co., LTD
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.10
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor   0x1852 GYROCOM C&C Co., LTD
  idProduct  0xdb96
  bcdDevice0.01
  iManufacturer   1 NuForce, Inc.
  iProduct2 NuForce µDAC 2
  iSerial 0
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength  251
bNumInterfaces  3
bConfigurationValue 1
iConfiguration  0
bmAttributes 0x80
  (Bus Powered)
MaxPower  500mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass 3 Human Interface Device
  bInterfaceSubClass  0 No Subclass
  bInterfaceProtocol  0 None
  iInterface  0
HID Device Descriptor:
  bLength 9
  bDescriptorType33
  bcdHID   1.00
  b

Re: Change default audiodevice in OpenBSD-current

2014-06-03 Thread Remco
Johan Svensson wrote:

> I am trying to change my default output device from my builtin soundcard
> to an usb soundcard which is an output only device. I have tried:
> 
> # audioctl -f /dev/audio1
> audioctl: /dev/audio1: Device not configured
> 

It seems this device does not exist from the kernel's point of view.
(there's also /dev/audioctl1, but using that probably doesn't make a 
difference)

> I think there should be some controller that you configuring the audio
> device. But i manually tried to change the symlinks in the dev directory:
> # ls -la * | grep -E "mixer|audio"
> lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 audio -> audio1
> crw-rw-rw-  1 root   wheel  42, 128 Jun  3 17:01 audio0
> crw-rw-rw-  1 root   wheel  42, 129 May 28 19:07 audio1
> crw-rw-rw-  1 root   wheel  42, 130 May 28 19:07 audio2
> lrwxr-xr-x  1 root   wheel9 Jun  3 16:58 audioctl -> audioctl1
> crw-rw-rw-  1 root   wheel  42, 192 May 28 19:07 audioctl0
> crw-rw-rw-  1 root   wheel  42, 193 May 28 19:07 audioctl1
> crw-rw-rw-  1 root   wheel  42, 194 May 28 19:07 audioctl2
> lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 mixer -> mixer1
> crw-rw-rw-  1 root   wheel  42,  16 May 28 19:07 mixer0
> crw-rw-rw-  1 root   wheel  42,  17 May 28 19:07 mixer1
> crw-rw-rw-  1 root   wheel  42,  18 May 28 19:07 mixer2
> 
> But it is still defaulting to my builtin soundcard. How can i change the
> default sounddevice from audio0 to audio1?
> 

I think using sndiod(1) is the answer, in the most simplistic form, 
something like this in your rc.conf.local(8) should suffice:
sndiod_flags="-f rsnd/0 -s onboard -f rsnd/1 -s default"

This should make your audio0 device available as "snd/0.onboard" and your 
audio1 device as the default sound device. (Both should be available as 
"snd/0" and "snd/1" respectively as well IIRC).

> /Regards
> Johan Svensson
> 
> DMESG:
> dmesg | grep audio
> audio0 at azalia0
> audio0 at azalia0
> audio0 at azalia0
> audio0 at azalia0
> uaudio0 at uhub2 port 1 configuration 1 interface 1 "NuForce, Inc.
> NuForce \M-5DAC 2" rev 1.10/0.01 addr 3
> uaudio0: ignored setting with type 8193 format

If I'm correct format 8193 (== 0x2001) means "IEC1937 AC-3".
This is an encoded format. AFAICT the uaudio driver only supports plain PCM 
formats. ("unencoded" audio samples)

Do you know if your device only supports AC-3 inputs or can it also handle 
PCM signals ?

(running 'lsusb -v', from the usbutils package, on the device should give a 
good clue what your device supports)

> uaudio0: audio rev 1.00, 2 mixer controls
> audio1 at uaudio0



Change default audiodevice in OpenBSD-current

2014-06-03 Thread Johan Svensson
I am trying to change my default output device from my builtin soundcard 
to an usb soundcard which is an output only device. I have tried:


# audioctl -f /dev/audio1
audioctl: /dev/audio1: Device not configured

I think there should be some controller that you configuring the audio 
device. But i manually tried to change the symlinks in the dev directory:

# ls -la * | grep -E "mixer|audio"
lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 audio -> audio1
crw-rw-rw-  1 root   wheel  42, 128 Jun  3 17:01 audio0
crw-rw-rw-  1 root   wheel  42, 129 May 28 19:07 audio1
crw-rw-rw-  1 root   wheel  42, 130 May 28 19:07 audio2
lrwxr-xr-x  1 root   wheel9 Jun  3 16:58 audioctl -> audioctl1
crw-rw-rw-  1 root   wheel  42, 192 May 28 19:07 audioctl0
crw-rw-rw-  1 root   wheel  42, 193 May 28 19:07 audioctl1
crw-rw-rw-  1 root   wheel  42, 194 May 28 19:07 audioctl2
lrwxr-xr-x  1 root   wheel6 Jun  3 16:58 mixer -> mixer1
crw-rw-rw-  1 root   wheel  42,  16 May 28 19:07 mixer0
crw-rw-rw-  1 root   wheel  42,  17 May 28 19:07 mixer1
crw-rw-rw-  1 root   wheel  42,  18 May 28 19:07 mixer2

But it is still defaulting to my builtin soundcard. How can i change the 
default sounddevice from audio0 to audio1?


/Regards
Johan Svensson

DMESG:
dmesg | grep audio
audio0 at azalia0
audio0 at azalia0
audio0 at azalia0
audio0 at azalia0
uaudio0 at uhub2 port 1 configuration 1 interface 1 "NuForce, Inc. 
NuForce \M-5DAC 2" rev 1.10/0.01 addr 3

uaudio0: ignored setting with type 8193 format
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0



Re: Black screen after 5.5/macppc install

2014-06-03 Thread Tobias Brodel

Tried the diff, no joy..

Here's the output of eeprom -p: http://pastebin.com/bWSsXxHs

Toby

On 03/06/14 22:28, Mark Kettenis wrote:

Index: radeon_combios.c
===
RCS file: /cvs/src/sys/dev/pci/drm/radeon/radeon_combios.c,v
retrieving revision 1.5
diff -u -p -r1.5 radeon_combios.c
--- radeon_combios.c7 Apr 2014 06:43:11 -   1.5
+++ radeon_combios.c3 Jun 2014 12:24:24 -
@@ -1500,7 +1500,8 @@ bool radeon_get_legacy_connector_info_fr
} else if (of_machine_is_compatible("PowerMac3,5")) {
/* PowerMac G4 Silver radeon 7500 */
rdev->mode_info.connector_table = CT_MAC_G4_SILVER;
-   } else if (of_machine_is_compatible("PowerMac4,4")) {
+   } else if (of_machine_is_compatible("PowerMac4,4") ||
+  of_machine_is_compatible("PowerMac6,4")) {
/* emac */
rdev->mode_info.connector_table = CT_EMAC;
} else if (of_machine_is_compatible("PowerMac10,1")) {




Black screen after 5.5/macppc install

2014-06-03 Thread Mark Kettenis
> Hi, after installing OpenBSD 5.5/macppc on my emac I am unable to get a
> console to display on my monitor.
> 
> The installer completes succesfully, I can reboot to the new system but
> the display conks out after the radeon-related kernel messages.
> 
> I can log in via ssh and my previous install of 5.4 worked fine
> (although I never did get X11 working...).
> 
> I this a known issue? I noticed lots of radeon/macppc items in the 5.5
> changelog.

Not a known issue, although I'm not entirely surprised by your report.
Especially if X didn't work with 5.4.

Can you send me the output of "eeprom -p" for this machine?

Here's a diff that might be worth trying.


Index: radeon_combios.c
===
RCS file: /cvs/src/sys/dev/pci/drm/radeon/radeon_combios.c,v
retrieving revision 1.5
diff -u -p -r1.5 radeon_combios.c
--- radeon_combios.c7 Apr 2014 06:43:11 -   1.5
+++ radeon_combios.c3 Jun 2014 12:24:24 -
@@ -1500,7 +1500,8 @@ bool radeon_get_legacy_connector_info_fr
} else if (of_machine_is_compatible("PowerMac3,5")) {
/* PowerMac G4 Silver radeon 7500 */
rdev->mode_info.connector_table = CT_MAC_G4_SILVER;
-   } else if (of_machine_is_compatible("PowerMac4,4")) {
+   } else if (of_machine_is_compatible("PowerMac4,4") ||
+  of_machine_is_compatible("PowerMac6,4")) {
/* emac */
rdev->mode_info.connector_table = CT_EMAC;
} else if (of_machine_is_compatible("PowerMac10,1")) {



Re: Configuring wireless and dhcp with zyd on 5.4-release

2014-06-03 Thread Stefan Sperling
On Sat, Apr 19, 2014 at 09:51:59PM -1000, Felix Johnson wrote:
> I'm a bit new to OpenBSD and want to configure wireless networking,
> as a client to an existing access point.
> 
> The box has a clean install of 5.4-release from install54.iso.
> The wireless device is a Belkin F5D7050 wireless G USB network
> adapter, which shows up as zyd0.
> 
> I can scan the network with 'ifconfig zyd0 scan' and the ESSID I'm
> looking for shows up, but the radio keeps going up and down and I
> can't get dhcp working on it.
> 
> The /etc/hostname.zyd0 file looks like:
> nwid "What does the Mo'o say"
> wpakey sillypassword
> dhcp
> 
> This network id shows up when I use 'ifconfig zyd0 scan', so I'm
> pretty sure the wireless device is up and listening.
> e.g.
> zyd0: flags=8843 mtu 1500
> lladdr 00:17:3f:52:1d:f3
> priority: 4
> groups: wlan
> media: IEEE802.11 autoselect (DS1 mode 11g)
> status: active
> ieee80211: nwid "What does the Mo'o say" chan 1 bssid
> 1c:c6:3c:4c:3e:67 33dB wpakey 0xblah wpaprotos wpa1,wpa2
> wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip 100dBm
> nwid fatsole chan 6 bssid 00:14:bf:f9:60:34 39dB 54M
> privacy,short_slottime
> ... (many more) ...
> nwid "What does the Mo'o say" chan 1 bssid 1c:c6:3c:4c:3e:67
> 43dB 54M privacy
> 
> Soo... how do I get dhcp working? I tried using 'dhclient zyd0' but
> all I get is
> DHCPDISCOVER on zyd0 to 255.255.255.255 port 67 interval 9
> ... (several more) ...
> DHCPDISCOVER on zyd0 to 255.255.255.255 port 67 interval 4
> No acceptable DHCPOFFERS received.
> No working leases in persistent database - sleeping.
> 
> Any help would be appreciated.
> Felix

Hi Felix,

I've received a zyd hardware donation and could diagnose the problem.
The diff below should fix the problem.

Index: if_zyd.c
===
RCS file: /cvs/src/sys/dev/usb/if_zyd.c,v
retrieving revision 1.97
diff -u -p -r1.97 if_zyd.c
--- if_zyd.c19 Mar 2014 10:09:19 -  1.97
+++ if_zyd.c3 Jun 2014 12:27:08 -
@@ -1913,7 +1913,7 @@ zyd_rx_data(struct zyd_softc *sc, const 
}
 
/* compute actual frame length */
-   len -= sizeof (*plcp) - sizeof (*stat) - IEEE80211_CRC_LEN;
+   len -= sizeof (*plcp) + sizeof (*stat) + IEEE80211_CRC_LEN;
 
if (len > MCLBYTES) {
DPRINTFN(2, ("frame too large (length=%d)\n", len));



Re: FAQ / geektools RFC / diff

2014-06-03 Thread Nick Holland
On 06/03/14 04:29, Oliver Peter wrote:
> Links in FAQ seem to be dead:

yep, thanks!

Nick.

> Index: faq8.html
> ===
> RCS file: /cvs/www/faq/faq8.html,v
> retrieving revision 1.252
> diff -u -r1.252 faq8.html
> --- faq8.html 3 May 2014 13:14:30 -   1.252
> +++ faq8.html 27 May 2014 08:13:23 -
> @@ -1158,7 +1158,7 @@
>  
>  What is going on:
>  From a workstation behind the NAT of the gateway with an 
> -http://www.geektools.com/rfc/rfc1918.txt";>unregistered IP 
> +http://tools.ietf.org/html/rfc1918";>unregistered IP 
>  address of 192.168.1.35, the user uses 
>   href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&sektion=1";>ssh
>  to access the gateway system.  The 
> Index: pf/nat.html
> ===
> RCS file: /cvs/www/faq/pf/nat.html,v
> retrieving revision 1.46
> diff -u -r1.46 nat.html
> --- pf/nat.html   1 May 2014 15:03:50 -   1.46
> +++ pf/nat.html   27 May 2014 08:13:25 -
> @@ -64,13 +64,13 @@
>  IP addresses assigned to you by your Internet Service Provider is less
>  than the total number of computers that you wish to provide Internet
>  access for. NAT is described in
> -http://www.geektools.com/rfc/rfc1631.txt";>RFC 1631,
> +http://tools.ietf.org/html/rfc1631";>RFC 1631,
>  "The IP Network Address Translator (NAT)."
>  
>  
>  NAT allows you to take advantage of the reserved address blocks
>  described in
> -http://www.geektools.com/rfc/rfc1918.txt";>RFC 1918,
> +http://tools.ietf.org/html/rfc1918";>RFC 1918,
>  "Address Allocation for Private Internets."
>  Typically, your internal network will be setup to use one or more of
>  these network blocks. They are:
> Index: pf/shortcuts.html
> ===
> RCS file: /cvs/www/faq/pf/shortcuts.html,v
> retrieving revision 1.34
> diff -u -r1.34 shortcuts.html
> --- pf/shortcuts.html 1 May 2014 15:03:50 -   1.34
> +++ pf/shortcuts.html 27 May 2014 08:13:25 -
> @@ -126,7 +126,7 @@
>  
>  Using Lists
>  Let's look at a good set of rules to have in your ruleset to handle
> -http://www.geektools.com/rfc/rfc1918.txt";>RFC 1918
> +http://tools.ietf.org/html/rfc1918";>RFC 1918
>  addresses that just shouldn't be floating around the Internet,
>  and when they are, are usually trying to cause trouble:
>  



Re: Contributing to OpenBSD documentation

2014-06-03 Thread Marc Espie
On Tue, Jun 03, 2014 at 08:28:42PM +1000, Anders Østergaard Jensen-Waud wrote:
> * Translate OpenBSD manuals/FAQ/documentation to Danish/Scandinavian
> (I am Danish)
> * Help out with some of the existing documentation or fill gaps where required
> * Something completely different

Find stuff that doesn't work properly and figure out what's going on.

Even without code, complete *reproduceable* bug reports are invaluable
resources.

(hint: anything that dumps cores is a bug).

Pretty soon, you'll find you can actually dive into code and figure things
out.

Also, working on ports has a lower entry barrier than some other parts of
the system...



Contributing to OpenBSD documentation

2014-06-03 Thread Anders Østergaard Jensen-Waud
Hello,

I am interesting in helping out on the OpenBSD project where I can. I
am proficient in C but am not knowledgeable enough to contribute to
OS/systems level programming. So I have been looking for other ways to
contribute and thought documentation might be a good place to start.

What are the most critical areas in documentation, which require help?
I have thought that I could:

* Translate OpenBSD manuals/FAQ/documentation to Danish/Scandinavian
(I am Danish)
* Help out with some of the existing documentation or fill gaps where required
* Something completely different

Please let me know where help is needed as I am keen to contribute
back to the OpenBSD community.

Cheers

Anders



FAQ / geektools RFC / diff

2014-06-03 Thread Oliver Peter
Links in FAQ seem to be dead:

Index: faq8.html
===
RCS file: /cvs/www/faq/faq8.html,v
retrieving revision 1.252
diff -u -r1.252 faq8.html
--- faq8.html   3 May 2014 13:14:30 -   1.252
+++ faq8.html   27 May 2014 08:13:23 -
@@ -1158,7 +1158,7 @@
 
 What is going on:
 From a workstation behind the NAT of the gateway with an 
-http://www.geektools.com/rfc/rfc1918.txt";>unregistered IP 
+http://tools.ietf.org/html/rfc1918";>unregistered IP 
 address of 192.168.1.35, the user uses 
 http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&sektion=1";>ssh
 to access the gateway system.  The 
Index: pf/nat.html
===
RCS file: /cvs/www/faq/pf/nat.html,v
retrieving revision 1.46
diff -u -r1.46 nat.html
--- pf/nat.html 1 May 2014 15:03:50 -   1.46
+++ pf/nat.html 27 May 2014 08:13:25 -
@@ -64,13 +64,13 @@
 IP addresses assigned to you by your Internet Service Provider is less
 than the total number of computers that you wish to provide Internet
 access for. NAT is described in
-http://www.geektools.com/rfc/rfc1631.txt";>RFC 1631,
+http://tools.ietf.org/html/rfc1631";>RFC 1631,
 "The IP Network Address Translator (NAT)."
 
 
 NAT allows you to take advantage of the reserved address blocks
 described in
-http://www.geektools.com/rfc/rfc1918.txt";>RFC 1918,
+http://tools.ietf.org/html/rfc1918";>RFC 1918,
 "Address Allocation for Private Internets."
 Typically, your internal network will be setup to use one or more of
 these network blocks. They are:
Index: pf/shortcuts.html
===
RCS file: /cvs/www/faq/pf/shortcuts.html,v
retrieving revision 1.34
diff -u -r1.34 shortcuts.html
--- pf/shortcuts.html   1 May 2014 15:03:50 -   1.34
+++ pf/shortcuts.html   27 May 2014 08:13:25 -
@@ -126,7 +126,7 @@
 
 Using Lists
 Let's look at a good set of rules to have in your ruleset to handle
-http://www.geektools.com/rfc/rfc1918.txt";>RFC 1918
+http://tools.ietf.org/html/rfc1918";>RFC 1918
 addresses that just shouldn't be floating around the Internet,
 and when they are, are usually trying to cause trouble:
 


-- 
Oliver PETER   oli...@gfuzz.de   0x456D688F



Re: OpenSMTPD recipient table with db file

2014-06-03 Thread Gilles Chehade
On Mon, Jun 02, 2014 at 10:15:15PM +0200, Martijn Rijkeboer wrote:
> Hi,
> 
> When I try to use a db file for my recipient table I get "invalid use of
> table "recipients" as RECIPIENT parameter". When I use a plain file it
> works. I've created the db file with "makemap -t set recipients". Is this
> on purpose or is it a bug?
> 
> Using a plain file:
>   table recipients file:/etc/mail/recipients
>   accept from any for any recipient  relay via ...
> 
> Using a db file:
>   table recipients db:/etc/mail/recipients.db
>   accept from any for any recipient  relay via ...
> 
> OS: OpenBSD 5.5 AMD64.
> 
> Kind regards,
> 

Hi,

support for "recipient" using db tables has been added after 5.5:


http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/smtpd/table_db.c.diff?r1=1.5;r2=1.6;f=h

the diff will apply as is on smtpd from 5.5 so you can backport it



-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg