*
* 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
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <config.h>
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include "dbus-auth-script.h"
#include "dbus-auth.h"
#include "dbus-hash.h"
#include "dbus-credentials.h"
#include "dbus-internals.h"
+#include "dbus-authorization.h"
/**
* @defgroup DBusAuthScript code for running unit test scripts for DBusAuth
if (uid != DBUS_UID_UNSET)
_dbus_credentials_add_unix_uid (credentials, uid);
if (pid != DBUS_PID_UNSET)
- _dbus_credentials_add_unix_pid (credentials, pid);
+ _dbus_credentials_add_pid (credentials, pid);
_dbus_auth_set_credentials (auth, credentials);
"SERVER"))
{
DBusCredentials *creds;
+ DBusAuthorization *authorization;
if (auth != NULL)
{
goto out;
}
- auth = _dbus_auth_server_new (&guid);
+ /* empty authorization, it will use default rules */
+ authorization = _dbus_authorization_new ();
+ if (authorization == NULL)
+ {
+ _dbus_warn ("no memory to create DBusAuthorization\n");
+ goto out;
+ }
+ auth = _dbus_auth_server_new (&guid, authorization);
+ /* DBusAuth owns it, or finalized on OOM */
+ _dbus_authorization_unref (authorization);
if (auth == NULL)
{
_dbus_warn ("no memory to create DBusAuth\n");
}
/** @} */
-#endif /* DBUS_BUILD_TESTS */
+#endif /* DBUS_ENABLE_EMBEDDED_TESTS */