Index: roard/Makefile
===================================================================
--- roard/Makefile	(revision 4438)
+++ roard/Makefile	(revision 4469)
@@ -1,5 +1,5 @@
 TARGETS=roard
 
-OBJ=roard.o driver.o mixer.o output.o signals.o loop.o clients.o streams.o network.o commands.o req.o sources.o sample.o meta.o codecfilter.o lib.o ssynth.o container_framework.o plugins.o memlock.o hwmixer.o
+OBJ=roard.o driver.o mixer.o output.o signals.o loop.o clients.o streams.o network.o commands.o req.o sources.o sample.o meta.o codecfilter.o lib.o ssynth.o container_framework.o plugins.o memlock.o hwmixer.o auth.o
 SUBSYS=midi.o light.o raw.o rdtcs.o waveform.o beep.o
 DRV=driver_esd.o driver_ao.o driver_roar.o driver_raw.o driver_oss.o driver_shout.o driver_sndio.o driver_dmx.o driver_pwmled.o driver_sysclock.o driver_wmm.o driver_dstr.o driver_alsa.o driver_rsound.o driver_portaudio.o driver_pulsesimple.o
Index: roard/auth.c
===================================================================
--- roard/auth.c	(revision 4469)
+++ roard/auth.c	(revision 4469)
@@ -0,0 +1,46 @@
+//auth.c:
+
+/*
+ *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010
+ *
+ *  This file is part of roard a part of RoarAudio,
+ *  a cross-platform sound system for both, home and professional use.
+ *  See README for details.
+ *
+ *  This file is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 3
+ *  as published by the Free Software Foundation.
+ *
+ *  RoarAudio is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this software; see the file COPYING.  If not, write to
+ *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "roard.h"
+
+#define _NONE ROAR_AUTH_T_AUTO
+
+int auth_init (void) {
+ int i;
+
+ memset(g_auth_keyring, 0, sizeof(g_auth_keyring));
+
+ for (i = 0; i < AUTH_KEYRING_LEN; i++) {
+  g_auth_keyring[i].type = _NONE;
+ }
+
+ return 0;
+}
+
+int auth_free (void) {
+ return 0;
+}
+
+//ll
Index: roard/include/auth.h
===================================================================
--- roard/include/auth.h	(revision 4469)
+++ roard/include/auth.h	(revision 4469)
@@ -0,0 +1,74 @@
+//auth.h:
+
+/*
+ *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010
+ *
+ *  This file is part of roard a part of RoarAudio,
+ *  a cross-platform sound system for both, home and professional use.
+ *  See README for details.
+ *
+ *  This file is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 3
+ *  as published by the Free Software Foundation.
+ *
+ *  RoarAudio is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this software; see the file COPYING.  If not, write to
+ *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef _AUTH_H_
+#define _AUTH_H_
+
+#include <roaraudio.h>
+
+#define AT_TRUST_MAX_ENTRYS 8
+#define AUTH_KEYRING_LEN    8
+
+struct at_none {
+ char dummy;
+};
+
+struct at_cookie {
+ char * cookie;
+ size_t len;
+};
+
+struct at_trust {
+ pid_t pids[AT_TRUST_MAX_ENTRYS];
+ uid_t uids[AT_TRUST_MAX_ENTRYS];
+ gid_t gids[AT_TRUST_MAX_ENTRYS];
+ size_t pids_len, uids_len, gids_len;
+};
+
+struct at_password {
+ char * password;
+};
+
+union auth_typeunion {
+ struct at_none     none;
+ struct at_cookie   cookie;
+ struct at_trust    trust;
+ struct at_password password;
+};
+
+struct auth_key {
+ int type;
+ enum roard_client_acclev acclev;
+ union auth_typeunion at_data;
+};
+
+struct auth_key g_auth_keyring[AUTH_KEYRING_LEN];
+
+int auth_init (void);
+int auth_free (void);
+
+#endif
+
+//ll
Index: roard/include/roard.h
===================================================================
--- roard/include/roard.h	(revision 4442)
+++ roard/include/roard.h	(revision 4469)
@@ -100,4 +100,5 @@
 #include "container_framework.h" /* MFOI */
 #include "client.h"
+#include "auth.h"
 #include "driver.h" /* MFOI */
 #include "output.h"
Index: roard/roard.c
===================================================================
--- roard/roard.c	(revision 4442)
+++ roard/roard.c	(revision 4469)
@@ -1546,4 +1546,9 @@
 #endif
 
+ if ( auth_init() == -1 ) {
+  ROAR_ERR("Can not init auth subsystem!");
+  return 1;
+ }
+
 #ifdef ROAR_SUPPORT_LISTEN
  if ( init_listening() == -1 ) {
@@ -2598,4 +2603,6 @@
   unlink(pidfile);
 #endif
+
+ auth_free();
 }
 
