[pulseaudio-discuss] module-native-protocol-unix and FreeBSD

Alexander Gromnitsky alexander.gromnitsky at gmail.com
Sat Jan 10 19:19:49 PST 2009


Hi,

I'm trying to setup system-wide pulseaudio for local-only users. I've
read about required pulse-access group but it seems that no checks are
performed by pulseaudio-0.9.13 (from FreeBSD ports) for user membership.
The server just says:

protocol-native.c: Denied access to client with invalid authorization
data

% paplay sample.wav
Connection failure: Access denied

% grep pulse-access /etc/group
pulse-access:*:564:alex,root

The only way I found to make it work is to write in
/usr/local/etc/pulse/system.pa:

	load-module module-native-protocol-unix auth-anonymous=1

The server was tested as:

# pulseaudio --log-target=stderr --log-level=4 --daemonize=0 --system=1

Interesting info from the stderr log:

W: protocol-native.c: Authentication group configured, but not available on local system. Ignoring.

If I change the line in system.pa to

   load-module module-native-protocol-unix auth-group=pulse-access

and start pulseaudio as showed above, it writes:

E: module-protocol-stub.c: Failed to parse module arguments
E: module.c: Failed to load  module "module-native-protocol-unix" (argument: "auth-group=pulse-access"): initialization failed.
E: main.c: Module load failed.
E: main.c: Failed to initialize daemon.

Than I've looked into source files module-protocol-stub.c,
protocol-native.c and creds.h. The discovered data are:

1. "auth-group", "auth-group-enable" arguments for
   module-native-protocol-unix are only available when "if
   defined(HAVE_CREDS)".

2. Checks for user membership are only done "#ifdef HAVE_CREDS".

3. HAVE_CREDS macro is undefined for FreeBSD because pulseaudio uses
   Linux (-only?) ancillary message SCM_CREDENTIALS for authentication
   in sockets communication.

Are my assumptions true?

Thanks in advance.

PS
Sorry for my terrible English.




More information about the pulseaudio-discuss mailing list