From fe1cb3a9a1fc6bcbfa1b3be74ac9d5867005210f Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Mon, 14 Apr 2003 23:52:40 +0000 Subject: 2003-04-14 Havoc Pennington * dbus/dbus-userdb.c: user database abstraction, mostly to get caching, but at some point we might want to be able to use a different database. * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses SHA1 conf file to test the sha1 auth mechanism, since the regular test always uses EXTERNAL when available. * configure.in, test/data/valid-config-files/debug-allow-all-sha1.conf.in: add conf file that requires use of sha1 auth --- dbus/dbus-userdb.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 dbus/dbus-userdb.h (limited to 'dbus/dbus-userdb.h') diff --git a/dbus/dbus-userdb.h b/dbus/dbus-userdb.h new file mode 100644 index 00000000..b1df4588 --- /dev/null +++ b/dbus/dbus-userdb.h @@ -0,0 +1,44 @@ +/* -*- mode: C; c-file-style: "gnu" -*- */ +/* dbus-userdb.h User database abstraction + * + * Copyright (C) 2003 Red Hat, Inc. + * + * Licensed under the Academic Free License version 1.2 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef DBUS_USERDB_H +#define DBUS_USERDB_H + +#include + +DBUS_BEGIN_DECLS; + +typedef struct DBusUserDatabase DBusUserDatabase; + +DBusUserDatabase* _dbus_user_database_new (void); +void _dbus_user_database_ref (DBusUserDatabase *db); +void _dbus_user_database_unref (DBusUserDatabase *db); +dbus_bool_t _dbus_user_database_get_groups (DBusUserDatabase *db, + dbus_uid_t uid, + dbus_gid_t **group_ids, + int *n_group_ids, + DBusError *error); + +DBUS_END_DECLS; + +#endif /* DBUS_USERDB_H */ -- cgit