From cc865cd7bf877f06386aa9ce42864654c78e0dcb Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Apr 24 2013 18:00:20 +0000 Subject: Drop code unrelated to pkla-*.c In particular: - All of polkit-gobject - All of polkit-agent - API documentation - Command-line utilities - polkitd and its configuration and setup - The JavaScript authority Also remove no longer necessary checks from configure.ac --- diff --git a/.gitignore b/.gitignore index d8b6f2e..d785f58 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ /config.sub /configure /depcomp -/gtk-doc.make /install-sh /ltmain.sh /missing diff --git a/Makefile.am b/Makefile.am index 16bd0bc..c38666a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = actions data src docs po test +SUBDIRS = src docs po test NULL = @@ -11,9 +11,6 @@ EXTRA_DIST = \ # xsltproc barfs on 'make distcheck'; disable for now DISTCHECK_CONFIGURE_FLAGS= \ --disable-man-pages \ - --disable-gtk-doc \ - --disable-introspection \ - --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \ $(NULL) sign : dist @@ -22,11 +19,5 @@ sign : dist publish : sign scp polkit-$(VERSION).tar.gz polkit-$(VERSION).tar.gz.sign "david@people.freedesktop.org:/srv/www.freedesktop.org/www/software/polkit/releases/" -publish-docs : - gtkdoc-rebase --html-dir docs/polkit/html --online - ssh "david@people.freedesktop.org" "mkdir -p /srv/www.freedesktop.org/www/software/polkit/docs/$(VERSION)" - scp docs/polkit/html/* "david@people.freedesktop.org:/srv/www.freedesktop.org/www/software/polkit/docs/$(VERSION)" - ssh "david@people.freedesktop.org" "rm -f /srv/www.freedesktop.org/www/software/polkit/docs/latest; ln -s $(VERSION) /srv/www.freedesktop.org/www/software/polkit/docs/latest" - clean-local : rm -f *~ diff --git a/autogen.sh b/autogen.sh index 3407ae0..d97ed45 100755 --- a/autogen.sh +++ b/autogen.sh @@ -34,14 +34,6 @@ touch ChangeLog } } -(gtkdocize --flavour no-tmpl) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have gtk-doc installed to compile $PROJECT." - echo "Install the appropriate package for your distribution," - echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" - DIE=1 -} - (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have automake installed." @@ -112,7 +104,7 @@ intltoolize --copy --force --automake || exit 1 cd "$olddir" -conf_flags="--enable-maintainer-mode --enable-gtk-doc" +conf_flags="--enable-maintainer-mode" if test x$NOCONFIGURE = x; then echo "Running $srcdir/configure $conf_flags $@ ..." diff --git a/configure.ac b/configure.ac index 7d06b9c..e07f412 100644 --- a/configure.ac +++ b/configure.ac @@ -46,8 +46,6 @@ AC_PATH_PROG([XSLTPROC], [xsltproc]) fi AM_CONDITIONAL(MAN_PAGES_ENABLED, test x$enable_man_pages = xyes) -GTK_DOC_CHECK([1.3]) - #### gcc warning flags if test "x$GCC" = "xyes"; then @@ -125,10 +123,6 @@ PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-2.0 >= 2.30.0]) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) -PKG_CHECK_MODULES(LIBJS, [mozjs185]) -AC_SUBST(LIBJS_CFLAGS) -AC_SUBST(LIBJS_LIBS) - PKG_CHECK_MODULES([POLKIT], [polkit-gobject-1]) AC_SUBST([POLKIT_CFLAGS]) AC_SUBST([POLKIT_LIBS]) @@ -204,19 +198,6 @@ AC_SUBST(LIBSYSTEMD_LOGIN_LIBS) AM_CONDITIONAL(HAVE_LIBSYSTEMD_LOGIN, [test "$have_libsystemd_login" = "yes"], [Using libsystemd-login]) dnl --------------------------------------------------------------------------- -dnl - systemd unit / service files -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([systemdsystemunitdir], - AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), - [], - [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) -if test "x$with_systemdsystemunitdir" != "xno"; then - AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) -fi -AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"]) - -dnl --------------------------------------------------------------------------- dnl - User for running polkitd dnl --------------------------------------------------------------------------- @@ -230,248 +211,6 @@ fi AC_SUBST(POLKITD_USER) AC_DEFINE_UNQUOTED(POLKITD_USER,"$POLKITD_USER", [User for running polkitd]) -dnl --------------------------------------------------------------------------- -dnl - Select which authentication framework to use -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH([authfw], - AS_HELP_STRING([--with-authfw=], - [Authentication framework (none/pam/shadow)])) -if ! test -z "$with_authfw" ; then - if test x$with_authdb = xdummy ; then - if ! test x$with_authfw = xnone ; then - AC_MSG_ERROR([Only 'none' is a valid authentication framework for the dummy authorization database]) - fi - else - if test x$with_authfw = xnone ; then - AC_MSG_ERROR(['none' is only a valid authentication framework for the dummy authorization database]) - fi - fi - POLKIT_AUTHFW=$with_authfw -else - if test x$with_authdb = xdummy ; then - POLKIT_AUTHFW=none - else - POLKIT_AUTHFW=pam - fi -fi - -AC_SUBST(POLKIT_AUTHFW) -AC_DEFINE_UNQUOTED(POLKIT_AUTHFW,"$POLKIT_AUTHFW", [Authentication Framework to use]) - -case $POLKIT_AUTHFW in - none) - need_pam=no - AC_DEFINE(POLKIT_AUTHFW_NONE, 1, [If using no authentication framework]) - ;; - - pam) - need_pam=yes - AC_DEFINE(POLKIT_AUTHFW_PAM, 1, [If using the PAM authentication framework]) - ;; - - shadow) - need_pam=no - AUTH_LIBS="${AUTH_LIBS} -lcrypt" - AC_DEFINE(POLKIT_AUTHFW_SHADOW, 1, [If using the Shadow authentication framework]) - ;; - - *) - AC_MSG_ERROR([Unknown Authentication Framework: $POLKIT_AUTHFW]) - ;; -esac - -AM_CONDITIONAL(POLKIT_AUTHFW_NONE, [test x$POLKIT_AUTHFW = xnone], [Using no authfw]) -AM_CONDITIONAL(POLKIT_AUTHFW_PAM, [test x$POLKIT_AUTHFW = xpam], [Using PAM authfw]) -AM_CONDITIONAL(POLKIT_AUTHFW_SHADOW, [test x$POLKIT_AUTHFW = xshadow], [Using Shadow authfw]) - - -dnl --------------------------------------------------------------------------- -dnl - Check for PAM -dnl --------------------------------------------------------------------------- - -withval="" -AC_ARG_WITH(pam-prefix, -[ --with-pam-prefix= specify where pam files go],[ -if test x$withval != x; then - AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.") -fi]) -if test x$withval != x; then - PAM_PREFIX_UNEXPANDED="$withval" -else - PAM_PREFIX_UNEXPANDED="$sysconfdir" -fi -PAM_PREFIX=`eval echo $PAM_PREFIX_UNEXPANDED` -AC_SUBST(PAM_PREFIX) - -have_pam=no -if test "$need_pam" = yes ; then - AC_CHECK_LIB(pam, pam_start, have_pam=yes) -fi - -if test x$have_pam = xno; then - if test "$need_pam" = yes ; then - AC_ERROR([Could not find pam/pam-devel, please install the needed packages.]) - fi -else - AUTH_LIBS="${AUTH_LIBS} -lpam" - AC_DEFINE(HAVE_PAM, 1, [Define if PAM support is included]) - - # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt. - have_timedwait=no - AC_CHECK_LIB(c, sigtimedwait, [have_timedwait=yes]) - if test "$have_timedwait" = no ; then - AC_CHECK_LIB(rt, sigtimedwait, [AUTH_LIBS="${AUTH_LIBS} -lrt"]) - fi - - AC_MSG_CHECKING(how to call pam_strerror) - AC_CACHE_VAL(ac_cv_pam_strerror_args, - [AC_TRY_COMPILE([#include - #include - #include ], - [pam_handle_t *pamh = 0; - char *s = pam_strerror(pamh, PAM_SUCCESS);], - [ac_pam_strerror_args=2], - [AC_TRY_COMPILE([#include - #include - #include ], - [char *s = - pam_strerror(PAM_SUCCESS);], - [ac_pam_strerror_args=1], - [ac_pam_strerror_args=0])]) - ac_cv_pam_strerror_args=$ac_pam_strerror_args]) - ac_pam_strerror_args=$ac_cv_pam_strerror_args - if test "$ac_pam_strerror_args" = 1 ; then - AC_MSG_RESULT(one argument) - elif test "$ac_pam_strerror_args" = 2 ; then - AC_DEFINE(PAM_STRERROR_TWO_ARGS, 1, [Define if pam_strerror takes two arguments]) - AC_MSG_RESULT(two arguments) - else - AC_MSG_RESULT(unknown) - fi - -fi - -AM_CONDITIONAL(HAVE_PAM, test x$have_pam = xyes) -AC_SUBST(HAVE_PAM) -AC_SUBST(AUTH_LIBS) - -AC_CHECK_HEADER(security/pam_modutil.h, [AC_DEFINE(HAVE_PAM_MODUTIL_H, [], "Have pam_modutil.h")]) -AC_CHECK_HEADER(security/pam_ext.h, [AC_DEFINE(HAVE_PAM_EXT_H, [], "Have pam_ext.h")]) -AC_CHECK_LIB(pam, pam_vsyslog, [AC_DEFINE(HAVE_PAM_VSYSLOG, [], "Have pam_vsyslog")]) - -AC_ARG_WITH(pam-module-dir, [ --with-pam-module-dir=[dirname] directory to install PAM security module]) -if ! test -z "$with_pam_module_dir"; then - PAM_MODULE_DIR=$with_pam_module_dir -else - PAM_MODULE_DIR="/lib/security" -fi - -AC_SUBST(PAM_MODULE_DIR) - -AC_ARG_WITH(os-type, [ --with-os-type= distribution or OS (redhat/suse/gentoo/pardus/solaris)]) - -#### Check our operating system (distro-tweaks required) -if test "z$with_os_type" = "z"; then - AC_CHECK_FILE(/etc/redhat-release,distro_type="redhat") - AC_CHECK_FILE(/etc/SuSE-release,distro_type="suse") - AC_CHECK_FILE(/etc/gentoo-release,distro_type="gentoo") - AC_CHECK_FILE(/etc/pardus-release,distro_type="pardus") - if test "z$distro_type" = "z"; then - echo "Linux distribution autodetection failed, specify the distribution to target using --with-os-type=" - else - operating_system=`echo ${distro_type} | tr '[[:upper:]]' '[[:lower:]]' ` - fi -fi - -#### Sort out OS (distro-tweaks required) -if test x$with_os_type = x; then - if test x$operating_system = xredhat ; then - with_os_type=redhat - elif test x$operating_system = xsuse ; then - with_os_type=suse - elif test x$operating_system = xgentoo ; then - with_os_type=gentoo - elif test x$operating_system = xpardus ; then - with_os_type=pardus - elif test x$operating_system = xsolaris ; then - with_os_type=solaris - elif test x$operating_system = xfreebsd ; then - with_os_type=freebsd - else - with_os_type=unknown - fi -fi - -# (distro-tweaks required) -AM_CONDITIONAL(OS_TYPE_UNKNOWN, test x$with_os_type = xunknown, [Running on unknown OS]) -AM_CONDITIONAL(OS_TYPE_RED_HAT, test x$with_os_type = xredhat, [Running on Red Hat OS'es]) -AM_CONDITIONAL(OS_TYPE_SUSE, test x$with_os_type = xsuse, [Running on SUSE OS'es]) -AM_CONDITIONAL(OS_TYPE_GENTOO, test x$with_os_type = xgentoo, [Running on Gentoo OS'es]) -AM_CONDITIONAL(OS_TYPE_PARDUS, test x$with_os_type = xpardus, [Running on Pardus OS'es]) -AM_CONDITIONAL(OS_TYPE_SOLARIS, test x$with_os_type = xsolaris, [Running os Solaris OS'es]) -AM_CONDITIONAL(OS_TYPE_FREEBSD, test x$with_os_type = xfreebsd, [Running on FreeBSD OS'es]) - -AC_ARG_WITH(pam-include, [ --with-pam-include= pam file to include]) - -#### Set up pam file to include (distro-tweaks required) -if ! test -z "$with_pam_include"; then - PAM_FILE_INCLUDE_AUTH=$with_pam_include - PAM_FILE_INCLUDE_ACCOUNT=$with_pam_include - PAM_FILE_INCLUDE_PASSWORD=$with_pam_include - PAM_FILE_INCLUDE_SESSION=$with_pam_include -elif test x$with_os_type = xredhat -o x$with_os_type = xgentoo -o x$with_os_type = xpardus ; then - PAM_FILE_INCLUDE_AUTH=system-auth - PAM_FILE_INCLUDE_ACCOUNT=system-auth - PAM_FILE_INCLUDE_PASSWORD=system-auth - PAM_FILE_INCLUDE_SESSION=system-auth -elif test x$with_os_type = xsuse -o x$with_os_type = xsolaris ; then - PAM_FILE_INCLUDE_AUTH=common-auth - PAM_FILE_INCLUDE_ACCOUNT=common-account - PAM_FILE_INCLUDE_PASSWORD=common-password - PAM_FILE_INCLUDE_SESSION=common-session -elif test x$with_os_type = xfreebsd ; then - PAM_FILE_INCLUDE_AUTH=system - PAM_FILE_INCLUDE_ACCOUNT=system - PAM_FILE_INCLUDE_PASSWORD=system - PAM_FILE_INCLUDE_SESSION=system -else - PAM_FILE_INCLUDE_AUTH=system-auth - PAM_FILE_INCLUDE_ACCOUNT=system-auth - PAM_FILE_INCLUDE_PASSWORD=system-auth - PAM_FILE_INCLUDE_SESSION=system-auth -fi - -AC_SUBST(PAM_FILE_INCLUDE_AUTH) -AC_SUBST(PAM_FILE_INCLUDE_ACCOUNT) -AC_SUBST(PAM_FILE_INCLUDE_PASSWORD) -AC_SUBST(PAM_FILE_INCLUDE_SESSION) -AC_DEFINE_UNQUOTED(PAM_FILE_INCLUDE_AUTH, "$PAM_FILE_INCLUDE_AUTH", [pam file auth]) -AC_DEFINE_UNQUOTED(PAM_FILE_INCLUDE_ACCOUNT, "$PAM_FILE_INCLUDE_ACCOUNT", [pam file account]) -AC_DEFINE_UNQUOTED(PAM_FILE_INCLUDE_PASSWORD, "$PAM_FILE_INCLUDE_PASSWORD", [pam file password]) -AC_DEFINE_UNQUOTED(PAM_FILE_INCLUDE_SESSION, "$PAM_FILE_INCLUDE_SESSION", [pam file session]) - -dnl --------------------------------------------------------------------------- -dnl - check OS -dnl --------------------------------------------------------------------------- -case "$host_os" in - *linux*) - ;; - *solaris*) - AC_DEFINE([HAVE_SOLARIS], 1, [Is this a Solaris system?]) - ;; - *freebsd*) - AC_DEFINE([HAVE_FREEBSD], 1, [Is this a FreeBSD system?]) - ;; -esac - -GOBJECT_INTROSPECTION_CHECK([0.6.2]) - -AC_ARG_ENABLE([examples], - AS_HELP_STRING([--enable-examples], [Build the example programs]),, - [enable_examples=yes]) - -AM_CONDITIONAL(BUILD_EXAMPLES, test "x$enable_examples" = "xyes") # ******************** # Internationalization @@ -483,32 +222,15 @@ AC_SUBST([GETTEXT_PACKAGE]) AM_GLIB_GNU_GETTEXT AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain]) -AC_ARG_VAR([SUID_CFLAGS], - [CFLAGS used for binaries which are usually with the suid bit]) -AC_ARG_VAR([SUID_LDFLAGS], - [LDFLAGS used for binaries which are usually with the suid bit]) - AC_OUTPUT([ Makefile -actions/Makefile -data/Makefile -data/polkit-1 -data/polkit-gobject-1.pc -data/polkit-agent-1.pc src/Makefile -src/polkit/Makefile src/polkitbackend/Makefile -src/polkitagent/Makefile -src/programs/Makefile -src/examples/Makefile docs/version.xml -docs/extensiondir.xml docs/Makefile -docs/polkit/Makefile docs/man/Makefile po/Makefile.in test/Makefile -test/polkit/Makefile test/polkitbackend/Makefile ]) @@ -521,35 +243,19 @@ echo " libdir: ${libdir} libexecdir: ${libexecdir} bindir: ${bindir} - sbindir: ${sbindir} datadir: ${datadir} sysconfdir: ${sysconfdir} localstatedir: ${localstatedir} - docdir: ${docdir} compiler: ${CC} cflags: ${CFLAGS} cppflags: ${CPPFLAGS} xsltproc: ${XSLTPROC} - introspection: ${found_introspection} - Distribution/OS: ${with_os_type} - Authentication framework: ${POLKIT_AUTHFW} Session tracking: ${SESSION_TRACKING} - PAM support: ${have_pam} - systemdsystemunitdir: ${systemdsystemunitdir} polkitd user: ${POLKITD_USER}" - -if test "$have_pam" = yes ; then -echo " - PAM file auth: ${PAM_FILE_INCLUDE_AUTH} - PAM file account: ${PAM_FILE_INCLUDE_ACCOUNT} - PAM file password: ${PAM_FILE_INCLUDE_PASSWORD} - PAM file session: ${PAM_FILE_INCLUDE_SESSION}" -fi echo " Maintainer mode: ${USE_MAINTAINER_MODE} - Building api docs: ${enable_gtk_doc} Building man pages: ${enable_man_pages} Building examples: ${enable_examples} diff --git a/docs/Makefile.am b/docs/Makefile.am index ccae4ce..a5bafb8 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = man polkit +SUBDIRS = man EXTRA_DIST = version.xml.in diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index b71c1d2..51cb633 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -4,28 +4,16 @@ NULL = if MAN_PAGES_ENABLED man_MANS = \ - polkit.8 \ - polkitd.8 \ pklocalauthority.8 \ - pkexec.1 \ - pkcheck.1 \ - pkaction.1 \ - pkttyagent.1 \ $(NULL) %.8 %.1 : %.xml - $(XSLTPROC) -nonet --stringparam man.base.url.for.relative.links $(datadir)/gtk-doc/html/polkit-1/ --xinclude http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + $(XSLTPROC) -nonet --xinclude http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< endif # MAN_PAGES_ENABLED EXTRA_DIST = \ - polkit.xml \ - polkitd.xml \ pklocalauthority.xml \ - pkexec.xml \ - pkcheck.xml \ - pkaction.xml \ - pkttyagent.xml \ $(NULL) clean-local: diff --git a/po/POTFILES.in b/po/POTFILES.in index e01d0bd..804035b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,9 +1,6 @@ # List of source files containing translatable strings. # Please keep this file sorted alphabetically. [encoding: UTF-8] -actions/org.freedesktop.policykit.policy.in -src/examples/org.freedesktop.policykit.examples.pkexec.policy.in src/polkitbackend/pkla-admin-identities.c src/polkitbackend/pkla-check-authorization.c src/polkitbackend/polkitbackendlocalauthority.c -src/programs/pkexec.c diff --git a/src/Makefile.am b/src/Makefile.am index 96c1e0c..eb8ec6c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,9 +1,5 @@ -SUBDIRS = polkit polkitbackend polkitagent programs - -if BUILD_EXAMPLES -SUBDIRS += examples -endif +SUBDIRS = polkitbackend clean-local : rm -f *~ diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am deleted file mode 100644 index 88cea72..0000000 --- a/src/examples/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ - -NULL = - -INCLUDES = \ - -I$(top_builddir)/src \ - -I$(top_srcdir)/src \ - -DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \ - -DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \ - -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ - -DPACKAGE_BIN_DIR=\""$(bindir)"\" \ - -DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" \ - -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \ - -DPACKAGE_LIB_DIR=\""$(libdir)"\" \ - -D_POSIX_PTHREAD_SEMANTICS \ - -D_REENTRANT \ - $(NULL) - -bin_PROGRAMS = -noinst_PROGRAMS = - -# ---------------------------------------------------------------------------------------------------- - -noinst_PROGRAMS += cancel - -cancel_SOURCES = cancel.c - -cancel_CFLAGS = \ - $(GLIB_CFLAGS) \ - $(NULL) - -cancel_LDADD = \ - $(GLIB_LIBS) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ - $(NULL) - -# ---------------------------------------------------------------------------------------------------- - -bin_PROGRAMS += pk-example-frobnicate - -pk_example_frobnicate_SOURCES = frobnicate.c - -pk_example_frobnicate_CFLAGS = \ - $(GLIB_CFLAGS) \ - $(NULL) - -pk_example_frobnicate_LDADD = \ - $(GLIB_LIBS) \ - $(NULL) - -polkit_actiondir = $(datadir)/polkit-1/actions - -dist_polkit_action_DATA = org.freedesktop.policykit.examples.pkexec.policy - -@INTLTOOL_POLICY_RULE@ - -#check: -# $(top_builddir)/tools/polkit-policy-file-validate-1 $(top_srcdir)/policy/$(dist_polkit_action_DATA) - -DISTCLEANFILES = org.freedesktop.policykit.examples.pkexec.policy - -EXTRA_DIST = org.freedesktop.policykit.examples.pkexec.policy.in - -# ---------------------------------------------------------------------------------------------------- - -clean-local : - rm -f *~ diff --git a/src/polkit/polkit.h b/src/polkit/polkit.h deleted file mode 100644 index bfe4c7d..0000000 --- a/src/polkit/polkit.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2008 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: David Zeuthen - */ - -#ifndef __POLKIT_H -#define __POLKIT_H - -#define _POLKIT_INSIDE_POLKIT_H 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef _POLKIT_INSIDE_POLKIT_H - -#endif /* __POLKIT_H */ diff --git a/src/polkit/polkitcheckauthorizationflags.c b/src/polkit/polkitcheckauthorizationflags.c deleted file mode 100644 index 16a9125..0000000 --- a/src/polkit/polkitcheckauthorizationflags.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2008 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: David Zeuthen - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "polkitcheckauthorizationflags.h" -#include "polkitprivate.h" - - diff --git a/src/polkit/polkiterror.c b/src/polkit/polkiterror.c deleted file mode 100644 index 89b9007..0000000 --- a/src/polkit/polkiterror.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2008 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: David Zeuthen - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "polkiterror.h" -#include "polkitprivate.h" - -/** - * SECTION:polkiterror - * @title: PolkitError - * @short_description: Error codes - * - * Error codes. - */ - -static const GDBusErrorEntry polkit_error_entries[] = -{ - {POLKIT_ERROR_FAILED, "org.freedesktop.PolicyKit1.Error.Failed"}, - {POLKIT_ERROR_CANCELLED, "org.freedesktop.PolicyKit1.Error.Cancelled"}, - {POLKIT_ERROR_NOT_SUPPORTED, "org.freedesktop.PolicyKit1.Error.NotSupported"}, - {POLKIT_ERROR_NOT_AUTHORIZED, "org.freedesktop.PolicyKit1.Error.NotAuthorized"}, -}; - -GQuark -polkit_error_quark (void) -{ - static volatile gsize quark_volatile = 0; - g_dbus_error_register_error_domain ("polkit-error-quark", - &quark_volatile, - polkit_error_entries, - G_N_ELEMENTS (polkit_error_entries)); - G_STATIC_ASSERT (G_N_ELEMENTS (polkit_error_entries) - 1 == POLKIT_ERROR_NOT_AUTHORIZED); - return (GQuark) quark_volatile; -} diff --git a/src/polkitbackend/Makefile.am b/src/polkitbackend/Makefile.am index 6f2dcac..1332da9 100644 --- a/src/polkitbackend/Makefile.am +++ b/src/polkitbackend/Makefile.am @@ -29,8 +29,6 @@ pkla_check_authorization_LDADD = \ $(GLIB_LIBS) \ $(NULL) -BUILT_SOURCES = - INCLUDES = \ -I$(top_builddir)/src \ -I$(top_srcdir)/src \ @@ -49,11 +47,6 @@ INCLUDES = \ noinst_LTLIBRARIES=libpolkit-backend-1.la -initjs.h : init.js - $(PERL) $(srcdir)/toarray.pl $(srcdir)/init.js init_js > $@ - -BUILT_SOURCES += initjs.h - libpolkit_backend_1_la_SOURCES = \ $(BUILT_SOURCES) \ polkitbackend.h \ @@ -62,7 +55,6 @@ libpolkit_backend_1_la_SOURCES = \ polkitbackendauthority.h polkitbackendauthority.c \ polkitbackendinteractiveauthority.h polkitbackendinteractiveauthority.c \ polkitbackendlocalauthority.h polkitbackendlocalauthority.c \ - polkitbackendjsauthority.h polkitbackendjsauthority.c \ polkitbackendactionpool.h polkitbackendactionpool.c \ polkitbackendconfigsource.h polkitbackendconfigsource.c \ polkitbackendactionlookup.h polkitbackendactionlookup.c \ @@ -82,15 +74,13 @@ libpolkit_backend_1_la_CFLAGS = \ -D_POLKIT_BACKEND_COMPILATION \ $(GLIB_CFLAGS) \ $(LIBSYSTEMD_LOGIN_CFLAGS) \ - $(LIBJS_CFLAGS) \ + $(POLKIT_CFLAGS) $(NULL) -# Note: We don't include $(LIBJS_LIBS) here since it's dlopen()'ed in polkitbackendjsauthority.c -# libpolkit_backend_1_la_LIBADD = \ $(GLIB_LIBS) \ $(LIBSYSTEMD_LOGIN_LIBS) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ + $(POLKIT_LIBS) \ $(EXPAT_LIBS) \ $(NULL) @@ -99,46 +89,15 @@ rules_DATA = 50-pkla.rules # ---------------------------------------------------------------------------------------------------- -libprivdir = $(prefix)/lib/polkit-1 -libpriv_PROGRAMS = polkitd - -polkitd_SOURCES = \ - polkitd.c \ - $(NULL) - -polkitd_CFLAGS = \ - -DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE \ - -DG_LOG_DOMAIN=\"polkitd-1\" \ - $(GLIB_CFLAGS) \ - $(NULL) - -polkitd_LDADD = \ - $(GLIB_LIBS) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ - libpolkit-backend-1.la \ - $(NULL) - -# ---------------------------------------------------------------------------------------------------- - - -CLEANFILES = $(BUILT_SOURCES) - localauthorityconfigdir = $(sysconfdir)/polkit-1/localauthority.conf.d localauthorityconfig_DATA = 50-localauthority.conf EXTRA_DIST = \ $(localauthorityconfig_DATA) \ - init.js \ toarray.pl \ $(rules_DATA) \ $(NULL) -dist-hook : - (for i in $(BUILT_SOURCES) ; do rm -f $(distdir)/$$i ; done) - -clean-local : - rm -f *~ $(BUILT_SOURCES) - install-data-hook: mkdir -p $(DESTDIR)$(localstatedir)/lib/polkit-1 mkdir -p $(DESTDIR)$(localstatedir)/lib/polkit-1/localauthority/{10-vendor.d,20-org.d,30-site.d,50-local.d,90-mandatory.d} diff --git a/src/polkitbackend/polkitbackendauthority.c b/src/polkitbackend/polkitbackendauthority.c index 0f06768..a0f9958 100644 --- a/src/polkitbackend/polkitbackendauthority.c +++ b/src/polkitbackend/polkitbackendauthority.c @@ -31,7 +31,6 @@ #include "polkitbackendauthority.h" #include "polkitbackendlocalauthority.h" -#include "polkitbackendjsauthority.h" #include "polkitbackendprivate.h" @@ -1347,37 +1346,6 @@ polkit_backend_authority_register (PolkitBackendAuthority *authority, } -/** - * polkit_backend_authority_get: - * - * Gets the #PolkitBackendAuthority to use. - * - * Returns: A #PolkitBackendAuthority. Free with g_object_unref(). - */ -PolkitBackendAuthority * -polkit_backend_authority_get (void) -{ - PolkitBackendAuthority *authority; - - /* TODO: move to polkitd/main.c */ - - /* Announce that we've started in the generic log */ - openlog ("polkitd", - LOG_PID, - LOG_DAEMON); /* system daemons without separate facility value */ - syslog (LOG_INFO, "Started polkitd version %s", VERSION); - closelog (); - - /* then start logging to the secure log */ - openlog ("polkitd", - LOG_PID, - LOG_AUTHPRIV); /* security/authorization messages (private) */ - - authority = POLKIT_BACKEND_AUTHORITY (g_object_new (POLKIT_BACKEND_TYPE_JS_AUTHORITY, NULL)); - - return authority; -} - /* ---------------------------------------------------------------------------------------------------- */ typedef enum diff --git a/src/polkitbackend/polkitbackendauthority.h b/src/polkitbackend/polkitbackendauthority.h index f9f7385..6f860b6 100644 --- a/src/polkitbackend/polkitbackendauthority.h +++ b/src/polkitbackend/polkitbackendauthority.h @@ -270,8 +270,6 @@ gboolean polkit_backend_authority_revoke_temporary_authorization_by_id (PolkitBa /* --- */ -PolkitBackendAuthority *polkit_backend_authority_get (void); - gpointer polkit_backend_authority_register (PolkitBackendAuthority *authority, GDBusConnection *connection, const gchar *object_path, diff --git a/src/programs/Makefile.am b/src/programs/Makefile.am deleted file mode 100644 index 4e7273d..0000000 --- a/src/programs/Makefile.am +++ /dev/null @@ -1,90 +0,0 @@ - -NULL = - -INCLUDES = \ - -I$(top_builddir)/src \ - -I$(top_srcdir)/src \ - -DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \ - -DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \ - -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ - -DPACKAGE_BIN_DIR=\""$(bindir)"\" \ - -DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" \ - -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \ - -DPACKAGE_LIB_DIR=\""$(libdir)"\" \ - -D_POSIX_PTHREAD_SEMANTICS \ - -D_REENTRANT \ - $(NULL) - -# ---------------------------------------------------------------------------------------------------- - -bin_PROGRAMS = pkexec pkcheck pkaction pkttyagent - -# ---------------------------------------------------------------------------------------------------- - -pkexec_SOURCES = pkexec.c - -pkexec_CFLAGS = \ - $(SUID_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(AUTH_LIBS) \ - $(NULL) - -pkexec_LDADD = \ - $(GLIB_LIBS) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ - $(top_builddir)/src/polkitagent/libpolkit-agent-1.la \ - $(NULL) - -pkexec_LDFLAGS = \ - $(SUID_LDFLAGS) \ - $(AM_LDFLAGS) \ - $(NULL) - -# ---------------------------------------------------------------------------------------------------- - -pkcheck_SOURCES = pkcheck.c - -pkcheck_CFLAGS = \ - $(GLIB_CFLAGS) \ - $(NULL) - -pkcheck_LDADD = \ - $(GLIB_LIBS) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ - $(top_builddir)/src/polkitagent/libpolkit-agent-1.la \ - $(NULL) - -# ---------------------------------------------------------------------------------------------------- - -pkttyagent_SOURCES = pkttyagent.c - -pkttyagent_CFLAGS = \ - $(GLIB_CFLAGS) \ - $(NULL) - -pkttyagent_LDADD = \ - $(GLIB_LIBS) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ - $(top_builddir)/src/polkitagent/libpolkit-agent-1.la \ - $(NULL) - -# ---------------------------------------------------------------------------------------------------- - -pkaction_SOURCES = pkaction.c - -pkaction_CFLAGS = \ - $(GLIB_CFLAGS) \ - $(NULL) - -pkaction_LDADD = \ - $(GLIB_LIBS) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ - $(NULL) - -# ---------------------------------------------------------------------------------------------------- - -clean-local : - rm -f *~ - -install-exec-hook : - -chmod 4755 $(DESTDIR)$(bindir)/pkexec diff --git a/test/Makefile.am b/test/Makefile.am index 598e426..6684070 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,5 +1,5 @@ -SUBDIRS = mocklibc . polkit polkitbackend +SUBDIRS = mocklibc . polkitbackend AM_CFLAGS = $(GLIB_CFLAGS) noinst_LTLIBRARIES = libpolkit-test-helper.la diff --git a/test/polkitbackend/Makefile.am b/test/polkitbackend/Makefile.am index 46706d3..6471271 100644 --- a/test/polkitbackend/Makefile.am +++ b/test/polkitbackend/Makefile.am @@ -20,11 +20,12 @@ AM_CFLAGS = \ -D_POLKIT_COMPILATION \ -D_POLKIT_BACKEND_COMPILATION \ $(GLIB_CFLAGS) \ + $(POLKIT_CFLAGS) \ $(NULL) LDADD = \ $(GLIB_LIBS) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ + $(POLKIT_LIBS) \ $(top_builddir)/src/polkitbackend/libpolkit-backend-1.la\ $(top_builddir)/test/libpolkit-test-helper.la \ $(NULL) @@ -39,9 +40,6 @@ polkitbackendlocalauthorizationstoretest_SOURCES = polkitbackendlocalauthorizati TEST_PROGS += polkitbackendlocalauthoritytest polkitbackendlocalauthoritytest_SOURCES = polkitbackendlocalauthoritytest.c -TEST_PROGS += polkitbackendjsauthoritytest -polkitbackendjsauthoritytest_SOURCES = test-polkitbackendjsauthority.c - # ---------------------------------------------------------------------------------------------------- noinst_PROGRAMS = $(TEST_PROGS)