From: Jussi Laako Date: Mon, 10 Mar 2014 14:44:09 +0000 (+0200) Subject: Update to upstream 1.0.1 X-Git-Tag: accepted/tizen/ivi/20140310.173427~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b539cb740dad93950d9d89ec321c1b9622ccdab5;p=profile%2Fivi%2Fgsignond.git Update to upstream 1.0.1 Change-Id: Ibda71ee45e57dd921e49d36ffb57c3b23e972179 --- diff --git a/Makefile.am b/Makefile.am index 31cb70d..3015bb7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gsignond.pc -dist_sysconf_DATA = gsignond.conf +sysconf_DATA = gsignond.conf SUBDIRS = src test docs @@ -42,3 +42,10 @@ update-online-doc: git push ; \ popd > /dev/null && \ rm -rf $(PACKAGE)-$(VERSION) + +lcov: check + @rm -rf lcov-report + @lcov -c --directory src/ --output-file lcov.output + @genhtml lcov.output --output-directory lcov-report + @rm lcov.output + @echo "Coverage report is in file://$(abs_srcdir)/lcov-report/index.html" diff --git a/Makefile.in b/Makefile.in index 6b2796b..9c96e8b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,16 +35,17 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_sysconf_DATA) \ +DIST_COMMON = README $(am__configure_deps) \ $(srcdir)/${PACKAGE_NAME}-uninstalled.pc.in \ $(srcdir)/${PACKAGE_NAME}.pc.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure \ + $(srcdir)/gsignond.conf.in $(top_srcdir)/configure \ $(top_srcdir)/src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service.in \ $(top_srcdir)/test/daemon/services/com.google.code.AccountsSSO.gSingleSignOn.service.in \ AUTHORS COPYING.LIB ChangeLog INSTALL NEWS build-aux/ar-lib \ - build-aux/config.guess build-aux/config.sub build-aux/depcomp \ - build-aux/install-sh build-aux/ltmain.sh build-aux/missing + build-aux/compile build-aux/config.guess build-aux/config.sub \ + build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \ + build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -75,6 +59,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = ${PACKAGE_NAME}.pc ${PACKAGE_NAME}-uninstalled.pc \ + gsignond.conf \ src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service \ test/daemon/services/com.google.code.AccountsSSO.gSingleSignOn.service CONFIG_CLEAN_VPATH_FILES = @@ -93,11 +78,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -125,9 +105,9 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(sysconfdir)" \ - "$(DESTDIR)$(pkgconfigdir)" -DATA = $(dist_sysconf_DATA) $(pkgconfig_DATA) +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(sysconfdir)" +DATA = $(pkgconfig_DATA) $(sysconf_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -184,6 +164,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -210,6 +191,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -222,6 +204,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -325,7 +308,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gsignond.pc -dist_sysconf_DATA = gsignond.conf +sysconf_DATA = gsignond.conf SUBDIRS = src test docs EXTRA_DIST = dists tools all: config.h @@ -385,6 +368,8 @@ ${PACKAGE_NAME}.pc: $(top_builddir)/config.status $(srcdir)/${PACKAGE_NAME}.pc.i cd $(top_builddir) && $(SHELL) ./config.status $@ ${PACKAGE_NAME}-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/${PACKAGE_NAME}-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +gsignond.conf: $(top_builddir)/config.status $(srcdir)/gsignond.conf.in + cd $(top_builddir) && $(SHELL) ./config.status $@ src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service: $(top_builddir)/config.status $(top_srcdir)/src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service.in cd $(top_builddir) && $(SHELL) ./config.status $@ test/daemon/services/com.google.code.AccountsSSO.gSingleSignOn.service: $(top_builddir)/config.status $(top_srcdir)/test/daemon/services/com.google.code.AccountsSSO.gSingleSignOn.service.in @@ -398,48 +383,42 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt -install-dist_sysconfDATA: $(dist_sysconf_DATA) +install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \ - fi; \ + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done -uninstall-dist_sysconfDATA: +uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) - @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) -install-pkgconfigDATA: $(pkgconfig_DATA) + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) +install-sysconfDATA: $(sysconf_DATA) @$(NORMAL_INSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ + test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" + @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ done -uninstall-pkgconfigDATA: +uninstall-sysconfDATA: @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) + dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -610,10 +589,13 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -702,7 +684,7 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) + chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -771,7 +753,7 @@ check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(sysconfdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -832,7 +814,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: install-dist_sysconfDATA +install-exec-am: install-sysconfDATA install-html: install-html-recursive @@ -872,7 +854,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-dist_sysconfDATA uninstall-pkgconfigDATA +uninstall-am: uninstall-pkgconfigDATA uninstall-sysconfDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive @@ -885,15 +867,15 @@ uninstall-am: uninstall-dist_sysconfDATA uninstall-pkgconfigDATA distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ - install-dist_sysconfDATA install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-dist_sysconfDATA uninstall-pkgconfigDATA + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgconfigDATA \ + install-ps install-ps-am install-strip install-sysconfDATA \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-pkgconfigDATA uninstall-sysconfDATA valgrind: @@ -923,6 +905,13 @@ update-online-doc: popd > /dev/null && \ rm -rf $(PACKAGE)-$(VERSION) +lcov: check + @rm -rf lcov-report + @lcov -c --directory src/ --output-file lcov.output + @genhtml lcov.output --output-directory lcov-report + @rm lcov.output + @echo "Coverage report is in file://$(abs_srcdir)/lcov-report/index.html" + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/aclocal.m4 b/aclocal.m4 index 6a7deef..8c1d9eb 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- +# generated automatically by aclocal 1.11.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, @@ -14,8 +14,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -198,7 +198,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.6], [], +m4_if([$1], [1.11.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -214,7 +214,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.6])dnl +[AM_AUTOMAKE_VERSION([1.11.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff --git a/build-aux/ar-lib b/build-aux/ar-lib index 0f62c6f..c0286a4 100755 --- a/build-aux/ar-lib +++ b/build-aux/ar-lib @@ -2,7 +2,7 @@ # Wrapper for Microsoft lib.exe me=ar-lib -scriptversion=2012-03-01.08; # UTC +scriptversion=2012-01-30.22; # UTC # Copyright (C) 2010, 2012 Free Software Foundation, Inc. # Written by Peter Rosin . @@ -153,9 +153,7 @@ action=${action#-} delete= extract= list= -quick= replace= -index= create= while test -n "$action" @@ -164,10 +162,7 @@ do d*) delete=yes ;; x*) extract=yes ;; t*) list=yes ;; - q*) quick=yes ;; r*) replace=yes ;; - s*) index=yes ;; - S*) ;; # the index is always updated implicitly c*) create=yes ;; u*) ;; # TODO: don't ignore the update modifier v*) ;; # TODO: don't ignore the verbose modifier @@ -178,8 +173,8 @@ do action=${action#?} done -case $delete$extract$list$quick$replace,$index in - yes,* | ,yes) +case $delete$extract$list$replace in + yes) ;; yesyes*) func_error "more than one action specified" @@ -230,7 +225,7 @@ elif test -n "$extract"; then done fi -elif test -n "$quick$replace"; then +elif test -n "$replace"; then if test ! -f "$orig_archive"; then if test -z "$create"; then echo "$me: creating $orig_archive" diff --git a/build-aux/compile b/build-aux/compile new file mode 100755 index 0000000..531136b --- /dev/null +++ b/build-aux/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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, 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/config.sub b/build-aux/config.sub index 6205f84..c894da4 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. -timestamp='2012-04-18' +timestamp='2012-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -225,12 +225,6 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; -lynx*) os=-lynxos ;; @@ -1543,9 +1537,6 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; - hexagon-*) - os=-elf - ;; tic54x-*) os=-coff ;; diff --git a/build-aux/depcomp b/build-aux/depcomp index 25a39e6..bd0ac08 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-03-27.16; # UTC +scriptversion=2011-12-04.11; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# 2011 Free Software Foundation, Inc. # 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 @@ -28,7 +28,7 @@ scriptversion=2012-03-27.16; # UTC case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,8 +40,8 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by 'PROGRAMS ARGS'. - object Object file output by 'PROGRAMS ARGS'. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. @@ -57,12 +57,6 @@ EOF ;; esac -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' - if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -108,12 +102,6 @@ if test "$depmode" = msvc7msys; then depmode=msvc7 fi -if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. - gccflag=-qmakedep=gcc,-MF - depmode=gcc -fi - case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -168,14 +156,15 @@ gcc) ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the "deleted header file" problem. +## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' "$nl" < "$tmpdepfile" | -## Some versions of gcc put a space before the ':'. On the theory + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. @@ -214,15 +203,18 @@ sgi) # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the + # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ + tr ' ' ' +' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr "$nl" ' ' >> "$depfile" + tr ' +' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ + tr ' ' ' +' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -234,17 +226,10 @@ sgi) rm -f "$tmpdepfile" ;; -xlc) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts '$object:' at the + # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -274,11 +259,12 @@ aix) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependent.h'. + # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. + # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -289,26 +275,23 @@ aix) ;; icc) - # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. - # However on - # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want + # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\': + # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - # tcc 0.9.26 (FIXME still under development at the moment of writing) - # will emit a similar output, but also prepend the continuation lines - # with horizontal tabulation characters. + "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -317,21 +300,15 @@ icc) exit $stat fi rm -f "$depfile" - # Each line is of the form 'foo.o: dependent.h', - # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ - < "$tmpdepfile" > "$depfile" - sed ' - s/[ '"$tab"'][ '"$tab"']*/ /g - s/^ *// - s/ *\\*$// - s/^[^:]*: *// - /^$/d - /:$/d - s/$/ :/ - ' < "$tmpdepfile" >> "$depfile" + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -367,7 +344,7 @@ hp2) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. + # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -382,9 +359,9 @@ hp2) tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. + # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -430,7 +407,8 @@ tru64) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -465,11 +443,11 @@ msvc7) p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/'"$tab"'\1 \\/p +s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/'"$tab"'/ + s/.*/ / G p }' >> "$depfile" @@ -500,7 +478,7 @@ dashmstdout) shift fi - # Remove '-o $object'. + # Remove `-o $object'. IFS=" " for arg do @@ -520,14 +498,15 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for ':' + # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | - sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' "$nl" < "$tmpdepfile" | \ + tr ' ' ' +' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -583,7 +562,8 @@ makedepend) # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -603,7 +583,7 @@ cpp) shift fi - # Remove '-o $object'. + # Remove `-o $object'. IFS=" " for arg do @@ -672,8 +652,8 @@ msvisualcpp) sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 0096fe6..c2852d8 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu2 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1ubuntu2" +VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" package_revision=1.3337 diff --git a/build-aux/test-driver b/build-aux/test-driver new file mode 100755 index 0000000..d306056 --- /dev/null +++ b/build-aux/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# 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, 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/common.mk b/common.mk index 49bdeb0..34542ec 100644 --- a/common.mk +++ b/common.mk @@ -1,2 +1,3 @@ extensionsdir = $(pkglibdir)/extensions -pluginsdir = $(pkglibdir)/plugins +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins diff --git a/config.h.in b/config.h.in index a13a050..4c676a6 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Base path for user specific storage directories */ +#undef BASE_STORAGE_DIR + /* Enable ACL triggers */ #undef ENABLE_DB_ACL_TRIGGERS diff --git a/configure b/configure index 8c6f951..f2f3b5c 100755 --- a/configure +++ b/configure @@ -1,9 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gsignond 0.0.3. +# Generated by GNU Autoconf 2.68 for gsignond 1.0.1. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -132,31 +134,6 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -190,8 +167,7 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" +test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -244,25 +220,21 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -364,14 +336,6 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -493,10 +457,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -531,16 +491,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -552,8 +512,28 @@ else as_mkdir_p=false fi -as_test_x='test -x' -as_executable_p=as_fn_executable_p +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -587,8 +567,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gsignond' PACKAGE_TARNAME='gsignond' -PACKAGE_VERSION='0.0.3' -PACKAGE_STRING='gsignond 0.0.3' +PACKAGE_VERSION='1.0.1' +PACKAGE_STRING='gsignond 1.0.1' PACKAGE_BUGREPORT='' PACKAGE_URL='http://01.org/gsso' @@ -643,11 +623,14 @@ GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE +HAVE_GTK_DOC_FALSE +HAVE_GTK_DOC_TRUE GTKDOC_DEPS_LIBS GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE +GTKDOC_CHECK_PATH GTKDOC_CHECK DBUS_INTERFACES_DIR DBUS_SERVICES_DIR @@ -658,6 +641,8 @@ HAVE_DEBUG_TRUE MESSAGE_BUS_TYPE USE_GTESTDBUS_FALSE USE_GTESTDBUS_TRUE +BASE_STORAGE_DIR +KEYCHAIN_SYSCTX GTestDBus_LIBS GTestDBus_CFLAGS GLIB_MKENUMS @@ -801,9 +786,11 @@ enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock +enable_coverage enable_distcheck enable_dbus_type enable_keychain +enable_storagedir enable_debug enable_sql_log enable_acltriggers @@ -1291,6 +1278,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1376,7 +1365,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gsignond 0.0.3 to adapt to many kinds of systems. +\`configure' configures gsignond 1.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1446,7 +1435,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gsignond 0.0.3:";; + short | recursive ) echo "Configuration of gsignond 1.0.1:";; esac cat <<\_ACEOF @@ -1463,6 +1452,7 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-coverage compile with coverage info --enable-distcheck build for distcheck target --enable-dbus-type=dbus-type specify daemon dbus type: p2p(default): uses peer to peer dbus @@ -1471,6 +1461,9 @@ Optional Features: --enable-keychain=sysctx enable keychain access with system context "sysctx" + --enable-storagedir=path + enable storage at location "path" + instead of default "/var/db" --enable-debug enable debug features --enable-sql-log enable sql log feature --enable-acltriggers enable ACL before delete triggers @@ -1593,10 +1586,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gsignond configure 0.0.3 -generated by GNU Autoconf 2.69 +gsignond configure 1.0.1 +generated by GNU Autoconf 2.68 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1672,7 +1665,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - test -x conftest$ac_exeext + $as_test_x conftest$ac_exeext }; then : ac_retval=0 else @@ -1958,8 +1951,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gsignond $as_me 0.0.3, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by gsignond $as_me 1.0.1, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2379,7 +2372,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2548,7 +2541,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2588,7 +2581,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2639,7 +2632,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2692,7 +2685,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2817,7 +2810,7 @@ fi # Define the identity of the package. PACKAGE='gsignond' - VERSION='0.0.3' + VERSION='1.0.1' cat >>confdefs.h <<_ACEOF @@ -2962,7 +2955,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3002,7 +2995,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3055,7 +3048,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3096,7 +3089,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3154,7 +3147,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3198,7 +3191,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3644,7 +3637,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -struct stat; +#include +#include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3940,7 +3934,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3984,7 +3978,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4300,7 +4294,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -4376,7 +4370,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4442,7 +4436,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4509,7 +4503,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -4765,7 +4759,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4809,7 +4803,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5233,7 +5227,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5273,7 +5267,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5579,7 +5573,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5619,7 +5613,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5722,7 +5716,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5766,7 +5760,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5891,7 +5885,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5931,7 +5925,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5990,7 +5984,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6030,7 +6024,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6679,7 +6673,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6719,7 +6713,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6799,7 +6793,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6839,7 +6833,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6891,7 +6885,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6931,7 +6925,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6983,7 +6977,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7023,7 +7017,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7075,7 +7069,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7115,7 +7109,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7167,7 +7161,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7207,7 +7201,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11738,7 +11732,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11781,7 +11775,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12225,7 +12219,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GLIB_MKENUMS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12248,6 +12242,15 @@ fi +# Check whether --enable-coverage was given. +if test "${enable_coverage+set}" = set; then : + enableval=$enable_coverage; +fi + +if test "x$enable_coverage" = "xyes"; then : + CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" +fi + # allow fake installations for "distcheck" # Check whether --enable-distcheck was given. if test "${enable_distcheck+set}" = set; then : @@ -12388,8 +12391,28 @@ cat >>confdefs.h <<_ACEOF #define KEYCHAIN_SYSCTX "$enable_keychain" _ACEOF + KEYCHAIN_SYSCTX="#KeychainSystemContext = $enable_keychain" + +else + KEYCHAIN_SYSCTX="#KeychainSystemContext = \"\"" + +fi + +# Check whether --enable-storagedir was given. +if test "${enable_storagedir+set}" = set; then : + enableval=$enable_storagedir; enable_storagedir=$enableval +else + enable_storagedir="/var/db" fi + +cat >>confdefs.h <<_ACEOF +#define BASE_STORAGE_DIR "$enable_storagedir" +_ACEOF + +BASE_STORAGE_DIR="#StoragePath = $enable_storagedir" + + # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; enable_debug=yes @@ -12467,16 +12490,78 @@ fi - # Extract the first word of "gtkdoc-check", so it can be a program name with args. + gtk_doc_requires="gtk-doc >= 1.18" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 +$as_echo_n "checking for gtk-doc... " >&6; } + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_doc_requires") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + have_gtk_doc=yes +else + have_gtk_doc=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5 +$as_echo "$have_gtk_doc" >&6; } + + if test "$have_gtk_doc" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found." >&5 +$as_echo "$as_me: WARNING: + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found." >&2;} + fi + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_CHECK+:} false; then : +if ${ac_cv_prog_GTKDOC_CHECK+:} false; then : $as_echo_n "(cached) " >&6 else - case $GTKDOC_CHECK in + if test -n "$GTKDOC_CHECK"; then + ac_cv_prog_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_GTKDOC_CHECK="gtkdoc-check.test" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GTKDOC_CHECK=$ac_cv_prog_GTKDOC_CHECK +if test -n "$GTKDOC_CHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 +$as_echo "$GTKDOC_CHECK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. +set dummy gtkdoc-check; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GTKDOC_CHECK_PATH+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GTKDOC_CHECK_PATH in [\\/]* | ?:[\\/]*) - ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. + ac_cv_path_GTKDOC_CHECK_PATH="$GTKDOC_CHECK_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12485,8 +12570,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GTKDOC_CHECK_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12497,10 +12582,10 @@ IFS=$as_save_IFS ;; esac fi -GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK -if test -n "$GTKDOC_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 -$as_echo "$GTKDOC_CHECK" >&6; } +GTKDOC_CHECK_PATH=$ac_cv_path_GTKDOC_CHECK_PATH +if test -n "$GTKDOC_CHECK_PATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5 +$as_echo "$GTKDOC_CHECK_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -12527,7 +12612,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12571,7 +12656,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12613,18 +12698,19 @@ else fi - if test x$enable_gtk_doc = xyes; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.18\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.18") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - : -else - as_fn_error $? "You need to have gtk-doc >= 1.18 installed to build $PACKAGE_NAME" "$LINENO" 5 -fi - if test "x$PACKAGE_NAME" != "xglib"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 +$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 +$as_echo "$enable_gtk_doc" >&6; } + + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + as_fn_error $? " + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '$0'." "$LINENO" 5 + fi + + if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 @@ -12696,14 +12782,8 @@ else $as_echo "yes" >&6; } fi - fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 -$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 -$as_echo "$enable_gtk_doc" >&6; } - # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; @@ -12728,6 +12808,14 @@ fi fi + if test x$have_gtk_doc = xyes; then + HAVE_GTK_DOC_TRUE= + HAVE_GTK_DOC_FALSE='#' +else + HAVE_GTK_DOC_TRUE='#' + HAVE_GTK_DOC_FALSE= +fi + if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' @@ -12788,12 +12876,16 @@ done GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -D_POSIX_C_SOURCE=\\\"200809L\\\" -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE" # Checks for typedefs, structures, and compiler characteristics. -GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Wall -Werror -DG_LOG_DOMAIN=\\\"gsignond\\\"" +GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Wall -DG_LOG_DOMAIN=\\\"gsignond\\\"" +if test "x$enable_debug" = "xno" ; then + GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Werror" +fi + # GSIGNOND_LIBS="$GSIGNOND_LIBS -lduma" # Checks for library functions. -ac_config_files="$ac_config_files Makefile ${PACKAGE_NAME}.pc ${PACKAGE_NAME}-uninstalled.pc docs/Makefile src/Makefile src/common/Makefile src/common/db/Makefile src/daemon/Makefile src/daemon/db/Makefile src/daemon/dbus/Makefile src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service src/daemon/plugins/Makefile src/daemon/plugins/plugind/Makefile src/extensions/Makefile src/extensions/test/Makefile src/extensions/tizen/Makefile src/plugins/Makefile src/plugins/password/Makefile src/plugins/ssotest/Makefile src/plugins/digest/Makefile test/Makefile test/common/Makefile test/db/Makefile test/daemon/Makefile test/daemon/gsignond-dbus.conf test/plugins/Makefile" +ac_config_files="$ac_config_files Makefile ${PACKAGE_NAME}.pc ${PACKAGE_NAME}-uninstalled.pc gsignond.conf docs/Makefile src/Makefile src/common/Makefile src/common/db/Makefile src/daemon/Makefile src/daemon/db/Makefile src/daemon/dbus/Makefile src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service src/daemon/plugins/Makefile src/gplugind/Makefile src/extensions/Makefile src/extensions/test/Makefile src/extensions/tizen/Makefile src/plugins/Makefile src/plugins/password/Makefile src/plugins/ssotest/Makefile src/plugins/digest/Makefile test/Makefile test/common/Makefile test/db/Makefile test/daemon/Makefile test/daemon/gsignond-dbus.conf test/plugins/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -12940,6 +13032,10 @@ if test -z "${SET_PERMISSIONS_TRUE}" && test -z "${SET_PERMISSIONS_FALSE}"; then as_fn_error $? "conditional \"SET_PERMISSIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -13258,16 +13354,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -13327,16 +13423,28 @@ else as_mkdir_p=false fi - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -13357,8 +13465,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gsignond $as_me 0.0.3, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by gsignond $as_me 1.0.1, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13424,11 +13532,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gsignond config.status 0.0.3 -configured by $0, generated by GNU Autoconf 2.69, +gsignond config.status 1.0.1 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -13519,7 +13627,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -13836,6 +13944,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "${PACKAGE_NAME}.pc") CONFIG_FILES="$CONFIG_FILES ${PACKAGE_NAME}.pc" ;; "${PACKAGE_NAME}-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES ${PACKAGE_NAME}-uninstalled.pc" ;; + "gsignond.conf") CONFIG_FILES="$CONFIG_FILES gsignond.conf" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/common/Makefile" ;; @@ -13845,7 +13954,7 @@ do "src/daemon/dbus/Makefile") CONFIG_FILES="$CONFIG_FILES src/daemon/dbus/Makefile" ;; "src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service") CONFIG_FILES="$CONFIG_FILES src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service" ;; "src/daemon/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES src/daemon/plugins/Makefile" ;; - "src/daemon/plugins/plugind/Makefile") CONFIG_FILES="$CONFIG_FILES src/daemon/plugins/plugind/Makefile" ;; + "src/gplugind/Makefile") CONFIG_FILES="$CONFIG_FILES src/gplugind/Makefile" ;; "src/extensions/Makefile") CONFIG_FILES="$CONFIG_FILES src/extensions/Makefile" ;; "src/extensions/test/Makefile") CONFIG_FILES="$CONFIG_FILES src/extensions/test/Makefile" ;; "src/extensions/tizen/Makefile") CONFIG_FILES="$CONFIG_FILES src/extensions/tizen/Makefile" ;; @@ -15366,6 +15475,10 @@ if test -z "${SET_PERMISSIONS_TRUE}" && test -z "${SET_PERMISSIONS_FALSE}"; then as_fn_error $? "conditional \"SET_PERMISSIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15688,16 +15801,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' + as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi else - as_ln_s='cp -pR' + as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -15757,16 +15870,28 @@ else as_mkdir_p=false fi - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -15787,8 +15912,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gsignond $as_me 0.0.3, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by gsignond $as_me 1.0.1, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15854,11 +15979,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gsignond config.status 0.0.3 -configured by $0, generated by GNU Autoconf 2.69, +gsignond config.status 1.0.1 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15949,7 +16074,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -16267,6 +16392,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "${PACKAGE_NAME}.pc") CONFIG_FILES="$CONFIG_FILES ${PACKAGE_NAME}.pc" ;; "${PACKAGE_NAME}-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES ${PACKAGE_NAME}-uninstalled.pc" ;; + "gsignond.conf") CONFIG_FILES="$CONFIG_FILES gsignond.conf" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/common/Makefile" ;; @@ -16276,7 +16402,7 @@ do "src/daemon/dbus/Makefile") CONFIG_FILES="$CONFIG_FILES src/daemon/dbus/Makefile" ;; "src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service") CONFIG_FILES="$CONFIG_FILES src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service" ;; "src/daemon/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES src/daemon/plugins/Makefile" ;; - "src/daemon/plugins/plugind/Makefile") CONFIG_FILES="$CONFIG_FILES src/daemon/plugins/plugind/Makefile" ;; + "src/gplugind/Makefile") CONFIG_FILES="$CONFIG_FILES src/gplugind/Makefile" ;; "src/extensions/Makefile") CONFIG_FILES="$CONFIG_FILES src/extensions/Makefile" ;; "src/extensions/test/Makefile") CONFIG_FILES="$CONFIG_FILES src/extensions/test/Makefile" ;; "src/extensions/tizen/Makefile") CONFIG_FILES="$CONFIG_FILES src/extensions/tizen/Makefile" ;; diff --git a/configure.ac b/configure.ac index 3281447..4af9ddb 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.60]) -AC_INIT([gsignond], [0.0.3],[],[],[http://01.org/gsso]) +AC_INIT([gsignond], [1.0.1],[],[],[http://01.org/gsso]) AC_CONFIG_SRCDIR([src/daemon/main.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([build-aux]) @@ -52,6 +52,11 @@ fi AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) +AC_ARG_ENABLE([coverage], + [AS_HELP_STRING([--enable-coverage], [compile with coverage info])]) +AS_IF([test "x$enable_coverage" = "xyes"], + [CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"]) + # allow fake installations for "distcheck" AC_ARG_ENABLE(distcheck, [ --enable-distcheck build for distcheck target], @@ -104,9 +109,28 @@ AC_ARG_ENABLE(keychain, system context "sysctx"], [enable_keychain=$enableval]) if test "x$enable_keychain" != "x" ; then - AC_DEFINE_UNQUOTED(KEYCHAIN_SYSCTX, ["$enable_keychain"], [Keychain system context]) + AC_DEFINE_UNQUOTED(KEYCHAIN_SYSCTX, + ["$enable_keychain"], + [Keychain system context]) + AC_SUBST(KEYCHAIN_SYSCTX, + ["#KeychainSystemContext = $enable_keychain"]) +else + AC_SUBST(KEYCHAIN_SYSCTX, + ["#KeychainSystemContext = \"\""]) fi +AC_ARG_ENABLE(storagedir, + [ --enable-storagedir=path + enable storage at location "path" + instead of default "/var/db"], + [enable_storagedir=$enableval], + [enable_storagedir="/var/db"]) +AC_DEFINE_UNQUOTED(BASE_STORAGE_DIR, + ["$enable_storagedir"], + [Base path for user specific storage directories]) +AC_SUBST(BASE_STORAGE_DIR, + ["#StoragePath = $enable_storagedir"]) + AC_ARG_ENABLE(debug, [ --enable-debug enable debug features], [enable_debug=yes], [enable_debug=no]) @@ -150,7 +174,11 @@ AC_CHECK_HEADERS([string.h]) GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -D_POSIX_C_SOURCE=\\\"200809L\\\" -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE" # Checks for typedefs, structures, and compiler characteristics. -GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Wall -Werror -DG_LOG_DOMAIN=\\\"gsignond\\\"" +GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Wall -DG_LOG_DOMAIN=\\\"gsignond\\\"" +if test "x$enable_debug" = "xno" ; then + GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Werror" +fi + # GSIGNOND_LIBS="$GSIGNOND_LIBS -lduma" # Checks for library functions. @@ -159,6 +187,7 @@ AC_OUTPUT([ Makefile ${PACKAGE_NAME}.pc ${PACKAGE_NAME}-uninstalled.pc +gsignond.conf docs/Makefile src/Makefile src/common/Makefile @@ -168,7 +197,7 @@ src/daemon/db/Makefile src/daemon/dbus/Makefile src/daemon/dbus/services/com.google.code.AccountsSSO.gSingleSignOn.service src/daemon/plugins/Makefile -src/daemon/plugins/plugind/Makefile +src/gplugind/Makefile src/extensions/Makefile src/extensions/test/Makefile src/extensions/tizen/Makefile diff --git a/dists/debian/changelog b/dists/debian/changelog index 8fedc96..172ed49 100644 --- a/dists/debian/changelog +++ b/dists/debian/changelog @@ -1,3 +1,28 @@ +gsignond (1.0.1-4) unstable; urgency=low + + * Update to 1.0.1 + + -- Jussi Laako Fri, 07 Mar 2014 16:22:00 +0200 + +gsignond (0.0.4-3) unstable; urgency=low + + * Update to 0.0.4 + + -- Jussi Laako Fri, 28 Feb 2014 15:44:00 +0200 + +gsignond (0.0.3-2) unstable; urgency=low + + * Minor update + + -- Jussi Laako Wed, 08 Jan 2014 17:37:00 +0200 + +gsignond (0.0.3-1) unstable; urgency=low + + * Bug fixes in UI interaction + * Documentation support + + -- Alexander Kanavin Fri, 23 Aug 2013 15:55:07 +0300 + gsignond (0.0.2-1) unstable; urgency=low * Initial Release. diff --git a/dists/debian/install b/dists/debian/install index 173ee00..b5017d5 100644 --- a/dists/debian/install +++ b/dists/debian/install @@ -1,7 +1,7 @@ /usr/bin/gsignond -/usr/bin/gsignond-plugind /usr/lib/libgsignond-*.so.* /usr/lib/gsignond/extensions/*.so* -/usr/lib/gsignond/plugins/*.so* +/usr/lib/gsignond/gplugins/*.so* +/usr/lib/gsignond/pluginloaders/gsignond-plugind /usr/share/dbus-1/services/*SingleSignOn*.service /etc/gsignond.conf diff --git a/dists/debian/postinst b/dists/debian/postinst index 301a61b..9bcbdb2 100644 --- a/dists/debian/postinst +++ b/dists/debian/postinst @@ -22,6 +22,7 @@ case "$1" in configure) ldconfig groupadd -f -r gsignond + chmod 4755 /usr/bin/gsignond ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/dists/debian/rules b/dists/debian/rules index 4658a60..c59a978 100755 --- a/dists/debian/rules +++ b/dists/debian/rules @@ -3,6 +3,9 @@ DEB_CONFIGURE_EXTRA_FLAGS += --enable-dbus-type=session +# Optionally build a debug version +#DEB_CONFIGURE_EXTRA_FLAGS += --enable-debug + # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 diff --git a/dists/rpm/gsignond-0.0.2-10/gsignond-0.0.2.tar.gz b/dists/rpm/gsignond-0.0.2-10/gsignond-0.0.2.tar.gz deleted file mode 100644 index e134af9..0000000 Binary files a/dists/rpm/gsignond-0.0.2-10/gsignond-0.0.2.tar.gz and /dev/null differ diff --git a/dists/rpm/gsignond-0.0.2-10/gsignond-suse.spec b/dists/rpm/gsignond-0.0.2-10/gsignond-suse.spec deleted file mode 100644 index 92fa44e..0000000 --- a/dists/rpm/gsignond-0.0.2-10/gsignond-suse.spec +++ /dev/null @@ -1,131 +0,0 @@ -# define used dbus type [p2p, session, system] -%define dbus_type session -# enable debug features such as control environment variables -# WARNING! do not use for production builds as it will break security -%define debug_build 0 - -Name: gsignond -Summary: GLib based Single Sign-On daemon -Version: 0.0.2 -Release: 11 -Group: System/Daemons -License: LGPL-2.1+ -Source: %{name}-%{version}.tar.gz -Provides: gsignon -%if %{dbus_type} != "p2p" -Requires: dbus-1 -%endif -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig -BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(gtk-doc) -BuildRequires: pkgconfig(glib-2.0) >= 2.30 -BuildRequires: pkgconfig(gobject-2.0) -BuildRequires: pkgconfig(gio-2.0) -BuildRequires: pkgconfig(gio-unix-2.0) -BuildRequires: pkgconfig(gmodule-2.0) -BuildRequires: pkgconfig(sqlite3) - - -%description -%{summary}. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -%{summary}. - - -%package doc -Summary: Documentation files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description doc -%{summary}. - - -%prep -%setup -q -n %{name}-%{version} -#gtkdocize -# for repository snapshot packages -#aclocal -#autoheader -#libtoolize --copy --force -#autoconf -#automake --add-missing --copy -#autoreconf --install --force -# fore release source packages -autoreconf -f -i - - -%build -%if %{debug_build} == 1 -%configure --enable-dbus-type=%{dbus_type} --enable-debug -%else -%configure --enable-dbus-type=%{dbus_type} -%endif - -make %{?_smp_mflags} - - -%install -rm -rf %{buildroot} -%make_install - - -%post -/sbin/ldconfig -chmod u+s %{_bindir}/%{name} -groupadd -f -r gsignond - - -%postun -p /sbin/ldconfig - - -%files -%defattr(-,root,root,-) -%doc AUTHORS COPYING.LIB INSTALL NEWS README -%{_bindir}/%{name} -%{_bindir}/%{name}-plugind -%{_libdir}/lib%{name}-*.so.* -%{_libdir}/%{name}/extensions/*.so* -%{_libdir}/%{name}/plugins/*.so* -%if %{dbus_type} != "p2p" -%{_datadir}/dbus-1/services/*SingleSignOn*.service -%endif -%exclude %{_libdir}/gsignond/extensions/*.la -%exclude %{_libdir}/gsignond/plugins/*.la -%config(noreplace) %{_sysconfdir}/gsignond.conf - - -%files devel -%defattr(-,root,root,-) -%{_includedir}/%{name}/*.h -%{_libdir}/lib%{name}-*.so -%{_libdir}/lib%{name}-*.la -%{_libdir}/pkgconfig/%{name}.pc -%if %{dbus_type} != "p2p" -%{_datadir}/dbus-1/interfaces/*SSO*.xml -%endif - - -%files doc -%defattr(-,root,root,-) -%{_datadir}/gtk-doc/html/gsignond/* - - -%changelog -* Mon Jun 24 2013 Imran Zaman -- Release 0.0.2 that comprises of bug fixes - -* Wed Jun 12 2013 Jussi Laako -- Prepare for first release - -* Thu Feb 08 2013 Jussi Laako -- Initial RPM packaging - diff --git a/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.changes b/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.changes deleted file mode 100644 index 422e3d1..0000000 --- a/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.changes +++ /dev/null @@ -1,8 +0,0 @@ -* Mon Jun 24 2013 Imran Zaman -- Release 0.0.2 that comprises of bug fixes - -* Wed Jun 12 2013 Jussi Laako -- Prepare for first release - -* Thu Feb 08 2013 Jussi Laako -- Initial RPM packaging diff --git a/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.spec b/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.spec deleted file mode 100644 index 8c69349..0000000 --- a/dists/rpm/gsignond-0.0.2-10/gsignond-tizen.spec +++ /dev/null @@ -1,113 +0,0 @@ -# define used dbus type [p2p, session, system] -%define dbus_type p2p -# enable debug features such as control environment variables -# WARNING! do not use for production builds as it will break security -%define debug_build 0 - -Name: gsignond -Summary: GLib based Single Sign-On daemon -Version: 0.0.2 -Release: 10 -VCS: p/accounts-sso.gsignond/#b31ed6e880b0dcd7635147a57b870c0c137cfce0 -Group: System/Daemons -License: LGPL-2.1+ -Source: %{name}-%{version}.tar.gz -Provides: gsignon -%if %{dbus_type} != "p2p" -Requires: dbus-1 -%endif -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig -BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(glib-2.0) >= 2.30 -BuildRequires: pkgconfig(gobject-2.0) -BuildRequires: pkgconfig(gio-2.0) -BuildRequires: pkgconfig(gio-unix-2.0) -BuildRequires: pkgconfig(gmodule-2.0) -BuildRequires: pkgconfig(sqlite3) - - -%description -%{summary}. - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -%{summary}. - - -%package doc -Summary: Documentation files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description doc -%{summary}. - - -%prep -%setup -q -n %{name}-%{version} -if [ -f = "gtk-doc.make" ] -then -rm gtk-doc.make -fi -touch gtk-doc.make -autoreconf -f -i - - -%build -%if %{debug_build} == 1 -%configure --enable-dbus-type=%{dbus_type} --enable-debug -%else -%configure --enable-dbus-type=%{dbus_type} -%endif - -make %{?_smp_mflags} - - -%install -rm -rf %{buildroot} -%make_install - - -%post -/sbin/ldconfig -chmod u+s %{_bindir}/%{name} -groupadd -f -r gsignond - - -%postun -p /sbin/ldconfig - - -%files -%defattr(-,root,root,-) -%doc AUTHORS COPYING.LIB INSTALL NEWS README -%{_bindir}/%{name} -%{_bindir}/%{name}-plugind -%{_libdir}/lib%{name}-*.so.* -%{_libdir}/%{name}/extensions/*.so* -%{_libdir}/%{name}/plugins/*.so* -%if %{dbus_type} != "p2p" -%{_datadir}/dbus-1/services/*SingleSignOn*.service -%endif -%config(noreplace) %{_sysconfdir}/gsignond.conf - - -%files devel -%defattr(-,root,root,-) -%{_includedir}/%{name}/*.h -%{_libdir}/lib%{name}-*.so -%{_libdir}/pkgconfig/%{name}.pc -%if %{dbus_type} != "p2p" -%{_datadir}/dbus-1/interfaces/*SSO*.xml -%endif - - -%files doc -%defattr(-,root,root,-) -%{_datadir}/gtk-doc/html/gsignond/* - diff --git a/dists/rpm/gsignond-suse.spec b/dists/rpm/gsignond-suse.spec index 15babec..121d7e1 100644 --- a/dists/rpm/gsignond-suse.spec +++ b/dists/rpm/gsignond-suse.spec @@ -6,11 +6,12 @@ Name: gsignond Summary: GLib based Single Sign-On daemon -Version: 0.0.3 +Version: 1.0.1 Release: 1 Group: System/Daemons License: LGPL-2.1+ Source: %{name}-%{version}.tar.gz +URL: https://01.org/gsso Provides: gsignon %if %{dbus_type} != "p2p" Requires: dbus-1 @@ -51,21 +52,15 @@ Requires: %{name} = %{version}-%{release} %prep %setup -q -n %{name}-%{version} -#gtkdocize # for repository snapshot packages -#aclocal -#autoheader -#libtoolize --copy --force -#autoconf -#automake --add-missing --copy -#autoreconf --install --force +#gtkdocize # fore release source packages autoreconf -f -i %build %if %{debug_build} == 1 -%configure --enable-dbus-type=%{dbus_type} --enable-debug +%configure --enable-dbus-type=%{dbus_type} --enable-debug --enable-gtk-doc %else %configure --enable-dbus-type=%{dbus_type} %endif @@ -91,15 +86,15 @@ groupadd -f -r gsignond %defattr(-,root,root,-) %doc AUTHORS COPYING.LIB INSTALL NEWS README %{_bindir}/%{name} -%{_bindir}/%{name}-plugind %{_libdir}/lib%{name}-*.so.* %{_libdir}/%{name}/extensions/*.so* -%{_libdir}/%{name}/plugins/*.so* +%{_libdir}/%{name}/gplugins/*.so* +%{_libdir}/%{name}/pluginloaders/%{name}-plugind %if %{dbus_type} != "p2p" %{_datadir}/dbus-1/services/*SingleSignOn*.service %endif %exclude %{_libdir}/gsignond/extensions/*.la -%exclude %{_libdir}/gsignond/plugins/*.la +%exclude %{_libdir}/gsignond/gplugins/*.la %config(noreplace) %{_sysconfdir}/gsignond.conf @@ -120,6 +115,20 @@ groupadd -f -r gsignond %changelog +* Fri Mar 07 2014 Jussi Laako +- Release 1.0.1 + +* Thu Mar 06 2014 Imran Zaman +- Release 1.0.0 + +* Fri Feb 28 2014 Jussi Laako +- Release 0.0.4 + +* Thu Aug 22 2013 Amarnath Valluri +- Release 0.0.3 +- Bug fixes in UI interaction +- Documentation support + * Mon Jun 24 2013 Imran Zaman - Release 0.0.2 that comprises of bug fixes diff --git a/dists/rpm/gsignond-tizen.changes b/dists/rpm/gsignond-tizen.changes index 0fc9fd8..ca4ba25 100644 --- a/dists/rpm/gsignond-tizen.changes +++ b/dists/rpm/gsignond-tizen.changes @@ -1,3 +1,18 @@ +* Fri Mar 07 2014 Jussi Laako +- Release 1.0.1 + +* Thu Mar 06 2014 Imran Zaman +- Release 1.0.0 +- Assorted fixes and cleanups, updated version +- docs: add documentation for multple plugin loaders +- Update .gitignore +- plugins: simplify process killing +- plugind: export the plugin object on d-bus after connecting all the signals and setting properties +- Other memory leak and bug fixes + +* Fri Feb 28 2014 Jussi Laako +- Release 0.0.4 + * Thu Aug 22 2013 Amarnath Valluri - Release 0.0.3 - Bug fixes in UI interaction diff --git a/dists/rpm/gsignond-tizen.manifest b/dists/rpm/gsignond-tizen.manifest new file mode 100644 index 0000000..75b0fa5 --- /dev/null +++ b/dists/rpm/gsignond-tizen.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/dists/rpm/gsignond-tizen.spec b/dists/rpm/gsignond-tizen.spec index 8ee6300..101f5c1 100644 --- a/dists/rpm/gsignond-tizen.spec +++ b/dists/rpm/gsignond-tizen.spec @@ -6,11 +6,13 @@ Name: gsignond Summary: GLib based Single Sign-On daemon -Version: 0.0.3 +Version: 1.0.0 Release: 1 Group: System/Daemons License: LGPL-2.1+ Source: %{name}-%{version}.tar.gz +URL: https://01.org/gsso +Source1001: %{name}.manifest Provides: gsignon %if %{dbus_type} != "p2p" Requires: dbus-1 @@ -71,12 +73,13 @@ make %{?_smp_mflags} %install rm -rf %{buildroot} %make_install +cp -a %{SOURCE1001} %{buildroot}%{_datadir}/%{name}.manifest %post /sbin/ldconfig chmod u+s %{_bindir}/%{name} -groupadd -f -r gsignond +getent group gsignond > /dev/null || /usr/sbin/groupadd -r gsignond %postun -p /sbin/ldconfig @@ -84,12 +87,13 @@ groupadd -f -r gsignond %files %defattr(-,root,root,-) +%manifest %{_datadir}/%{name}.manifest %doc AUTHORS COPYING.LIB INSTALL NEWS README %{_bindir}/%{name} -%{_bindir}/%{name}-plugind %{_libdir}/lib%{name}-*.so.* %{_libdir}/%{name}/extensions/*.so* -%{_libdir}/%{name}/plugins/*.so* +%{_libdir}/%{name}/gplugins/*.so* +%{_libdir}/%{name}/pluginloaders/%{name}-plugind %if %{dbus_type} != "p2p" %{_datadir}/dbus-1/services/*SingleSignOn*.service %endif diff --git a/docs/Makefile.am b/docs/Makefile.am index dd8b8a5..c4992d1 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -66,7 +66,6 @@ gsignond-identity-info.h\ gsignond-identity-info-internal.h\ gsignond-pipe-stream.h\ gsignond-plugin-enum-types.h\ -gsignond-plugin-loader.h\ gsignond-db-defines.h\ gsignond-db-error.h\ gsignond-db-secret-database.h\ @@ -79,7 +78,7 @@ HTML_IMAGES= # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml -content_files=building.xml +content_files=building.xml plugin-loaders-overview.xml # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files @@ -114,8 +113,10 @@ EXTRA_DIST += # Comment this out if you want 'make check' to test you doc status # and run some sanity checks if ENABLE_GTK_DOC -TESTS_ENVIRONMENT = cd $(srcdir) && \ +TESTS_ENVIRONMENT = \ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) TESTS = $(GTKDOC_CHECK) endif + +CLEANFILES += $(DOC_MODULE)-*.txt $(DOC_MODULE).types diff --git a/docs/Makefile.in b/docs/Makefile.in index 0bb399e..8166976 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -21,23 +21,6 @@ # Everything below here is generic # #################################### VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -79,11 +62,6 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -95,6 +73,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -121,6 +100,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -133,6 +113,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -292,7 +273,6 @@ gsignond-identity-info.h\ gsignond-identity-info-internal.h\ gsignond-pipe-stream.h\ gsignond-plugin-enum-types.h\ -gsignond-plugin-loader.h\ gsignond-db-defines.h\ gsignond-db-error.h\ gsignond-db-secret-database.h\ @@ -306,7 +286,7 @@ HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml -content_files = building.xml +content_files = building.xml plugin-loaders-overview.xml # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files @@ -351,9 +331,9 @@ SETUP_FILES = \ # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) -DOC_STAMPS = setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ +DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ - tmpl.stamp sgml.stamp html.stamp pdf.stamp + sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -367,11 +347,12 @@ REPORT_FILES = \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) -@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = -@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp -@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = -@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) \ + gtkdoc-check.test $(DOC_MODULE)-*.txt $(DOC_MODULE).types +@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = +@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp +@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = +@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) @@ -386,11 +367,6 @@ GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; -#### templates #### -GTK_DOC_V_TMPL = $(GTK_DOC_V_TMPL_$(V)) -GTK_DOC_V_TMPL_ = $(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_TMPL_0 = @echo " DOC Rebuilding template files"; - #### xml #### GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) @@ -416,7 +392,7 @@ GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; # Comment this out if you want 'make check' to test you doc status # and run some sanity checks -@ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = cd $(srcdir) && \ +@ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = \ @ENABLE_GTK_DOC_TRUE@ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ @ENABLE_GTK_DOC_TRUE@ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) @@ -597,6 +573,7 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am +@ENABLE_GTK_DOC_FALSE@all-local: all-am: Makefile all-local installdirs: install: install-am @@ -714,8 +691,15 @@ uninstall-am: uninstall-local uninstall-local -@ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -@ENABLE_GTK_DOC_FALSE@all-local: +gtkdoc-check.test: Makefile + $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ + echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ + chmod +x $@ + +all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +.PHONY: all-gtk-doc + +@ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @@ -726,17 +710,16 @@ setup-build.stamp: files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ - cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ - test -d $(abs_srcdir)/tmpl && \ - { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ - chmod -R u+w $(abs_builddir)/tmpl; } \ fi $(AM_V_at)touch setup-build.stamp -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) +scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @@ -762,23 +745,8 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true -tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - if test -w $(abs_srcdir) ; then \ - cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ - fi \ - fi - $(AM_V_at)touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -$(srcdir)/tmpl/*.sgml: - @true - -sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) + $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ @@ -840,13 +808,15 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) clean-local: @rm -f *~ *.bak @rm -rf .libs + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ + rm -f $(DOC_MODULE).types; \ + fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ - rm -rf tmpl; \ fi maintainer-clean-local: @@ -885,15 +855,15 @@ uninstall-local: # # Require gtk-doc when making dist # -@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: docs -@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: -@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" -@ENABLE_GTK_DOC_FALSE@ @false - -dist-hook: dist-check-gtkdoc dist-hook-local - @mkdir $(distdir)/tmpl +@HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs +@HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: +@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" +@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" +@HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" +@HAVE_GTK_DOC_FALSE@ @false + +dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/html - @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ diff --git a/docs/building.xml b/docs/building.xml index 66ea61e..5bb8590 100644 --- a/docs/building.xml +++ b/docs/building.xml @@ -163,6 +163,30 @@ + + <systemitem>--enable-keychain=sysctx</systemitem> + + + Sets the system security context of keychain UI process as returned by + the default + GSignondAccessControlManager. This value becomes written to the + gsignond.conf in addition to being encoded as default value + through config.h. + + + + + <systemitem>--enable-storagedir=path</systemitem> + + + Sets the base path for user specific storage directories where + database files will be located as utilised by + + GSignondStorageManager. + Default location is /var/db + + + Building distribution packages diff --git a/docs/gsignond-docs.sgml b/docs/gsignond-docs.sgml index abd68c2..ad6c96e 100644 --- a/docs/gsignond-docs.sgml +++ b/docs/gsignond-docs.sgml @@ -24,12 +24,16 @@ GSignond configuration - + + Authentication plugins, plugin loaders and D-Bus IPC + + + - GSignond API for writing authentication plugins + GSignond API for writing GLib-based authentication plugins diff --git a/docs/gsignond-sections.txt b/docs/gsignond-sections.txt index d97978a..6217773 100644 --- a/docs/gsignond-sections.txt +++ b/docs/gsignond-sections.txt @@ -1,13 +1,11 @@
gsignond-access-control-manager GSignondAccessControlManager -GSignondAccessControlManager -GSignondAccessControlManagerClass -gsignond_access_control_manager_acl_is_valid +gsignond_access_control_manager_security_context_of_peer gsignond_access_control_manager_peer_is_allowed_to_use_identity gsignond_access_control_manager_peer_is_owner_of_identity +gsignond_access_control_manager_acl_is_valid gsignond_access_control_manager_security_context_of_keychain -gsignond_access_control_manager_security_context_of_peer GSIGNOND_ACCESS_CONTROL_MANAGER GSIGNOND_ACCESS_CONTROL_MANAGER_CLASS @@ -15,18 +13,18 @@ GSIGNOND_ACCESS_CONTROL_MANAGER_GET_CLASS GSIGNOND_IS_ACCESS_CONTROL_MANAGER GSIGNOND_IS_ACCESS_CONTROL_MANAGER_CLASS GSIGNOND_TYPE_ACCESS_CONTROL_MANAGER +GSignondAccessControlManager +GSignondAccessControlManagerClass gsignond_access_control_manager_get_type
gsignond-config GSignondConfig -GSignondConfig -GSignondConfigClass -gsignond_config_get_integer -gsignond_config_get_string gsignond_config_new +gsignond_config_get_integer gsignond_config_set_integer +gsignond_config_get_string gsignond_config_set_string GSIGNOND_CONFIG @@ -35,51 +33,42 @@ GSIGNOND_CONFIG_GET_CLASS GSIGNOND_IS_CONFIG GSIGNOND_IS_CONFIG_CLASS GSIGNOND_TYPE_CONFIG +GSignondConfig +GSignondConfigClass GSignondConfigPrivate gsignond_config_get_type
-gsignond-config-db -GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME -GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME -GSIGNOND_CONFIG_DB_SSO -
- -
gsignond-config-dbus -GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT +GSIGNOND_CONFIG_DBUS_TIMEOUTS GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT -GSIGNOND_CONFIG_DBUS_TIMEOUTS +GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT
gsignond-config-general GSIGNOND_CONFIG_GENERAL -GSIGNOND_CONFIG_GENERAL_BIN_DIR +GSIGNOND_CONFIG_GENERAL_STORAGE_PATH GSIGNOND_CONFIG_GENERAL_EXTENSION -GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR -GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR GSIGNOND_CONFIG_GENERAL_SECURE_DIR -GSIGNOND_CONFIG_GENERAL_STORAGE_PATH GSIGNOND_CONFIG_PLUGIN_TIMEOUT +GSIGNOND_CONFIG_GENERAL_KEYCHAIN_SYSCTX
gsignond-credentials GSignondCredentials -GSignondCredentials -GSignondCredentialsClass -gsignond_credentials_equal -gsignond_credentials_get_id -gsignond_credentials_get_password -gsignond_credentials_get_username gsignond_credentials_new gsignond_credentials_set_data gsignond_credentials_set_id -gsignond_credentials_set_password +gsignond_credentials_get_id gsignond_credentials_set_username +gsignond_credentials_get_username +gsignond_credentials_set_password +gsignond_credentials_get_password +gsignond_credentials_equal GSIGNOND_CREDENTIALS GSIGNOND_CREDENTIALS_CLASS @@ -87,45 +76,47 @@ GSIGNOND_CREDENTIALS_GET_CLASS GSIGNOND_IS_CREDENTIALS GSIGNOND_IS_CREDENTIALS_CLASS GSIGNOND_TYPE_CREDENTIALS +GSignondCredentials +GSignondCredentialsClass GSignondCredentialsPrivate gsignond_credentials_get_type
gsignond-dictionary -GSignondDictionary -gsignond_dictionary_copy -gsignond_dictionary_get -gsignond_dictionary_get_boolean -gsignond_dictionary_get_int32 -gsignond_dictionary_get_int64 -gsignond_dictionary_get_string -gsignond_dictionary_get_uint32 -gsignond_dictionary_get_uint64 gsignond_dictionary_new -gsignond_dictionary_new_from_variant gsignond_dictionary_ref -gsignond_dictionary_remove +gsignond_dictionary_unref +gsignond_dictionary_copy +gsignond_dictionary_new_from_variant +gsignond_dictionary_to_variant +gsignond_dictionary_to_variant_builder +gsignond_dictionary_get gsignond_dictionary_set +gsignond_dictionary_get_boolean gsignond_dictionary_set_boolean +gsignond_dictionary_get_int32 gsignond_dictionary_set_int32 -gsignond_dictionary_set_int64 -gsignond_dictionary_set_string +gsignond_dictionary_get_uint32 gsignond_dictionary_set_uint32 +gsignond_dictionary_get_int64 +gsignond_dictionary_set_int64 +gsignond_dictionary_get_uint64 gsignond_dictionary_set_uint64 -gsignond_dictionary_to_variant -gsignond_dictionary_unref +gsignond_dictionary_get_string +gsignond_dictionary_set_string +gsignond_dictionary_remove +gsignond_dictionary_contains GSIGNOND_DICTIONARY GSIGNOND_IS_DICTIONARY GSIGNOND_TYPE_DICTIONARY +GSignondDictionary
gsignond-digest-plugin GSignondDigestPlugin -GSignondDigestPlugin -GSignondDigestPluginClass GSIGNOND_DIGEST_PLUGIN GSIGNOND_DIGEST_PLUGIN_CLASS @@ -133,6 +124,8 @@ GSIGNOND_DIGEST_PLUGIN_GET_CLASS GSIGNOND_IS_DIGEST_PLUGIN GSIGNOND_IS_DIGEST_PLUGIN_CLASS GSIGNOND_TYPE_DIGEST_PLUGIN +GSignondDigestPlugin +GSignondDigestPluginClass GSignondDigestPluginPrivate gsignond_digest_plugin_get_type
@@ -141,8 +134,8 @@ gsignond_digest_plugin_get_type gsignond-error GSIGNOND_ERROR GSignondError -gsignond_error_new_from_variant gsignond_error_quark +gsignond_error_new_from_variant gsignond_error_to_variant gsignond_get_gerror_for_id @@ -150,13 +143,11 @@ gsignond_get_gerror_for_id
gsignond-extension-interface GSignondExtension -GSignondExtension -GSignondExtensionClass -gsignond_extension_get_access_control_manager gsignond_extension_get_name -gsignond_extension_get_secret_storage -gsignond_extension_get_storage_manager gsignond_extension_get_version +gsignond_extension_get_storage_manager +gsignond_extension_get_secret_storage +gsignond_extension_get_access_control_manager GSIGNOND_EXTENSION GSIGNOND_EXTENSION_CLASS @@ -164,24 +155,24 @@ GSIGNOND_EXTENSION_GET_CLASS GSIGNOND_IS_EXTENSION GSIGNOND_IS_EXTENSION_CLASS GSIGNOND_TYPE_EXTENSION +GSignondExtension +GSignondExtensionClass GSignondExtensionPrivate gsignond_extension_get_type
gsignond-log -DBG -ERR -INFO TRACEBACK +INFO +ERR WARN +DBG
gsignond-password-plugin GSignondPasswordPlugin -GSignondPasswordPlugin -GSignondPasswordPluginClass GSIGNOND_IS_PASSWORD_PLUGIN GSIGNOND_IS_PASSWORD_PLUGIN_CLASS @@ -189,51 +180,52 @@ GSIGNOND_PASSWORD_PLUGIN GSIGNOND_PASSWORD_PLUGIN_CLASS GSIGNOND_PASSWORD_PLUGIN_GET_CLASS GSIGNOND_TYPE_PASSWORD_PLUGIN +GSignondPasswordPlugin +GSignondPasswordPluginClass gsignond_password_plugin_get_type
gsignond-plugin-interface GSignondPlugin -GSignondPluginInterface GSignondPluginState +GSignondPluginInterface gsignond_plugin_cancel -gsignond_plugin_error -gsignond_plugin_refresh -gsignond_plugin_refreshed -gsignond_plugin_request gsignond_plugin_request_initial +gsignond_plugin_request +gsignond_plugin_user_action_finished +gsignond_plugin_refresh gsignond_plugin_response gsignond_plugin_response_final -gsignond_plugin_status_changed gsignond_plugin_store -gsignond_plugin_user_action_finished +gsignond_plugin_error gsignond_plugin_user_action_required +gsignond_plugin_refreshed +gsignond_plugin_status_changed GSIGNOND_IS_PLUGIN GSIGNOND_PLUGIN GSIGNOND_PLUGIN_GET_INTERFACE GSIGNOND_TYPE_PLUGIN +GSignondPlugin gsignond_plugin_get_type
gsignond-secret-storage GSignondSecretStorage -GSignondSecretStorage -GSignondSecretStorageClass -gsignond_secret_storage_check_credentials -gsignond_secret_storage_clear_db +gsignond_secret_storage_open_db gsignond_secret_storage_close_db -gsignond_secret_storage_get_last_error +gsignond_secret_storage_clear_db gsignond_secret_storage_is_open_db gsignond_secret_storage_load_credentials -gsignond_secret_storage_load_data -gsignond_secret_storage_open_db -gsignond_secret_storage_remove_credentials -gsignond_secret_storage_remove_data gsignond_secret_storage_update_credentials +gsignond_secret_storage_remove_credentials +gsignond_secret_storage_check_credentials +gsignond_secret_storage_load_data gsignond_secret_storage_update_data +gsignond_secret_storage_remove_data +gsignond_secret_storage_get_last_error GSIGNOND_IS_SECRET_STORAGE GSIGNOND_IS_SECRET_STORAGE_CLASS @@ -241,6 +233,8 @@ GSIGNOND_SECRET_STORAGE GSIGNOND_SECRET_STORAGE_CLASS GSIGNOND_SECRET_STORAGE_GET_CLASS GSIGNOND_TYPE_SECRET_STORAGE +GSignondSecretStorage +GSignondSecretStorageClass GSignondSecretStoragePrivate gsignond_secret_storage_get_type
@@ -249,106 +243,106 @@ gsignond_secret_storage_get_type gsignond-security-context GSignondSecurityContext GSignondSecurityContextList -gsignond_security_context_check -gsignond_security_context_compare -gsignond_security_context_copy -gsignond_security_context_free -gsignond_security_context_from_variant -gsignond_security_context_get_application_context -gsignond_security_context_get_system_context -gsignond_security_context_list_copy -gsignond_security_context_list_free -gsignond_security_context_list_from_variant -gsignond_security_context_list_to_variant -gsignond_security_context_match gsignond_security_context_new gsignond_security_context_new_from_values -gsignond_security_context_set_application_context +gsignond_security_context_free +gsignond_security_context_copy gsignond_security_context_set_system_context +gsignond_security_context_get_system_context +gsignond_security_context_set_application_context +gsignond_security_context_get_application_context gsignond_security_context_to_variant +gsignond_security_context_from_variant +gsignond_security_context_compare +gsignond_security_context_match +gsignond_security_context_check +gsignond_security_context_list_to_variant +gsignond_security_context_list_from_variant +gsignond_security_context_list_copy +gsignond_security_context_list_free
gsignond-session-data -GSignondSessionData GSignondUiPolicy -gsignond_session_data_get_caption -gsignond_session_data_get_network_proxy -gsignond_session_data_get_network_timeout +gsignond_session_data_get_username +gsignond_session_data_set_username +gsignond_session_data_get_secret +gsignond_session_data_set_secret gsignond_session_data_get_realm +gsignond_session_data_set_realm +gsignond_session_data_get_allowed_realms +gsignond_session_data_set_allowed_realms +gsignond_session_data_get_caption +gsignond_session_data_set_caption gsignond_session_data_get_renew_token -gsignond_session_data_get_secret +gsignond_session_data_set_renew_token gsignond_session_data_get_ui_policy -gsignond_session_data_get_username -gsignond_session_data_get_window_id -gsignond_session_data_set_caption +gsignond_session_data_set_ui_policy +gsignond_session_data_get_network_proxy gsignond_session_data_set_network_proxy +gsignond_session_data_get_network_timeout gsignond_session_data_set_network_timeout -gsignond_session_data_set_realm -gsignond_session_data_set_renew_token -gsignond_session_data_set_secret -gsignond_session_data_set_ui_policy -gsignond_session_data_set_username +gsignond_session_data_get_window_id gsignond_session_data_set_window_id GSIGNOND_IS_SESSION_DATA GSIGNOND_SESSION_DATA GSIGNOND_TYPE_SESSION_DATA +GSignondSessionData
gsignond-signonui-data -GSignondSignonuiData GSignondSignonuiError gsignond_signonui_data_get_captcha_response -gsignond_signonui_data_get_captcha_url -gsignond_signonui_data_get_caption -gsignond_signonui_data_get_confirm -gsignond_signonui_data_get_final_url -gsignond_signonui_data_get_forgot_password -gsignond_signonui_data_get_forgot_password_url -gsignond_signonui_data_get_message -gsignond_signonui_data_get_open_url -gsignond_signonui_data_get_password -gsignond_signonui_data_get_query_error -gsignond_signonui_data_get_query_password -gsignond_signonui_data_get_query_username -gsignond_signonui_data_get_remember_password -gsignond_signonui_data_get_request_id -gsignond_signonui_data_get_test_reply -gsignond_signonui_data_get_title -gsignond_signonui_data_get_url_response -gsignond_signonui_data_get_username gsignond_signonui_data_set_captcha_response +gsignond_signonui_data_get_captcha_url gsignond_signonui_data_set_captcha_url +gsignond_signonui_data_get_caption gsignond_signonui_data_set_caption +gsignond_signonui_data_get_confirm gsignond_signonui_data_set_confirm +gsignond_signonui_data_get_final_url gsignond_signonui_data_set_final_url +gsignond_signonui_data_get_forgot_password gsignond_signonui_data_set_forgot_password +gsignond_signonui_data_get_forgot_password_url gsignond_signonui_data_set_forgot_password_url +gsignond_signonui_data_get_message gsignond_signonui_data_set_message +gsignond_signonui_data_get_open_url gsignond_signonui_data_set_open_url +gsignond_signonui_data_get_password gsignond_signonui_data_set_password +gsignond_signonui_data_get_query_error gsignond_signonui_data_set_query_error +gsignond_signonui_data_get_query_password gsignond_signonui_data_set_query_password +gsignond_signonui_data_get_query_username gsignond_signonui_data_set_query_username +gsignond_signonui_data_get_remember_password gsignond_signonui_data_set_remember_password +gsignond_signonui_data_get_request_id gsignond_signonui_data_set_request_id +gsignond_signonui_data_get_test_reply gsignond_signonui_data_set_test_reply +gsignond_signonui_data_get_title gsignond_signonui_data_set_title +gsignond_signonui_data_get_url_response gsignond_signonui_data_set_url_response +gsignond_signonui_data_get_username gsignond_signonui_data_set_username GSIGNOND_IS_SIGNONUI_DATA GSIGNOND_SIGNONUI_DATA GSIGNOND_TYPE_SIGNONUI_DATA +GSignondSignonuiData
gsignond-ssotest-plugin GSignondSsoTestPlugin -GSignondSsoTestPlugin -GSignondSsoTestPluginClass GSIGNOND_IS_SSOTEST_PLUGIN GSIGNOND_IS_SSOTEST_PLUGIN_CLASS @@ -356,6 +350,8 @@ GSIGNOND_SSOTEST_PLUGIN GSIGNOND_SSOTEST_PLUGIN_CLASS GSIGNOND_SSOTEST_PLUGIN_GET_CLASS GSIGNOND_TYPE_SSOTEST_PLUGIN +GSignondSsoTestPlugin +GSignondSsoTestPluginClass GSignondSsoTestPluginPrivate gsignond_ssotest_plugin_get_type
@@ -363,14 +359,12 @@ gsignond_ssotest_plugin_get_type
gsignond-storage-manager GSignondStorageManager -GSignondStorageManager -GSignondStorageManagerClass -gsignond_storage_manager_delete_storage -gsignond_storage_manager_filesystem_is_mounted gsignond_storage_manager_initialize_storage -gsignond_storage_manager_mount_filesystem +gsignond_storage_manager_delete_storage gsignond_storage_manager_storage_is_initialized +gsignond_storage_manager_mount_filesystem gsignond_storage_manager_unmount_filesystem +gsignond_storage_manager_filesystem_is_mounted GSIGNOND_IS_STORAGE_MANAGER GSIGNOND_IS_STORAGE_MANAGER_CLASS @@ -378,14 +372,22 @@ GSIGNOND_STORAGE_MANAGER GSIGNOND_STORAGE_MANAGER_CLASS GSIGNOND_STORAGE_MANAGER_GET_CLASS GSIGNOND_TYPE_STORAGE_MANAGER +GSignondStorageManager +GSignondStorageManagerClass GSignondStorageManagerPrivate gsignond_storage_manager_get_type
gsignond-utils -gsignond_generate_nonce -gsignond_wipe_directory gsignond_wipe_file +gsignond_wipe_directory +gsignond_generate_nonce +gsignond_sequence_to_variant +gsignond_variant_to_sequence +gsignond_sequence_to_array +gsignond_array_to_sequence +gsignond_copy_array_to_sequence +gsignond_is_host_in_domain
diff --git a/docs/html/GSignondAccessControlManager.html b/docs/html/GSignondAccessControlManager.html index 13c0117..5b9a502 100644 --- a/docs/html/GSignondAccessControlManager.html +++ b/docs/html/GSignondAccessControlManager.html @@ -2,28 +2,25 @@ -GSignondAccessControlManager - +gsignond API Reference Manual: GSignondAccessControlManager + - + - + - - + @@ -34,333 +31,347 @@

GSignondAccessControlManager

GSignondAccessControlManager — an object that performs access control checks

- + -
-

Synopsis

-
-#include <gsignond/gsignond-access-control-manager.h>
-
-struct              GSignondAccessControlManager;
-struct              GSignondAccessControlManagerClass;
-gboolean            gsignond_access_control_manager_acl_is_valid
-                                                        (GSignondAccessControlManager *self,
-                                                         const GSignondSecurityContext *peer_ctx,
-                                                         const GSignondSecurityContextList *identity_acl);
-gboolean            gsignond_access_control_manager_peer_is_allowed_to_use_identity
-                                                        (GSignondAccessControlManager *self,
-                                                         const GSignondSecurityContext *peer_ctx,
-                                                         const GSignondSecurityContext *owner_ctx,
-                                                         const GSignondSecurityContextList *identity_acl);
-gboolean            gsignond_access_control_manager_peer_is_owner_of_identity
-                                                        (GSignondAccessControlManager *self,
-                                                         const GSignondSecurityContext *peer_ctx,
-                                                         const GSignondSecurityContext *owner_ctx);
-GSignondSecurityContext * gsignond_access_control_manager_security_context_of_keychain
-                                                        (GSignondAccessControlManager *self);
-void                gsignond_access_control_manager_security_context_of_peer
-                                                        (GSignondAccessControlManager *self,
-                                                         GSignondSecurityContext *peer_ctx,
-                                                         int peer_fd,
-                                                         const gchar *peer_service,
-                                                         const gchar *peer_app_ctx);
-
+ +
+

Properties

+
+++++ + + + + + +
+GSignondConfig *configRead / Write / Construct Only

Object Hierarchy

-
-  GObject
-   +----GSignondAccessControlManager
+
    GObject
+    ╰── GSignondAccessControlManager
 
-

Properties

-
-  "config"                   GSignondConfig*       : Read / Write / Construct Only
+

Includes

+
#include <gsignond/gsignond-access-control-manager.h>
 

Description

-

-GSignondAccessControlManager performs access control checks using +

GSignondAccessControlManager performs access control checks using available system services. gSSO can be configured to use a custom extension that provides a subclassed implementation of GSignondAccessControlManager -(see GSignondExtension), otherwise a default implementation is used. -

+(see GSignondExtension), otherwise a default implementation is used.

-

Details

+

Functions

-

struct GSignondAccessControlManager

-
struct GSignondAccessControlManager;
-

-Opaque GSignondAccessControlManager data structure. -

-
-
-
-

struct GSignondAccessControlManagerClass

-
struct GSignondAccessControlManagerClass {
-    GObjectClass parent_class;
-
-    void (*security_context_of_peer) (
-                            GSignondAccessControlManager *self,
-                            GSignondSecurityContext *peer_ctx,
-                            int peer_fd, const gchar *peer_service,
-                            const gchar *peer_app_ctx);
-    gboolean (*peer_is_allowed_to_use_identity) (
-                            GSignondAccessControlManager *self,
-                            const GSignondSecurityContext *peer_ctx,
-                            const GSignondSecurityContext *owner_ctx,
-                            const GSignondSecurityContextList *identity_acl);
-    gboolean (*peer_is_owner_of_identity) (
-                            GSignondAccessControlManager *self,
-                            const GSignondSecurityContext *peer_ctx,
-                            const GSignondSecurityContext *owner_ctx);
-    gboolean (*acl_is_valid) (
-                            GSignondAccessControlManager *self,
-                            const GSignondSecurityContext *peer_ctx,
-                            const GSignondSecurityContextList *identity_acl);
-    GSignondSecurityContext * (*security_context_of_keychain) (
-                            GSignondAccessControlManager *self);
-};
-
-

-GSignondAccessControlManagerClass class containing pointers to class methods. -

-
-+

gsignond_access_control_manager_security_context_of_peer ()

+
void
+gsignond_access_control_manager_security_context_of_peer
+                               (GSignondAccessControlManager *self,
+                                GSignondSecurityContext *peer_ctx,
+                                int peer_fd,
+                                const gchar *peer_service,
+                                const gchar *peer_app_ctx);
+

Retrieves and sets GSignondSecurityContext of the specified peer.

+

The default implementation sets the app context as it was passed, and sets +the system context to the binary path of the process that is determined from +peer_fd + and peer_service + parameters.

+
+

Parameters

+
+++++ - - + + + - - + + + - - - - - - + + + - - + + + - - + + +

GObjectClass parent_class;

parent class.

self

object instance.

 

security_context_of_peer ()

an implementation of gsignond_access_control_manager_security_context_of_peer() -

peer_ctx

instance of security context to be set.

 

peer_is_allowed_to_use_identity ()

an implementation of gsignond_access_control_manager_peer_is_allowed_to_use_identity() -

peer_is_owner_of_identity ()

an implementation of gsignond_access_control_manager_peer_is_owner_of_identity() -

peer_fd

file descriptor of the peer connection if using peer-to-peer dbus, -1 otherwise.

 

acl_is_valid ()

an implementation of gsignond_access_control_manager_acl_is_valid() -

peer_service

g_dbus_method_invocation_get_sender() of the peer connection, if not using peer-to-peer dbus, NULL otherwise

 

security_context_of_keychain ()

an implementation of gsignond_access_control_manager_security_context_of_keychain() -

peer_app_ctx

application context of the peer connection.

 
+

-

gsignond_access_control_manager_acl_is_valid ()

-
gboolean            gsignond_access_control_manager_acl_is_valid
-                                                        (GSignondAccessControlManager *self,
-                                                         const GSignondSecurityContext *peer_ctx,
-                                                         const GSignondSecurityContextList *identity_acl);
-

-Checks if the specified peer is allowed to set the specified access -control list. gsignond_access_control_manager_peer_is_owner_of_identity() -is used before calling this method to verify identity ownership. -

-

-The default implementation always returns TRUE. -

-
-+

gsignond_access_control_manager_peer_is_allowed_to_use_identity ()

+
gboolean
+gsignond_access_control_manager_peer_is_allowed_to_use_identity
+                               (GSignondAccessControlManager *self,
+                                const GSignondSecurityContext *peer_ctx,
+                                const GSignondSecurityContext *owner_ctx,
+                                const GSignondSecurityContextList *identity_acl);
+

Checks if specified peer is allowed to access the specified identity.

+

The default implementation goes over items in identity_acl +, using +gsignond_security_context_check() to check them against peer_ctx +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + +

self :

object instance.

self

object instance.

 

peer_ctx :

security context of the peer connection.

peer_ctx

security context of the peer connection.

 

identity_acl :

access control list for the identity.

owner_ctx

security context of the identity owner.

 

Returns :

access control list is OK?

identity_acl

access control list for the identity in question. Includes the owner_ctx +as well.

 
+
+

Returns

+

access is allowed?

+

+
+

-

gsignond_access_control_manager_peer_is_allowed_to_use_identity ()

-
gboolean            gsignond_access_control_manager_peer_is_allowed_to_use_identity
-                                                        (GSignondAccessControlManager *self,
-                                                         const GSignondSecurityContext *peer_ctx,
-                                                         const GSignondSecurityContext *owner_ctx,
-                                                         const GSignondSecurityContextList *identity_acl);
-

-Checks if specified peer is allowed to access the specified identity. -

-

-The default implementation goes over items in identity_acl, using -gsignond_security_context_check() to check them against peer_ctx. -

-
-+

gsignond_access_control_manager_peer_is_owner_of_identity ()

+
gboolean
+gsignond_access_control_manager_peer_is_owner_of_identity
+                               (GSignondAccessControlManager *self,
+                                const GSignondSecurityContext *peer_ctx,
+                                const GSignondSecurityContext *owner_ctx);
+

Checks if the peer specified in peer_ctx + is the owner of the identity.

+

The default implementation is using gsignond_security_context_check() +to check peer_ctx + against owner_ctx + directly.

+
+

Parameters

+
+++++ - - + + + - - + + + - - - - - - - - - - + + +

self :

object instance.

self

object instance.

 

peer_ctx :

security context of the peer connection.

peer_ctx

security context of the peer connection.

 

owner_ctx :

security context of the identity owner.

identity_acl :

access control list for the identity in question. Includes the owner_ctx as well.

Returns :

access is allowed?

owner_ctx

security context of the identity owner.

 
+
+

Returns

+

is owner?

+

+
+
-

gsignond_access_control_manager_peer_is_owner_of_identity ()

-
gboolean            gsignond_access_control_manager_peer_is_owner_of_identity
-                                                        (GSignondAccessControlManager *self,
-                                                         const GSignondSecurityContext *peer_ctx,
-                                                         const GSignondSecurityContext *owner_ctx);
-

-Checks if the peer specified in peer_ctx is the owner of the identity. -

-

-The default implementation is using gsignond_security_context_check() -to check peer_ctx against owner_ctx directly. -

-
-+

gsignond_access_control_manager_acl_is_valid ()

+
gboolean
+gsignond_access_control_manager_acl_is_valid
+                               (GSignondAccessControlManager *self,
+                                const GSignondSecurityContext *peer_ctx,
+                                const GSignondSecurityContextList *identity_acl);
+

Checks if the specified peer is allowed to set the specified access +control list. gsignond_access_control_manager_peer_is_owner_of_identity() +is used before calling this method to verify identity ownership.

+

The default implementation always returns TRUE.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + + - - + + +

self :

object instance.

peer_ctx :

security context of the peer connection.

self

object instance.

 

owner_ctx :

security context of the identity owner.

peer_ctx

security context of the peer connection.

 

Returns :

is owner?

identity_acl

access control list for the identity.

 
+
+

Returns

+

access control list is OK?

+

+
+
-

gsignond_access_control_manager_security_context_of_keychain ()

-
GSignondSecurityContext * gsignond_access_control_manager_security_context_of_keychain
-                                                        (GSignondAccessControlManager *self);
-

-Retrieves security context of the keychain application. Keychain application +

gsignond_access_control_manager_security_context_of_keychain ()

+
GSignondSecurityContext *
+gsignond_access_control_manager_security_context_of_keychain
+                               (GSignondAccessControlManager *self);
+

Retrieves security context of the keychain application. Keychain application has a special management access to all stored identities and is able to -perform deletion of all identities from storage. -

-

-The default implementation returns an empty context. If gSSO was compiled +perform deletion of all identities from storage.

+

The default implementation returns a context either set in GSignondConfig, +or if not set, a value specified through a configure --enable-keychain +option (see

+Building gsignond), or if that is not +

set either then an empty string "" is returned.

+

If gSSO was compiled with --enable-debug and SSO_KEYCHAIN_SYSCTX environment variable is set, then -the value of that variable is used to set the returned system context instead. -

-
-- - - - - - - - - - +the value of that variable is used to set the returned system context instead.

+
+

Parameters

+

self :

object instance.

Returns :

security context of the keychain application.
+++++ + + + + +

self

object instance.

 
-
-
-

gsignond_access_control_manager_security_context_of_peer ()

-
void                gsignond_access_control_manager_security_context_of_peer
-                                                        (GSignondAccessControlManager *self,
-                                                         GSignondSecurityContext *peer_ctx,
-                                                         int peer_fd,
-                                                         const gchar *peer_service,
-                                                         const gchar *peer_app_ctx);
-

-Retrieves and sets GSignondSecurityContext of the specified peer. -

-

-The default implementation sets the app context as it was passed, and sets -the system context to the binary path of the process that is determined from -peer_fd and peer_service parameters. -

-
-- - - - - - - - - - - - - - - - - - - - - - -

self :

object instance.

peer_ctx :

instance of security context to be set.

peer_fd :

file descriptor of the peer connection if using peer-to-peer dbus, -1 otherwise.

peer_service :

g_dbus_method_invocation_get_sender() of the peer connection, if not using peer-to-peer dbus, NULL otherwise

peer_app_ctx :

application context of the peer connection.
+
+

Returns

+

security context of the keychain application.

+

+
+

Types and Values

+
+

Property Details

-

The "config" property

-
  "config"                   GSignondConfig*       : Read / Write / Construct Only
+

The “config” property

+
  “config”                   GSignondConfig *

Configuration object.

+

Flags: Read / Write / Construct Only

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/GSignondConfig.html b/docs/html/GSignondConfig.html index dfe0222..5f2785f 100644 --- a/docs/html/GSignondConfig.html +++ b/docs/html/GSignondConfig.html @@ -2,23 +2,21 @@ -GSignondConfig - +gsignond API Reference Manual: GSignondConfig + - + - @@ -32,244 +30,262 @@

GSignondConfig

GSignondConfig — gSSO configuration information

- + -
-

Synopsis

-
-#include <gsignond/gsignond-config.h>
-
-struct              GSignondConfig;
-struct              GSignondConfigClass;
-gint                gsignond_config_get_integer         (GSignondConfig *self,
-                                                         const gchar *key);
-const gchar *       gsignond_config_get_string          (GSignondConfig *self,
-                                                         const gchar *key);
-GSignondConfig *    gsignond_config_new                 ();
-void                gsignond_config_set_integer         (GSignondConfig *self,
-                                                         const gchar *key,
-                                                         gint value);
-void                gsignond_config_set_string          (GSignondConfig *self,
-                                                         const gchar *key,
-                                                         const gchar *value);
-
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
+GSignondConfig * + +gsignond_config_new () +
+gint + +gsignond_config_get_integer () +
+void + +gsignond_config_set_integer () +
const gchar * + +gsignond_config_get_string () +
+void + +gsignond_config_set_string () +

Object Hierarchy

-
-  GObject
-   +----GSignondConfig
+
    GObject
+    ╰── GSignondConfig
+
+
+
+

Includes

+
#include <gsignond/gsignond-config.h>
 

Description

-

-GSignondConfig holds configuration information as a set of keys and values -(integer or strings). The key names are defined in +

GSignondConfig holds configuration information as a set of keys and values +(integer or strings). The key names are defined in

general config keys, -database config keys, and -DBus config keys. -

-

-The configuration is discovered from these sources, in decreasing order of -priority: -

-
    -
  • environment variables, if gSSO has been compiled with --enable-debug switch. -See the specific keys documentation for the variable names.

  • -
  • gSSO configuration file. See below for where the file is searched for.

  • -
  • default values. See the documentation for specific keys for those.

  • -
-

-

-

-

+

and DBus config keys.

+

The configuration is retrieved from the gSSO configuration file. See below +for where the file is searched for.

-

Where the configuration file is searched for

+

Where the configuration file is searched for

-

-

-

-If gSSO has been compiled with --enable-debug, then these locations are used, -in decreasing order of priority: -

-
-

Details

+

Functions

-

struct GSignondConfig

-
struct GSignondConfig;
-

-Opaque structure for the object. -

+

gsignond_config_new ()

+
GSignondConfig *
+gsignond_config_new ();
+

Create a GSignondConfig object.

+
+

Returns

+

an instance of GSignondConfig. gSSO extensions should not use this +as they're already provided with a config object when they're created.

+

-
-
-

struct GSignondConfigClass

-
struct GSignondConfigClass {
-};
-
-

-Opaque structure for the class. -


-

gsignond_config_get_integer ()

-
gint                gsignond_config_get_integer         (GSignondConfig *self,
-                                                         const gchar *key);
-

-Get an integer configuration value. -

-
-+

gsignond_config_get_integer ()

+
gint
+gsignond_config_get_integer (GSignondConfig *self,
+                             const gchar *key);
+

Get an integer configuration value.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

self :

an instance of GSignondConfig -

self

an instance of GSignondConfig

 

key :

the key name

Returns :

the value corresponding to the key as an integer. If the key does not -exist or cannot be converted to the integer, 0 is returned.

key

the key name

 
+
+

Returns

+

the value corresponding to the key as an integer. If the key does not +exist or cannot be converted to the integer, 0 is returned.

+

+
+

-

gsignond_config_get_string ()

-
const gchar *       gsignond_config_get_string          (GSignondConfig *self,
-                                                         const gchar *key);
-

-Get a string configuration value. -

-
-+

gsignond_config_set_integer ()

+
void
+gsignond_config_set_integer (GSignondConfig *self,
+                             const gchar *key,
+                             gint value);
+

Sets the configuration value to the provided integer.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

self :

an instance of GSignondConfig -

self

an instance of GSignondConfig

 

key :

the key name

key

the key name

 

Returns :

the value corresponding to the key as string. If the key does not -exist, NULL is returned. [transfer none] -

value

the value

 
-
-
-

gsignond_config_new ()

-
GSignondConfig *    gsignond_config_new                 ();
-

-Create a GSignondConfig object. -

-
-- - - - -

Returns :

an instance of GSignondConfig. gSSO extensions should not use this -as they're already provided with a config object when they're created.

-

gsignond_config_set_integer ()

-
void                gsignond_config_set_integer         (GSignondConfig *self,
-                                                         const gchar *key,
-                                                         gint value);
-

-Sets the configuration value to the provided integer. -

-
-+

gsignond_config_get_string ()

+
const gchar *
+gsignond_config_get_string (GSignondConfig *self,
+                            const gchar *key);
+

Get a string configuration value.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

self :

an instance of GSignondConfig -

self

an instance of GSignondConfig

 

key :

the key name

value :

the value

key

the key name

 
+
+

Returns

+

the value corresponding to the key as string. If the key does not +exist, NULL is returned.

+

[transfer none]

+
+

-

gsignond_config_set_string ()

-
void                gsignond_config_set_string          (GSignondConfig *self,
-                                                         const gchar *key,
-                                                         const gchar *value);
-

-Sets the configuration value to the provided string. -

-
-+

gsignond_config_set_string ()

+
void
+gsignond_config_set_string (GSignondConfig *self,
+                            const gchar *key,
+                            const gchar *value);
+

Sets the configuration value to the provided string.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

self :

an instance of GSignondConfig -

self

an instance of GSignondConfig

 

key :

the key name

key

the key name

 

value :

the value. [transfer none] -

value

the value.

[transfer none]
+
+

Types and Values

+
+ + Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/GSignondCredentials.html b/docs/html/GSignondCredentials.html index b986198..567a3e6 100644 --- a/docs/html/GSignondCredentials.html +++ b/docs/html/GSignondCredentials.html @@ -2,28 +2,26 @@ -GSignondCredentials - +gsignond API Reference Manual: GSignondCredentials + - + - - + + - - + - +
@@ -32,297 +30,395 @@

GSignondCredentials

GSignondCredentials — credentials (username, password) associated with an identity

- +
-
-

Synopsis

-
-#include <gsignond/gsignond-credentials.h>
-
-                    GSignondCredentials;
-                    GSignondCredentialsClass;
-gboolean            gsignond_credentials_equal          (GSignondCredentials *one,
-                                                         GSignondCredentials *two);
-guint32             gsignond_credentials_get_id         (GSignondCredentials *self);
-const gchar *       gsignond_credentials_get_password   (GSignondCredentials *self);
-const gchar *       gsignond_credentials_get_username   (GSignondCredentials *self);
-GSignondCredentials * gsignond_credentials_new          ();
-gboolean            gsignond_credentials_set_data       (GSignondCredentials *self,
-                                                         const guint32 id,
-                                                         const gchar *username,
-                                                         const gchar *password);
-gboolean            gsignond_credentials_set_id         (GSignondCredentials *self,
-                                                         const guint32 id);
-gboolean            gsignond_credentials_set_password   (GSignondCredentials *self,
-                                                         const gchar *password);
-gboolean            gsignond_credentials_set_username   (GSignondCredentials *self,
-                                                         const gchar *username);
-
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+GSignondCredentials * + +gsignond_credentials_new () +
+gboolean + +gsignond_credentials_set_data () +
+gboolean + +gsignond_credentials_set_id () +
+guint32 + +gsignond_credentials_get_id () +
+gboolean + +gsignond_credentials_set_username () +
const gchar * + +gsignond_credentials_get_username () +
+gboolean + +gsignond_credentials_set_password () +
const gchar * + +gsignond_credentials_get_password () +
+gboolean + +gsignond_credentials_equal () +

Object Hierarchy

-
-  GObject
-   +----GSignondCredentials
+
    GObject
+    ╰── GSignondCredentials
+
+
+
+

Includes

+
#include <gsignond/gsignond-credentials.h>
 

Description

-

-GSignondCredentials hold a username, password, and identity id, associated +

GSignondCredentials hold a username, password, and identity id, associated with an identity. This information in stored in secret storage using -GSignondSecretStorage. -

+GSignondSecretStorage.

-

Details

+

Functions

-

GSignondCredentials

-
typedef struct _GSignondCredentials GSignondCredentials;
-

-Opaque GSignondCredentials data structure. -

+

gsignond_credentials_new ()

+
GSignondCredentials *
+gsignond_credentials_new ();
+

Creates a new empty GSignondCredentials object

+
+

Returns

+

the GSignondCredentials object.

+

[transfer full]

-
-
-

GSignondCredentialsClass

-
typedef struct {
-} GSignondCredentialsClass;
-
-

-Opaque GSignondCredentialsClass data structure. -


-

gsignond_credentials_equal ()

-
gboolean            gsignond_credentials_equal          (GSignondCredentials *one,
-                                                         GSignondCredentials *two);
-

-Compares elements of two GSignondCredentials object for equality. -

-
-+

gsignond_credentials_set_data ()

+
gboolean
+gsignond_credentials_set_data (GSignondCredentials *self,
+                               const guint32 id,
+                               const gchar *username,
+                               const gchar *password);
+

Sets the data of the GSignondCredentials.

+
+

Parameters

+
+++++ - - + + + + + + + + - - + + + - - + + +

one :

the first credential to be compared.

self

the object whose data is to be set.

 

id

the identity id associated with the credentials.

 

two :

the second credential to be compared.

username

the username.

[transfer none]

Returns :

TRUE if id, username and password are same for both credential -objects, FALSE otherwise.

password

the password.

[transfer none]
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+

-

gsignond_credentials_get_id ()

-
guint32             gsignond_credentials_get_id         (GSignondCredentials *self);
-

-Gets the identity id -

-
-+

gsignond_credentials_set_id ()

+
gboolean
+gsignond_credentials_set_id (GSignondCredentials *self,
+                             const guint32 id);
+

Sets the identity id of the GSignondCredentials object

+
+

Parameters

+
+++++ - - + + + - - + + +

self :

the object whose id is to be set.

self

the object whose id is to be set.

 

Returns :

the id

id

the id.

 
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+

-

gsignond_credentials_get_password ()

-
const gchar *       gsignond_credentials_get_password   (GSignondCredentials *self);
-

-Gets the password from the GSignondCredentials object -

-
-- - - - - - - - - - +

gsignond_credentials_get_id ()

+
guint32
+gsignond_credentials_get_id (GSignondCredentials *self);
+

Gets the identity id

+
+

Parameters

+

self :

the object whose password is to be set.

Returns :

the password if the object is valid, NULL otherwise. [transfer none] -
+++++ + + + + +

self

the object whose id is to be set.

 
+
+

Returns

+

the id

+

+
+

-

gsignond_credentials_get_username ()

-
const gchar *       gsignond_credentials_get_username   (GSignondCredentials *self);
-

-Gets the username of the GSignondCredentials object -

-
-+

gsignond_credentials_set_username ()

+
gboolean
+gsignond_credentials_set_username (GSignondCredentials *self,
+                                   const gchar *username);
+

Sets the username of the GSignondCredentials object

+
+

Parameters

+
+++++ - - + + + - - + + +

self :

the object whose username is to be set.

self

the object whose username is to be set.

 

Returns :

the username if the object is valid, NULL otherwise. [transfer none] -

username

the username.

[transfer none]
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_credentials_new ()

-
GSignondCredentials * gsignond_credentials_new          ();
-

-Creates a new empty GSignondCredentials object -

-
-+

gsignond_credentials_get_username ()

+
const gchar *
+gsignond_credentials_get_username (GSignondCredentials *self);
+

Gets the username of the GSignondCredentials object

+
+

Parameters

+
+++++ - - + + +

Returns :

the GSignondCredentials object. [transfer full] -

self

the object whose username is to be set.

 
-
-
-

gsignond_credentials_set_data ()

-
gboolean            gsignond_credentials_set_data       (GSignondCredentials *self,
-                                                         const guint32 id,
-                                                         const gchar *username,
-                                                         const gchar *password);
-

-Sets the data of the GSignondCredentials. -

-
-- - - - - - - - - - - - - - - - - - - - - - -

self :

the object whose data is to be set.

id :

the identity id associated with the credentials.

username :

the username. [transfer none] -

password :

the password. [transfer none] -

Returns :

TRUE if successful, FALSE otherwise.
+
+

Returns

+

the username if the object is valid, NULL otherwise.

+

[transfer none]

+

-

gsignond_credentials_set_id ()

-
gboolean            gsignond_credentials_set_id         (GSignondCredentials *self,
-                                                         const guint32 id);
-

-Sets the identity id of the GSignondCredentials object -

-
-+

gsignond_credentials_set_password ()

+
gboolean
+gsignond_credentials_set_password (GSignondCredentials *self,
+                                   const gchar *password);
+

Sets the password of the GSignondCredentials object

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

self :

the object whose id is to be set.

self

the object whose password is to be set.

 

id :

the id.

Returns :

TRUE if successful, FALSE otherwise.

password

the password.

[transfer none]
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_credentials_set_password ()

-
gboolean            gsignond_credentials_set_password   (GSignondCredentials *self,
-                                                         const gchar *password);
-

-Sets the password of the GSignondCredentials object -

-
-- - - - - - - - - - - - - - +

gsignond_credentials_get_password ()

+
const gchar *
+gsignond_credentials_get_password (GSignondCredentials *self);
+

Gets the password from the GSignondCredentials object

+
+

Parameters

+

self :

the object whose password is to be set.

password :

the password. [transfer none] -

Returns :

TRUE if successful, FALSE otherwise.
+++++ + + + + +

self

the object whose password is to be set.

 
+
+

Returns

+

the password if the object is valid, NULL otherwise.

+

[transfer none]

+
+
-

gsignond_credentials_set_username ()

-
gboolean            gsignond_credentials_set_username   (GSignondCredentials *self,
-                                                         const gchar *username);
-

-Sets the username of the GSignondCredentials object -

-
-+

gsignond_credentials_equal ()

+
gboolean
+gsignond_credentials_equal (GSignondCredentials *one,
+                            GSignondCredentials *two);
+

Compares elements of two GSignondCredentials object for equality.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

self :

the object whose username is to be set.

one

the first credential to be compared.

 

username :

the username. [transfer none] -

Returns :

TRUE if successful, FALSE otherwise.

two

the second credential to be compared.

 
+
+

Returns

+

TRUE if id, username and password are same for both credential +objects, FALSE otherwise.

+

+
+ + +
+

Types and Values

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/GSignondDigestPlugin.html b/docs/html/GSignondDigestPlugin.html index a7b8b1c..7f63561 100644 --- a/docs/html/GSignondDigestPlugin.html +++ b/docs/html/GSignondDigestPlugin.html @@ -2,29 +2,25 @@ -GSignondDigestPlugin - +gsignond API Reference Manual: GSignondDigestPlugin + - - + + - + - - - + +
@@ -34,95 +30,52 @@

GSignondDigestPlugin

GSignondDigestPlugin — a plugin that performs HTTP Digest authentication

- +
-
-

Synopsis

-
-#include <gsignond/gsignond-digest-plugin.h>
-
-struct              GSignondDigestPlugin;
-struct              GSignondDigestPluginClass;
-
-

Object Hierarchy

-
-  GObject
-   +----GSignondDigestPlugin
+
    GObject
+    ╰── GSignondDigestPlugin
 
-

Implemented Interfaces

-

-GSignondDigestPlugin implements - GSignondPlugin.

+

Includes

+
#include <gsignond/gsignond-digest-plugin.h>
+

Description

-

-GSignondDigestPlugin performs HTTP Digest authentication without exposing -the password to the application. Digest authentication is described in +

GSignondDigestPlugin performs HTTP Digest authentication without exposing +the password to the application. Digest authentication is described in

RFC 2617. -

-

-gsignond_plugin_request_initial() session_data parameter should include -the following string items, whose meaning is described in the RFC: -

-
    +

    gsignond_plugin_request_initial() session_data + parameter should include +the following string items, whose meaning is described in the RFC:

    +
    • username and secret. If they are absent, they are requested from the user via gSSO UI.

    • -
    • realm, "Algo", "Nonce", "Method", "DigestUri" - mandatory items.

    • -
    • "NonceCount", "Qop", "HEntity". "NonceCount" must be present if "Qop" is +

    • realm, allowed realms, "Algo", "Nonce", "Method", "DigestUri" - mandatory items.

    • +
    • "NonceCount", "Qop", "HEntity". "NonceCount" must be present if "Qop" is present, "HEntity" must be present if "Qop" is present and set to "auth-int".

    -

    -

    -

    -If the plugin has all the data to calculate the digest, it issues -"response-final" signal. session_data in that signal contains -the username, "CNonce" item and the digest value under the "Response" key. -

    -

    -If some of the data is incorrect or not available, "error" -signal is issued instead. -

    -

    -"type" property is set to "digest", and "mechanisms" -property contains a single entry "digest". -

    +

    If the plugin has all the data to calculate the digest, it issues +“response-final” signal. session_data + in that signal contains +the username, "CNonce" item and the digest value under the "Response" key.

    +

    If some of the data is incorrect or not available, “error” +signal is issued instead.

    +

    “type” property is set to "digest", and “mechanisms” +property contains a single entry "digest".

-

Details

-
-

struct GSignondDigestPlugin

-
struct GSignondDigestPlugin;
-

-Opaque GSignondDigestPlugin data structure. -

-
-
-
-

struct GSignondDigestPluginClass

-
struct GSignondDigestPluginClass {
-    GObjectClass parent_class;
-};
-
-

-Opaque GSignondDigestPluginClass data structure. -

-
-- - - - -

GObjectClass parent_class;

the parent class structure
+

Functions

+
+

Types and Values

+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/docs/html/GSignondExtension.html b/docs/html/GSignondExtension.html index 55b6e8a..09a68c9 100644 --- a/docs/html/GSignondExtension.html +++ b/docs/html/GSignondExtension.html @@ -2,27 +2,25 @@ -GSignondExtension - +gsignond API Reference Manual: GSignondExtension + - - + + - + - - - + +
@@ -32,267 +30,257 @@

GSignondExtension

GSignondExtension — provides platform adaptation functionality

- +
- -
-

Object Hierarchy

-
-  GObject
-   +----GSignondExtension
-
-
-

Description

-

-GSignondExtension provides access to platform adaptation functionality. It -contains getter methods for default implementations of GSignondAccessControlManager, -GSignondSecretStorage and GSignondStorageManager. -

-

-gSSO can be adapted to a specific platform environment by implementing a -custom extension module. The following steps need to be taken: -

-

-a) subclass and re-implement some (or all) of the functionality of the above -three classes. -

-

-b) subclass GSignondExtension and provide implementations of its getter methods for those -of the adaptation classes that have been changed. -

-

-d) provide a function GSignondExtension * extensionname_extension_init(void) -that returns an instance of the GSignondExtension subclass. -

-

-c) build and install these implementations as a gSSO extension module and -configure gSSO to use it. -

-

-Examples of custom extensions can be seen here: - -https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fextensions -and gSSO configuration is described in GSignondConfig. -

-
-
-

Details

-
-

struct GSignondExtension

-
struct GSignondExtension;
-

-Opaque GSignondExtension data structure. -

-
-
-
-

struct GSignondExtensionClass

-
struct GSignondExtensionClass {
-    GObjectClass parent_class;
-
-    const gchar * (*get_extension_name) (GSignondExtension *self);
-
-    guint32 (*get_extension_version) (GSignondExtension *self);
-
-    GSignondStorageManager * (*get_storage_manager) (GSignondExtension *self,
-                                                     GSignondConfig *config);
-
-    GSignondSecretStorage * (*get_secret_storage) (GSignondExtension *self,
-                                                   GSignondConfig *config);
-
-    GSignondAccessControlManager * (*get_access_control_manager) (
-                                                    GSignondExtension *self,
-                                                    GSignondConfig *config);
-};
-
-

-GSignondExtensionClass class containing pointers to class methods. -

-
-+

Functions

+
++++ - - - - - - + - - + - - + - - + - - +

GObjectClass parent_class;

the parent class

get_extension_name ()

implementation of gsignond_extension_get_name() +const gchar * + +gsignond_extension_get_name ()

get_extension_version ()

implementation of gsignond_extension_get_version() + +guint32 + +gsignond_extension_get_version ()

get_storage_manager ()

implementation of gsignond_extension_get_storage_manager() + +GSignondStorageManager * + +gsignond_extension_get_storage_manager ()

get_secret_storage ()

implementation of gsignond_extension_get_secret_storage() + +GSignondSecretStorage * + +gsignond_extension_get_secret_storage ()

get_access_control_manager ()

implementation of gsignond_extension_get_access_control_manager() + +GSignondAccessControlManager * + +gsignond_extension_get_access_control_manager ()
+
+

Object Hierarchy

+
    GObject
+    ╰── GSignondExtension
+
+
+
+

Includes

+
#include <gsignond/gsignond-plugin-interface.h>
+
+
+
+

Description

+

GSignondExtension provides access to platform adaptation functionality. It +contains getter methods for default implementations of GSignondAccessControlManager, +GSignondSecretStorage and GSignondStorageManager.

+

gSSO can be adapted to a specific platform environment by implementing a +custom extension module. The following steps need to be taken:

+

a) subclass and re-implement some (or all) of the functionality of the above +three classes.

+

b) subclass GSignondExtension and provide implementations of its getter methods for those +of the adaptation classes that have been changed.

+

d) provide a function GSignondExtension * extensionname_extension_init(void) +that returns an instance of the GSignondExtension subclass.

+

c) build and install these implementations as a gSSO extension module and +configure gSSO to use it.

+

Examples of custom extensions can be seen here:

+ +https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fextensions

and gSSO configuration is described in GSignondConfig.

+
+
+

Functions

+
+

gsignond_extension_get_name ()

+
const gchar *
+gsignond_extension_get_name (GSignondExtension *self);
+

Get a human readable name of the extension. Default implementation +returns "default".

+
+

Parameters

+
+++++ + + + + + +

self

object instance.

 
+
+
+

Returns

+

name of the extension.

+

[transfer none]

+
+

-

gsignond_extension_get_access_control_manager ()

-
GSignondAccessControlManager * gsignond_extension_get_access_control_manager
-                                                        (GSignondExtension *self,
-                                                         GSignondConfig *config);
-

-Factory method to get a singleton access control manager object. See -GSignondAccessControlManager for the description of the default implementation. -

-
-- - - - - - - - - - - - - - +

gsignond_extension_get_version ()

+
guint32
+gsignond_extension_get_version (GSignondExtension *self);
+

Get version of the extension, split into four bytes in order from MSB to LSB; +major, minor, patchlevel, build. Default implementation returns 0.

+
+

Parameters

+

self :

object instance.

config :

configuration object instance.

Returns :

access control manager object instance. [transfer none] -
+++++ + + + + +

self

object instance.

 
+

-

gsignond_extension_get_name ()

-
const gchar *       gsignond_extension_get_name         (GSignondExtension *self);
-

-Get a human readable name of the extension. Default implementation -returns "default". -

-
-+

gsignond_extension_get_storage_manager ()

+
GSignondStorageManager *
+gsignond_extension_get_storage_manager
+                               (GSignondExtension *self,
+                                GSignondConfig *config);
+

Factory method to get a singleton storage manager object. See +GSignondStorageManager for the description of the default implementation.

+
+

Parameters

+
+++++ - - + + + - - + + +

self :

object instance.

self

object instance.

 

Returns :

name of the extension. [transfer none] -

config

configuration object instance.

 
+
+

Returns

+

storage manager object instance.

+

[transfer none]

+
+

-

gsignond_extension_get_secret_storage ()

-
GSignondSecretStorage * gsignond_extension_get_secret_storage
-                                                        (GSignondExtension *self,
-                                                         GSignondConfig *config);
-

-Factory method to get a singleton secret storage object. See -GSignondSecretStorage for the description of the default implementation. -

-
-+

gsignond_extension_get_secret_storage ()

+
GSignondSecretStorage *
+gsignond_extension_get_secret_storage (GSignondExtension *self,
+                                       GSignondConfig *config);
+

Factory method to get a singleton secret storage object. See +GSignondSecretStorage for the description of the default implementation.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

self :

object instance.

self

object instance.

 

config :

configuration object instance.

Returns :

secret storage object instance. [transfer none] -

config

configuration object instance.

 
+
+

Returns

+

secret storage object instance.

+

[transfer none]

+
+
-

gsignond_extension_get_storage_manager ()

-
GSignondStorageManager * gsignond_extension_get_storage_manager
-                                                        (GSignondExtension *self,
-                                                         GSignondConfig *config);
-

-Factory method to get a singleton storage manager object. See -GSignondStorageManager for the description of the default implementation. -

-
-+

gsignond_extension_get_access_control_manager ()

+
GSignondAccessControlManager *
+gsignond_extension_get_access_control_manager
+                               (GSignondExtension *self,
+                                GSignondConfig *config);
+

Factory method to get a singleton access control manager object. See +GSignondAccessControlManager for the description of the default implementation.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

self :

object instance.

config :

configuration object instance.

self

object instance.

 

Returns :

storage manager object instance. [transfer none] -

config

configuration object instance.

 
-
-
-

gsignond_extension_get_version ()

-
guint32             gsignond_extension_get_version      (GSignondExtension *self);
-

-Get version of the extension, split into four bytes in order from MSB to LSB; -major, minor, patchlevel, build. Default implementation returns 0. -

-
-- - - - -

self :

object instance.
+
+

Returns

+

access control manager object instance.

+

[transfer none]

+
+
+

Types and Values

+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/GSignondPasswordPlugin.html b/docs/html/GSignondPasswordPlugin.html index cd135a5..81f9091 100644 --- a/docs/html/GSignondPasswordPlugin.html +++ b/docs/html/GSignondPasswordPlugin.html @@ -2,30 +2,26 @@ -GSignondPasswordPlugin - +gsignond API Reference Manual: GSignondPasswordPlugin + - + - - + + - - + - +
@@ -34,80 +30,42 @@

GSignondPasswordPlugin

GSignondPasswordPlugin — a plugin for retrieving the username/password

- +
-
-

Synopsis

-
-#include <gsignond/gsignond-password-plugin.h>
-
-struct              GSignondPasswordPlugin;
-struct              GSignondPasswordPluginClass;
-
-

Object Hierarchy

-
-  GObject
-   +----GSignondPasswordPlugin
+
    GObject
+    ╰── GSignondPasswordPlugin
 
-

Implemented Interfaces

-

-GSignondPasswordPlugin implements - GSignondPlugin.

+

Includes

+
#include <gsignond/gsignond-password-plugin.h>
+

Description

-

-GSignondPasswordPlugin is used in login/password based authentication protocols. +

GSignondPasswordPlugin is used in login/password based authentication protocols. It returns to the applications the username and password associated with an identity. The plugin first checks if the daemon has placed them in -gsignond_plugin_request_initial() session_data parameter +gsignond_plugin_request_initial() session_data + parameter (that means they're already stored in gSSO secure database), and if not, -the user is asked for the username and password via gSSO UI. -

-

-The plugin returns the username and password via "response-final" -if it was able to obtain them, and issues "error" otherwise. -

-

-"type" property is set to "password", and "mechanisms" -property contains a single entry "password". -

+the user is asked for the username and password via gSSO UI.

+

The plugin returns the username and password via “response-final” +if it was able to obtain them, and issues “error” otherwise.

+

“type” property is set to "password", and “mechanisms” +property contains a single entry "password".

-

Details

-
-

struct GSignondPasswordPlugin

-
struct GSignondPasswordPlugin;
-

-Opaque GSignondPasswordPlugin data structure. -

-
-
-
-

struct GSignondPasswordPluginClass

-
struct GSignondPasswordPluginClass {
-    GObjectClass parent_class;
-};
-
-

-Opaque GSignondPasswordPluginClass data structure. -

-
-- - - - -

GObjectClass parent_class;

the parent class structure
+

Functions

+
+

Types and Values

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/GSignondPlugin.html b/docs/html/GSignondPlugin.html new file mode 100644 index 0000000..dce5461 --- /dev/null +++ b/docs/html/GSignondPlugin.html @@ -0,0 +1,1240 @@ + + + + +gsignond API Reference Manual: GSignondPlugin + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GSignondPlugin

+

GSignondPlugin — an interface for implementing GLib-based authentication plugins

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+void + +gsignond_plugin_cancel () +
+void + +gsignond_plugin_request_initial () +
+void + +gsignond_plugin_request () +
+void + +gsignond_plugin_user_action_finished () +
+void + +gsignond_plugin_refresh () +
+void + +gsignond_plugin_response () +
+void + +gsignond_plugin_response_final () +
+void + +gsignond_plugin_store () +
+void + +gsignond_plugin_error () +
+void + +gsignond_plugin_user_action_required () +
+void + +gsignond_plugin_refreshed () +
+void + +gsignond_plugin_status_changed () +
+
+
+

Properties

+
+++++ + + + + + + + + + + + + +
GStrvmechanismsRead
+gchar *typeRead
+
+
+

Signals

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
voiderrorRun First
voidrefreshedRun First
voidresponseRun First
voidresponse-finalRun First
voidstatus-changedRun First
voidstoreRun First
voiduser-action-requiredRun First
+
+
+

Types and Values

+
++++ + + + + + + + + + + +
enumGSignondPluginState
structGSignondPluginInterface
+
+
+

Object Hierarchy

+
    GInterface
+    ╰── GSignondPlugin
+
+
+
+

Includes

+
#include <gsignond/gsignond-plugin-interface.h>
+
+
+
+

Description

+

GSignondPlugin is an interface for implementing GLib-based authentication plugins.

+

When creating a plugin, write the GObject boilerplate code as usual, but

+

a) declare the type as follows:

+
+ + + + + + + +
1
+2
+3
G_TYPE_OBJECT,
+G_IMPLEMENT_INTERFACE (GSIGNOND_TYPE_PLUGIN,
+                       gsignond_plugin_interface_init));
+
+ +

+

b) implement gsignond_plugin_interface_init as follows:

+
+ + + + + + + +
1
+2
+3
+4
+5
+6
+7
+8
gsignond_plugin_interface_init (GSignondPluginInterface *iface)
+{
+    iface->cancel = gsignond_password_plugin_cancel;
+    iface->request_initial = gsignond_password_plugin_request_initial;
+    iface->request = gsignond_password_plugin_request;
+    iface->user_action_finished = gsignond_password_plugin_user_action_finished;
+    iface->refresh = gsignond_password_plugin_refresh;
+}
+
+ +

+

where the gsignond_password_plugin_cancel etc. are specific implementations of +plugin interface methods that every plugin must provide (see below for when +and how they're used by the daemon).

+

c) override “type” and “mechanisms” property +implementations in the plugin class constructor like this:

+
+ + + + + + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
gsignond_password_plugin_class_init (GSignondPasswordPluginClass *klass)
+{
+    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+    
+    gobject_class->set_property = gsignond_password_plugin_set_property;
+    gobject_class->get_property = gsignond_password_plugin_get_property;
+    
+    g_object_class_override_property (gobject_class, PROP_TYPE, "type");
+    g_object_class_override_property (gobject_class, PROP_MECHANISMS, 
+                                      "mechanisms");
+}
+
+ +

+(naturally, plugin's property setter should ignore attempts to set these properties, +and plugin's property getter should provide their values when asked)

+
+

The plugin API

+
+

Plugins implement authentication sessions which are controlled through the +plugin API. Authentication sessions follow one another so there is only one active +session at a time.

+

The plugin API is a set of methods and signals that should be used in a specific +sequence:

+
+
+

Example plugins

+
+

See example plugin implementation here:

+ +https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fplugins. +

For examples of out of tree plugins, you can have a look at SASL or OAuth plugin +implementations:

+ +http://code.google.com/p/accounts-sso/source/browse?repo=gsignond-plugin-sasl. + +http://code.google.com/p/accounts-sso/source/browse?repo=gsignond-plugin-oa. + +
+
+

Functions

+
+

gsignond_plugin_cancel ()

+
void
+gsignond_plugin_cancel (GSignondPlugin *self);
+

This method cancels an ongoing authentication session. The plugin implementations +should issue a “error” signal with GSIGNOND_ERROR_SESSION_CANCELED +error, and prepare for a new authentication session.

+
+

Parameters

+
+++++ + + + + + +

self

plugin instance

 
+
+
+
+
+

gsignond_plugin_request_initial ()

+
void
+gsignond_plugin_request_initial (GSignondPlugin *self,
+                                 GSignondSessionData *session_data,
+                                 GSignondDictionary *identity_method_cache,
+                                 const gchar *mechanism);
+

This method starts a new authentication session.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

self

plugin instance

 

session_data

parameters for the session

 

identity_method_cache

data from persistent storage, saved previously via +“store” signal

 

mechanism

mechanism to use for the authentication

 
+
+
+
+
+

gsignond_plugin_request ()

+
void
+gsignond_plugin_request (GSignondPlugin *self,
+                         GSignondSessionData *session_data);
+

This method provides the plugin with additional parameters for the session +after the plugin has asked for it via “response” signal.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

session_data

additional parameters for the session

 
+
+
+
+
+

gsignond_plugin_user_action_finished ()

+
void
+gsignond_plugin_user_action_finished (GSignondPlugin *self,
+                                      GSignondSignonuiData *ui_data);
+

This method provides the plugin with the results of UI interaction +after the plugin has asked for it via “user-action-required” signal.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

ui_data

results of UI interaction

 
+
+
+
+
+

gsignond_plugin_refresh ()

+
void
+gsignond_plugin_refresh (GSignondPlugin *self,
+                         GSignondSignonuiData *ui_data);
+

This method asks the plugin to refresh the UI. The plugin responds with +“refreshed” signal.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

ui_data

UI refresh parameters

 
+
+
+
+
+

gsignond_plugin_response ()

+
void
+gsignond_plugin_response (GSignondPlugin *self,
+                          GSignondSessionData *session_data);
+

Plugin implementations should use this to issue “response” +signal. This method should not be used otherwise.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

session_data

session data

 
+
+
+
+
+

gsignond_plugin_response_final ()

+
void
+gsignond_plugin_response_final (GSignondPlugin *self,
+                                GSignondSessionData *session_data);
+

Plugin implementations should use this to issue “response-final” +signal. This method should not be used otherwise.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

session_data

session data

 
+
+
+
+
+

gsignond_plugin_store ()

+
void
+gsignond_plugin_store (GSignondPlugin *self,
+                       GSignondDictionary *identity_method_cache);
+

Plugin implementations should use this to issue “store” +signal. This method should not be used otherwise.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

identity_method_cache

data to store

 
+
+
+
+
+

gsignond_plugin_error ()

+
void
+gsignond_plugin_error (GSignondPlugin *self,
+                       GError *error);
+

Plugin implementations should use this to issue “error” +signal. This method should not be used otherwise.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

error

the error

 
+
+
+
+
+

gsignond_plugin_user_action_required ()

+
void
+gsignond_plugin_user_action_required (GSignondPlugin *self,
+                                      GSignondSignonuiData *ui_data);
+

Plugin implementations should use this to issue “user-action-required” +signal. This method should not be used otherwise.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

ui_data

UI data

 
+
+
+
+
+

gsignond_plugin_refreshed ()

+
void
+gsignond_plugin_refreshed (GSignondPlugin *self,
+                           GSignondSignonuiData *ui_data);
+

Plugin implementations should use this to issue “refreshed” +signal. This method should not be used otherwise.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

self

plugin instance

 

ui_data

UI data

 
+
+
+
+
+

gsignond_plugin_status_changed ()

+
void
+gsignond_plugin_status_changed (GSignondPlugin *self,
+                                GSignondPluginState state,
+                                const gchar *message);
+

Plugin implementations should use this to issue “status-changed” +signal. This method should not be used otherwise.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

self

plugin instance

 

state

the new state

 

message

the message

 
+
+
+
+
+

Types and Values

+
+

enum GSignondPluginState

+

The plugin provides state updates by emitting “status-changed” +signal with this enum and a string describing what happened.

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GSIGNOND_PLUGIN_STATE_NONE

+

State unknown

+
 

GSIGNOND_PLUGIN_STATE_RESOLVING

+

Resolving remote server host name

+
 

GSIGNOND_PLUGIN_STATE_CONNECTING

+

Connecting to remote server

+
 

GSIGNOND_PLUGIN_STATE_SENDING_DATA

+

Sending data to remote server

+
 

GSIGNOND_PLUGIN_STATE_WAITING

+

Waiting for reply from remote server

+
 

GSIGNOND_PLUGIN_STATE_USER_PENDING

+

Waiting for response from user

+
 

GSIGNOND_PLUGIN_STATE_REFRESHING

+

Refreshing ui request

+
 

GSIGNOND_PLUGIN_STATE_PROCESS_PENDING

+

Request has been queued

+
 

GSIGNOND_PLUGIN_STATE_STARTED

+

Request has been dequeued

+
 

GSIGNOND_PLUGIN_STATE_CANCELING

+

Canceling current process

+
 

GSIGNOND_PLUGIN_STATE_DONE

+

Process is finished

+
 

GSIGNOND_PLUGIN_STATE_HOLDING

+

Holding long non-expired token

+
 
+
+
+
+
+

struct GSignondPluginInterface

+
struct GSignondPluginInterface {
+    GTypeInterface parent;
+
+    void (*cancel) (GSignondPlugin *self);
+    void (*request_initial) (GSignondPlugin *self, 
+                     GSignondSessionData *session_data,
+                     GSignondDictionary *identity_method_cache, 
+                     const gchar *mechanism);
+    void (*request) (GSignondPlugin *self, 
+                     GSignondSessionData *session_data);
+    void (*user_action_finished) (GSignondPlugin *self, 
+                                  GSignondSignonuiData *session_data);
+    void (*refresh) (GSignondPlugin *self, 
+                     GSignondSignonuiData *session_data);
+};
+
+

GSignondPluginInterface interface containing pointers to methods that all +plugin implementations should provide.

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GTypeInterface parent;

parent interface type.

 

cancel ()

implementation of gsignond_plugin_cancel()

 

request_initial ()

implementation of gsignond_plugin_request_initial()

 

request ()

implementation of gsignond_plugin_request()

 

user_action_finished ()

implementation of gsignond_plugin_user_action_finished()

 

refresh ()

implementation of gsignond_plugin_refresh()

 
+
+
+
+
+

Property Details

+
+

The “mechanisms” property

+
  “mechanisms”               GStrv
+

This property holds a list of authentication mechanisms that the plugin +implements, all specified within the authentication method. For example, +OAuth plugin could implement "oauth1" and "oauth2" mechanisms.

+

Flags: Read

+
+
+
+

The “type” property

+
  “type”                     gchar *
+

This property holds a plugin type, or authentication method it implements +(for example "oauth" or "sasl").

+

Flags: Read

+

Default value: "none"

+
+
+
+

Signal Details

+
+

The “error” signal

+
void
+user_function (GSignondPlugin *plugin,
+               GError         *error,
+               gpointer        user_data)
+

This signal is issued by the plugin when an error has occured, or the +plugin otherwise has a reason to cancel the authentication session. The +error + should be specified according to

+GSignond errors.
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

plugin

the plugin which emitted the signal

 

error

the details of the error

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+
+
+
+

The “refreshed” signal

+
void
+user_function (GSignondPlugin *plugin,
+               GHashTable     *ui_data,
+               gpointer        user_data)
+

This signal is issued by the plugin when the UI interaction is ongoing +and the UI needs to be refreshed. This can be used for example to update +captcha image in the UI.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

plugin

the plugin which emitted the signal

 

ui_data

parameters for UI refresh

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+
+
+
+

The “response” signal

+
void
+user_function (GSignondPlugin *plugin,
+               GHashTable     *session_data,
+               gpointer        user_data)
+

This signal is issued by the plugin when it wants to provide an intermediate +response to the application or needs additional information from the application.

+

After issuing this signal the plugin expects a gsignond_plugin_response() call.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

plugin

the plugin which emitted the signal

 

session_data

a GSignondSessionData containing signal parameters

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+
+
+
+

The “response-final” signal

+
void
+user_function (GSignondPlugin *plugin,
+               GHashTable     *session_data,
+               gpointer        user_data)
+

This signal is issued by the plugin when it has completed the authentication +sequence and is used to provide the final response to the application.

+

After issuing this signal the plugin is idle and is ready for a new +authentication session.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

plugin

the plugin which emitted the signal

 

session_data

a GSignondSessionData containing signal parameters

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+
+
+
+

The “status-changed” signal

+
void
+user_function (GSignondPlugin     *plugin,
+               GSignondPluginState state,
+               gchar              *message,
+               gpointer            user_data)
+

This signal is issued by the plugin when plugin state has changed. This +can be used by applications to report authentication progress.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

plugin

the plugin which emitted the signal

 

state

the plugin state

 

message

the message that accompanies the state change

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+
+
+
+

The “store” signal

+
void
+user_function (GSignondPlugin *plugin,
+               GHashTable     *data,
+               gpointer        user_data)
+

This signal is issued by the plugin when it has data to store in persistant +storage. The same data would later be provided to plugin via + +gsignond_plugin_request_initial identity_method_cache + parameter.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

plugin

the plugin which emitted the signal

 

data

a GSignondDictionary containing data to place in persistent storage

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+
+
+
+

The “user-action-required” signal

+
void
+user_function (GSignondPlugin *plugin,
+               GHashTable     *ui_data,
+               gpointer        user_data)
+

This signal is issued by the plugin when it needs a UI interaction with +the user to happen. When the interaction is complete, gsignond_plugin_user_action_finished() +should be issued.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

plugin

the plugin which emitted the signal

 

ui_data

parameters for UI interaction

 

user_data

user data set when the signal handler was connected.

 
+
+

Flags: Run First

+
+
+
+ + + \ No newline at end of file diff --git a/docs/html/GSignondSecretStorage.html b/docs/html/GSignondSecretStorage.html index 4b26461..8b6db05 100644 --- a/docs/html/GSignondSecretStorage.html +++ b/docs/html/GSignondSecretStorage.html @@ -2,28 +2,25 @@ -GSignondSecretStorage - +gsignond API Reference Manual: GSignondSecretStorage + - + - + - - + @@ -34,565 +31,582 @@

GSignondSecretStorage

GSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache

- + - -
-

Object Hierarchy

-
-  GObject
-   +----GSignondSecretStorage
-
-
-
-

Properties

-
-  "config"                   GSignondConfig*       : Read / Write / Construct Only
-
-
-

Description

-

-GSignondSecretStorage provides access to the database where sensitive identity -data (GSignondCredentials) and identity/method cache are stored. It's preferred -that this database is protected against access by processes other than gSSO. -

-

-gSSO can be configured to use a custom extension -that provides a subclassed implementation of GSignondSecretStorage -(see GSignondExtension), otherwise a default implementation is used. -

-
-
-

Details

-
-

GSignondSecretStorage

-
typedef struct _GSignondSecretStorage GSignondSecretStorage;
-

-Opaque GSignondSecretStorage data structure. -

-
-
-
-

GSignondSecretStorageClass

-
typedef struct {
-    GObjectClass parent_class;
-
-    gboolean
-    (*open_db) (GSignondSecretStorage *self);
-
-    gboolean
-    (*close_db) (GSignondSecretStorage *self);
-
-    gboolean
-    (*clear_db) (GSignondSecretStorage *self);
-
-    gboolean
-    (*is_open_db) (GSignondSecretStorage *self);
-
-    GSignondCredentials*
-    (*load_credentials) (
-            GSignondSecretStorage *self,
-            const guint32 id);
-
-    gboolean
-    (*update_credentials) (
-            GSignondSecretStorage *self,
-            GSignondCredentials* creds);
-
-    gboolean
-    (*remove_credentials) (
-            GSignondSecretStorage *self,
-            const guint32 id);
-
-    gboolean
-    (*check_credentials) (
-            GSignondSecretStorage *self,
-            GSignondCredentials* creds);
-
-    GSignondDictionary*
-    (*load_data) (
-            GSignondSecretStorage *self,
-            const guint32 id,
-            const guint32 method);
-
-    gboolean
-    (*update_data) (
-            GSignondSecretStorage *self,
-            const guint32 id,
-            const guint32 method,
-            GSignondDictionary *data);
-
-    gboolean
-    (*remove_data) (
-            GSignondSecretStorage *self,
-            const guint32 id,
-            const guint32 method);
-
-    const GError*
-    (*get_last_error) (GSignondSecretStorage *self);
-} GSignondSecretStorageClass;
-
-

-GSignondSecretStorageClass class containing pointers to class methods. -

-
-+

Functions

+
++++ - - - - - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - +

GObjectClass parent_class;

parent class.

open_db ()

an implementation of gsignond_secret_storage_open_db() + +gboolean + +gsignond_secret_storage_open_db ()

close_db ()

an implementation of gsignond_secret_storage_close_db() + +gboolean + +gsignond_secret_storage_close_db ()

clear_db ()

an implementation of gsignond_secret_storage_clear_db() + +gboolean + +gsignond_secret_storage_clear_db ()

is_open_db ()

an implementation of gsignond_secret_storage_is_open_db() + +gboolean + +gsignond_secret_storage_is_open_db ()

load_credentials ()

an implementation of gsignond_secret_storage_load_credentials() + +GSignondCredentials * + +gsignond_secret_storage_load_credentials ()

update_credentials ()

an implementation of gsignond_secret_storage_update_credentials() + +gboolean + +gsignond_secret_storage_update_credentials ()

remove_credentials ()

an implementation of gsignond_secret_storage_remove_credentials() + +gboolean + +gsignond_secret_storage_remove_credentials ()

check_credentials ()

an implementation of gsignond_secret_storage_check_credentials() + +gboolean + +gsignond_secret_storage_check_credentials ()

load_data ()

an implementation of gsignond_secret_storage_load_data() + +GHashTable * + +gsignond_secret_storage_load_data ()

update_data ()

an implementation of gsignond_secret_storage_update_data() + +gboolean + +gsignond_secret_storage_update_data ()

remove_data ()

an implementation of gsignond_secret_storage_remove_data() + +gboolean + +gsignond_secret_storage_remove_data ()

get_last_error ()

an implementation of gsignond_secret_storage_get_last_error() +const GError * + +gsignond_secret_storage_get_last_error ()
-
+
+

Properties

+
+++++ + + + + + +
+GSignondConfig *configRead / Write / Construct Only
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GSignondSecretStorage
+
+
+
+

Includes

+
#include <gsignond/gsignond-secret-storage.h>
+
+
+
+

Description

+

GSignondSecretStorage provides access to the database where sensitive identity +data (GSignondCredentials) and identity/method cache are stored. It's preferred +that this database is protected against access by processes other than gSSO.

+

gSSO can be configured to use a custom extension +that provides a subclassed implementation of GSignondSecretStorage +(see GSignondExtension), otherwise a default implementation is used.

+
+
+

Functions

-

gsignond_secret_storage_check_credentials ()

-
gboolean            gsignond_secret_storage_check_credentials
-                                                        (GSignondSecretStorage *self,
-                                                         GSignondCredentials *creds);
-

-Checks whether the given credentials match what is stored in the database. -

-
-- - - - - - - - - - - - - - +

gsignond_secret_storage_open_db ()

+
gboolean
+gsignond_secret_storage_open_db (GSignondSecretStorage *self);
+

Opens (and initializes) the database. The implementation should take +care of creating the DB, if it doesn't exist, and it should use +GSIGNOND_CONFIG_GENERAL_SECURE_DIR +to determine database location in the filesystem.

+

The default implementation is using SQLite for the storage.

+
+

Parameters

+

self :

instance of GSignondSecretStorage -

creds :

the credentials that are being checked. [transfer none] -

Returns :

TRUE if successful, FALSE otherwise.
+++++ + + + + +

self

instance of GSignondSecretStorage

 
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+

-

gsignond_secret_storage_clear_db ()

-
gboolean            gsignond_secret_storage_clear_db    (GSignondSecretStorage *self);
-

-Removes all stored secrets from the database. -

-
-- - - - - - - - - - +

gsignond_secret_storage_close_db ()

+
gboolean
+gsignond_secret_storage_close_db (GSignondSecretStorage *self);
+

Closes the database. To reopen it, call gsignond_secret_storage_open_db().

+
+

Parameters

+

self :

instance of GSignondSecretStorage -

Returns :

TRUE if successful, FALSE otherwise.
+++++ + + + + +

self

instance of GSignondSecretStorage

 
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+

-

gsignond_secret_storage_close_db ()

-
gboolean            gsignond_secret_storage_close_db    (GSignondSecretStorage *self);
-

-Closes the database. To reopen it, call gsignond_secret_storage_open_db(). -

-
-- - - - - - - - - - +

gsignond_secret_storage_clear_db ()

+
gboolean
+gsignond_secret_storage_clear_db (GSignondSecretStorage *self);
+

Removes all stored secrets from the database.

+
+

Parameters

+

self :

instance of GSignondSecretStorage -

Returns :

TRUE if successful, FALSE otherwise.
+++++ + + + + +

self

instance of GSignondSecretStorage

 
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_secret_storage_get_last_error ()

-
const GError *      gsignond_secret_storage_get_last_error
-                                                        (GSignondSecretStorage *self);
-

-Retrieves the last occurred error that has occured -

-
-- - - - - - - - - - +

gsignond_secret_storage_is_open_db ()

+
gboolean
+gsignond_secret_storage_is_open_db (GSignondSecretStorage *self);
+

Checks if the database is open or not.

+
+

Parameters

+

self :

instance of GSignondSecretStorage -

Returns :

last occurred GError. [transfer none] -
+++++ + + + + +

self

instance of GSignondSecretStorage

 
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_secret_storage_is_open_db ()

-
gboolean            gsignond_secret_storage_is_open_db  (GSignondSecretStorage *self);
-

-Checks if the database is open or not. -

-
-+

gsignond_secret_storage_load_credentials ()

+
GSignondCredentials *
+gsignond_secret_storage_load_credentials
+                               (GSignondSecretStorage *self,
+                                const guint32 id);
+

Loads the credentials from the database.

+
+

Parameters

+
+++++ - - + + + - - + + +

self :

instance of GSignondSecretStorage -

self

instance of GSignondSecretStorage

 

Returns :

TRUE if successful, FALSE otherwise.

id

the identity id whose credentials are being loaded.

 
+
+

Returns

+

GSignondCredentials if successful, +NULL otherwise.

+

[transfer full]

+
+
-

gsignond_secret_storage_load_credentials ()

-
GSignondCredentials * gsignond_secret_storage_load_credentials
-                                                        (GSignondSecretStorage *self,
-                                                         const guint32 id);
-

-Loads the credentials from the database. -

-
-+

gsignond_secret_storage_update_credentials ()

+
gboolean
+gsignond_secret_storage_update_credentials
+                               (GSignondSecretStorage *self,
+                                GSignondCredentials *creds);
+

Stores/updates the credentials for the given identity.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

self :

instance of GSignondSecretStorage -

id :

the identity id whose credentials are being loaded.

self

instance of GSignondSecretStorage

 

Returns :

-GSignondCredentials if successful, -NULL otherwise. [transfer full] -

creds

the credentials that are being updated.

[transfer none]
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_secret_storage_load_data ()

-
GHashTable *        gsignond_secret_storage_load_data   (GSignondSecretStorage *self,
-                                                         const guint32 id,
-                                                         const guint32 method);
-

-Loads the secret data associated with a given identity and method. -

-
-+

gsignond_secret_storage_remove_credentials ()

+
gboolean
+gsignond_secret_storage_remove_credentials
+                               (GSignondSecretStorage *self,
+                                const guint32 id);
+

Remove the credentials for the given identity.

+
+

Parameters

+
+++++ - - + + + - - - - - - - - - - + + +

self :

instance of GSignondSecretStorage -

self

instance of GSignondSecretStorage

 

id :

the identity id whose data are fetched

method :

the authentication method the data is used for.

Returns :

the secret data. [transfer full] -

id

the identity whose credentials are being updated.

 
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_secret_storage_open_db ()

-
gboolean            gsignond_secret_storage_open_db     (GSignondSecretStorage *self);
-

-Opens (and initializes) the database. The implementation should take -care of creating the DB, if it doesn't exist, and it should use -GSIGNOND_CONFIG_GENERAL_SECURE_DIR and GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME -to determine database location in the filesystem. -

-

-The default implementation is using SQLite for the storage. -

-
-+

gsignond_secret_storage_check_credentials ()

+
gboolean
+gsignond_secret_storage_check_credentials
+                               (GSignondSecretStorage *self,
+                                GSignondCredentials *creds);
+

Checks whether the given credentials match what is stored in the database.

+
+

Parameters

+
+++++ - - + + + - - + + +

self :

instance of GSignondSecretStorage -

self

instance of GSignondSecretStorage

 

Returns :

TRUE if successful, FALSE otherwise.

creds

the credentials that are being checked.

[transfer none]
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_secret_storage_remove_credentials ()

-
gboolean            gsignond_secret_storage_remove_credentials
-                                                        (GSignondSecretStorage *self,
-                                                         const guint32 id);
-

-Remove the credentials for the given identity. -

-
-+

gsignond_secret_storage_load_data ()

+
GHashTable *
+gsignond_secret_storage_load_data (GSignondSecretStorage *self,
+                                   const guint32 id,
+                                   const guint32 method);
+

Loads the secret data associated with a given identity and method.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

self :

instance of GSignondSecretStorage -

self

instance of GSignondSecretStorage

 

id :

the identity whose credentials are being updated.

id

the identity id whose data are fetched

 

Returns :

TRUE if successful, FALSE otherwise.

method

the authentication method the data is used for.

 
+
+

Returns

+

the secret data.

+

[transfer full]

+
+
-

gsignond_secret_storage_remove_data ()

-
gboolean            gsignond_secret_storage_remove_data (GSignondSecretStorage *self,
-                                                         const guint32 id,
-                                                         const guint32 method);
-

-Removes secret data associated with a given id/method. -

-
-+

gsignond_secret_storage_update_data ()

+
gboolean
+gsignond_secret_storage_update_data (GSignondSecretStorage *self,
+                                     const guint32 id,
+                                     const guint32 method,
+                                     GHashTable *data);
+

Calling this method updates the secret data +associated with the given id/method.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + +

self :

instance of GSignondSecretStorage -

self

instance of GSignondSecretStorage

 

id :

the identity whose data are fetched.

id

the identity whose data are fetched.

 

method :

the authentication method the data is used for.

method

the authentication method the data is used for.

 

Returns :

TRUE if successful, FALSE otherwise.

data

the data to update.

[transfer none]
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_secret_storage_update_credentials ()

-
gboolean            gsignond_secret_storage_update_credentials
-                                                        (GSignondSecretStorage *self,
-                                                         GSignondCredentials *creds);
-

-Stores/updates the credentials for the given identity. -

-
-+

gsignond_secret_storage_remove_data ()

+
gboolean
+gsignond_secret_storage_remove_data (GSignondSecretStorage *self,
+                                     const guint32 id,
+                                     const guint32 method);
+

Removes secret data associated with a given id/method.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

self :

instance of GSignondSecretStorage -

self

instance of GSignondSecretStorage

 

creds :

the credentials that are being updated. [transfer none] -

id

the identity whose data are fetched.

 

Returns :

TRUE if successful, FALSE otherwise.

method

the authentication method the data is used for.

 
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_secret_storage_update_data ()

-
gboolean            gsignond_secret_storage_update_data (GSignondSecretStorage *self,
-                                                         const guint32 id,
-                                                         const guint32 method,
-                                                         GHashTable *data);
-

-Calling this method updates the secret data -associated with the given id/method. -

-
-- - - - - - - - - - - - - - - - - - - - - - +

gsignond_secret_storage_get_last_error ()

+
const GError *
+gsignond_secret_storage_get_last_error
+                               (GSignondSecretStorage *self);
+

Retrieves the last occurred error that has occured

+
+

Parameters

+

self :

instance of GSignondSecretStorage -

id :

the identity whose data are fetched.

method :

the authentication method the data is used for.

data :

the data to update. [transfer none] -

Returns :

TRUE if successful, FALSE otherwise.
+++++ + + + + +

self

instance of GSignondSecretStorage

 
+
+

Returns

+

last occurred GError.

+

[transfer none]

+
+ + +
+

Types and Values

Property Details

-

The "config" property

-
  "config"                   GSignondConfig*       : Read / Write / Construct Only
+

The “config” property

+
  “config”                   GSignondConfig *

Configuration object.

+

Flags: Read / Write / Construct Only

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/GSignondSsoTestPlugin.html b/docs/html/GSignondSsoTestPlugin.html index ba18da5..c9e8fe0 100644 --- a/docs/html/GSignondSsoTestPlugin.html +++ b/docs/html/GSignondSsoTestPlugin.html @@ -2,28 +2,24 @@ -GSignondSsoTestPlugin - +gsignond API Reference Manual: GSignondSsoTestPlugin + - + - + - - + @@ -34,68 +30,33 @@

GSignondSsoTestPlugin

GSignondSsoTestPlugin — a plugin that is used internally in gsignond unit test

- + -
-

Synopsis

-
-#include <gsignond/gsignond-ssotest-plugin.h>
-
-struct              GSignondSsoTestPlugin;
-struct              GSignondSsoTestPluginClass;
-
-

Object Hierarchy

-
-  GObject
-   +----GSignondSsoTestPlugin
+
    GObject
+    ╰── GSignondSsoTestPlugin
 
-

Implemented Interfaces

-

-GSignondSsoTestPlugin implements - GSignondPlugin.

+

Includes

+
#include <gsignond/gsignond-ssotest-plugin.h>
+

Description

-

-GSignondSsoTestPlugin is used by gsignond unit tests. It should not be used -by applications. -

+

GSignondSsoTestPlugin is used by gsignond unit tests. It should not be used +by applications.

-

Details

-
-

struct GSignondSsoTestPlugin

-
struct GSignondSsoTestPlugin;
-

-Opaque GSignondSsoTestPlugin data structure. -

-
-
-
-

struct GSignondSsoTestPluginClass

-
struct GSignondSsoTestPluginClass {
-    GObjectClass parent_class;
-};
-
-

-Opaque GSignondSsoTestPluginClass data structure. -

-
-- - - - -

GObjectClass parent_class;

the parent class structure
+

Functions

+
+

Types and Values

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/GSignondStorageManager.html b/docs/html/GSignondStorageManager.html index 09eb1fb..07fb97a 100644 --- a/docs/html/GSignondStorageManager.html +++ b/docs/html/GSignondStorageManager.html @@ -2,28 +2,25 @@ -GSignondStorageManager - +gsignond API Reference Manual: GSignondStorageManager + - + - + - - + @@ -34,272 +31,294 @@

GSignondStorageManager

GSignondStorageManager — manages encrypted disk storage for storing the secret database

- + - -
-

Object Hierarchy

-
-  GObject
-   +----GSignondStorageManager
-
-
-
-

Properties

-
-  "config"                   GSignondConfig*       : Read / Write / Construct Only
-
-
-
-

Description

-

-GSignondStorageManager manages encrypted disk storage for storing the -databases. The default implementation maintains a simple per-user -directory accessible only to root and gsignond group, but gSSO can be -configured to use a custom extension that provides a subclassed -implementation of GSignondStorageManager -(see GSignondExtension for instructions and pointers to examples). -

-
-

Details

-
-

struct GSignondStorageManager

-
struct GSignondStorageManager;
-

-Opaque GSignondStorageManager data structure. -

-
-
-
-

struct GSignondStorageManagerClass

-
struct GSignondStorageManagerClass {
-    GObjectClass parent_class;
-
-    gboolean (*initialize_storage) (GSignondStorageManager *self);
-    gboolean (*delete_storage) (GSignondStorageManager *self);
-    gboolean (*storage_is_initialized) (GSignondStorageManager *self);
-    const gchar * (*mount_filesystem) (GSignondStorageManager *self);
-    gboolean (*unmount_filesystem) (GSignondStorageManager *self);
-    gboolean (*filesystem_is_mounted) (GSignondStorageManager *self);
-};
-
-

-GSignondStorageManagerClass class containing pointers to class methods. -

-
-+

Functions

+
++++ - - - - - - + - - + - - + - - + - - + - - +

GObjectClass parent_class;

parent class.

initialize_storage ()

an implementation of gsignond_storage_manager_initialize_storage() + +gboolean + +gsignond_storage_manager_initialize_storage ()

delete_storage ()

an implementation of gsignond_storage_manager_delete_storage() + +gboolean + +gsignond_storage_manager_delete_storage ()

storage_is_initialized ()

an implementation of gsignond_storage_manager_storage_is_initialized() + +gboolean + +gsignond_storage_manager_storage_is_initialized ()

mount_filesystem ()

an implementation of gsignond_storage_manager_mount_filesystem() +const gchar * + +gsignond_storage_manager_mount_filesystem ()

unmount_filesystem ()

an implementation of gsignond_storage_manager_unmount_filesystem() + +gboolean + +gsignond_storage_manager_unmount_filesystem ()

filesystem_is_mounted ()

an implementation of gsignond_storage_manager_filesystem_is_mounted() + +gboolean + +gsignond_storage_manager_filesystem_is_mounted ()
-
+
+

Properties

+
+++++ + + + + + +
+GSignondConfig *configRead / Write / Construct Only
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GSignondStorageManager
+
+
+
+

Includes

+
#include <gsignond/gsignond-plugin-interface.h>
+
+
+
+

Description

+

GSignondStorageManager manages encrypted disk storage for storing the +databases. The default implementation maintains a simple per-user +directory accessible only to root and gsignond group, but gSSO can be +configured to use a custom extension that provides a subclassed +implementation of GSignondStorageManager +(see GSignondExtension for instructions and pointers to examples).

+
+
+

Functions

-

gsignond_storage_manager_delete_storage ()

-
gboolean            gsignond_storage_manager_delete_storage
-                                                        (GSignondStorageManager *self);
-

-Destroys all the encryption keys and wipes the storage. gsignond_wipe_directory() -is typically used for the latter. -

-
-- - - - - - - - - - +

gsignond_storage_manager_initialize_storage ()

+
gboolean
+gsignond_storage_manager_initialize_storage
+                               (GSignondStorageManager *self);
+

Initialize encryption storage. This means making sure that the +necessary directories under GSIGNOND_CONFIG_GENERAL_STORAGE_PATH exist and are accessible.

+
+

Parameters

+

self :

object instance.

Returns :

success?
+++++ + + + + +

self

object instance.

 
+
+

Returns

+

success?

+

+
+

-

gsignond_storage_manager_filesystem_is_mounted ()

-
gboolean            gsignond_storage_manager_filesystem_is_mounted
-                                                        (GSignondStorageManager *self);
-

-Checks if the encrypted storage filesystem is currently mounted. -

-
-- - - - - - - - - - +

gsignond_storage_manager_delete_storage ()

+
gboolean
+gsignond_storage_manager_delete_storage
+                               (GSignondStorageManager *self);
+

Destroys all the encryption keys and wipes the storage. gsignond_wipe_directory() +is typically used for the latter.

+
+

Parameters

+

self :

object instance.

Returns :

filesystem is currently mounted?
+++++ + + + + +

self

object instance.

 
+
+

Returns

+

success?

+

+
+

-

gsignond_storage_manager_initialize_storage ()

-
gboolean            gsignond_storage_manager_initialize_storage
-                                                        (GSignondStorageManager *self);
-

-Initialize encryption storage. This means making sure that the -necessary directories exist and are accessible. -

-
-- - - - - - - - - - +

gsignond_storage_manager_storage_is_initialized ()

+
gboolean
+gsignond_storage_manager_storage_is_initialized
+                               (GSignondStorageManager *self);
+

Checks if the storage has been initialized.

+
+

Parameters

+

self :

object instance.

Returns :

success?
+++++ + + + + +

self

object instance.

 
+
+

Returns

+

storage has been initialized?

+

+
+
-

gsignond_storage_manager_mount_filesystem ()

-
const gchar *       gsignond_storage_manager_mount_filesystem
-                                                        (GSignondStorageManager *self);
-

-Mounts an encrypted storage and returns the filesystem path of the storage -mount point. This path will be used to access the secret database via -GSignondSecretStorage. -

-

-The default implemenation does nothing, and immediately returns the path for the -secret database. -

-
-- - - - - - - - - - +

gsignond_storage_manager_mount_filesystem ()

+
const gchar *
+gsignond_storage_manager_mount_filesystem
+                               (GSignondStorageManager *self);
+

Mounts an encrypted storage and returns the filesystem path of the storage +mount point. This path will be set in GSignondConfig as +GSIGNOND_CONFIG_GENERAL_SECURE_DIR and used to access the secret database via +GSignondSecretStorage.

+

The default implemenation does nothing, and immediately returns the path for the +secret database.

+
+

Parameters

+

self :

object instance.

Returns :

path of the storage mount point. [transfer none] -
+++++ + + + + +

self

object instance.

 
+
+

Returns

+

path of the storage mount point.

+

[transfer none]

+
+
-

gsignond_storage_manager_storage_is_initialized ()

-
gboolean            gsignond_storage_manager_storage_is_initialized
-                                                        (GSignondStorageManager *self);
-

-Checks if the storage has been initialized. -

-
-- - - - - - - - - - +

gsignond_storage_manager_unmount_filesystem ()

+
gboolean
+gsignond_storage_manager_unmount_filesystem
+                               (GSignondStorageManager *self);
+

Unmounts a previously mounted encrypted storage filesystem.

+
+

Parameters

+

self :

object instance.

Returns :

storage has been initialized?
+++++ + + + + +

self

object instance.

 
+
+

Returns

+

success?

+

+
+
-

gsignond_storage_manager_unmount_filesystem ()

-
gboolean            gsignond_storage_manager_unmount_filesystem
-                                                        (GSignondStorageManager *self);
-

-Unmounts a previously mounted encrypted storage filesystem. -

-
-- - - - - - - - - - +

gsignond_storage_manager_filesystem_is_mounted ()

+
gboolean
+gsignond_storage_manager_filesystem_is_mounted
+                               (GSignondStorageManager *self);
+

Checks if the encrypted storage filesystem is currently mounted.

+
+

Parameters

+

self :

object instance.

Returns :

success?
+++++ + + + + +

self

object instance.

 
+
+

Returns

+

filesystem is currently mounted?

+

+
+ + +
+

Types and Values

Property Details

-

The "config" property

-
  "config"                   GSignondConfig*       : Read / Write / Construct Only
+

The “config” property

+
  “config”                   GSignondConfig *

Configuration object.

+

Flags: Read / Write / Construct Only

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/annotation-glossary.html b/docs/html/annotation-glossary.html index f4b18b3..617c9b8 100644 --- a/docs/html/annotation-glossary.html +++ b/docs/html/annotation-glossary.html @@ -2,35 +2,33 @@ -Annotation Glossary - +gsignond API Reference Manual: Annotation Glossary + - + - +
-

-Annotation Glossary

+

+Annotation Glossary

T

-
-transfer full
-

Free data after the code is done.

-
-transfer none
-

Don't free data after the code is done.

+
transfer full
+

Free data after the code is done.

+
transfer none
+

Don't free data after the code is done.

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/api-index-full.html b/docs/html/api-index-full.html index 226ebd4..503f5ef 100644 --- a/docs/html/api-index-full.html +++ b/docs/html/api-index-full.html @@ -2,91 +2,79 @@ -API Index - +gsignond API Reference Manual: API Index + - + - +  |  + V +  |  + W
-

-API Index

+

+API Index

A

-GSignondAccessControlManager, struct in GSignondAccessControlManager +GSignondAccessControlManager:config, object property in GSignondAccessControlManager
-GSignondAccessControlManager:config, object property in GSignondAccessControlManager +gsignond_access_control_manager_acl_is_valid, function in GSignondAccessControlManager
-GSignondAccessControlManagerClass, struct in GSignondAccessControlManager +gsignond_access_control_manager_peer_is_allowed_to_use_identity, function in GSignondAccessControlManager
-gsignond_access_control_manager_acl_is_valid, function in GSignondAccessControlManager +gsignond_access_control_manager_peer_is_owner_of_identity, function in GSignondAccessControlManager
-gsignond_access_control_manager_peer_is_allowed_to_use_identity, function in GSignondAccessControlManager +gsignond_access_control_manager_security_context_of_keychain, function in GSignondAccessControlManager
-gsignond_access_control_manager_peer_is_owner_of_identity, function in GSignondAccessControlManager +gsignond_access_control_manager_security_context_of_peer, function in GSignondAccessControlManager
-gsignond_access_control_manager_security_context_of_keychain, function in GSignondAccessControlManager -
-
-
-gsignond_access_control_manager_security_context_of_peer, function in GSignondAccessControlManager +gsignond_array_to_sequence, function in Utility functions

C

-GSignondConfig, struct in GSignondConfig -
-
-
-GSignondConfigClass, struct in GSignondConfig -
-
-
GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT, macro in DBus configuration
@@ -103,35 +91,15 @@
-GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME, macro in Database configuration -
-
-
-GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME, macro in Database configuration -
-
-
-GSIGNOND_CONFIG_DB_SSO, macro in Database configuration -
-
-
GSIGNOND_CONFIG_GENERAL, macro in General configuration
-GSIGNOND_CONFIG_GENERAL_BIN_DIR, macro in General configuration -
-
-
GSIGNOND_CONFIG_GENERAL_EXTENSION, macro in General configuration
-GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR, macro in General configuration -
-
-
-GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR, macro in General configuration +GSIGNOND_CONFIG_GENERAL_KEYCHAIN_SYSCTX, macro in General configuration
@@ -143,15 +111,15 @@
-gsignond_config_get_integer, function in GSignondConfig +gsignond_config_get_integer, function in GSignondConfig
-gsignond_config_get_string, function in GSignondConfig +gsignond_config_get_string, function in GSignondConfig
-gsignond_config_new, function in GSignondConfig +gsignond_config_new, function in GSignondConfig
@@ -159,55 +127,51 @@
-gsignond_config_set_integer, function in GSignondConfig +gsignond_config_set_integer, function in GSignondConfig
-gsignond_config_set_string, function in GSignondConfig +gsignond_config_set_string, function in GSignondConfig
-GSignondCredentials, struct in GSignondCredentials +gsignond_copy_array_to_sequence, function in Utility functions
-GSignondCredentialsClass, struct in GSignondCredentials +gsignond_credentials_equal, function in GSignondCredentials
-gsignond_credentials_equal, function in GSignondCredentials +gsignond_credentials_get_id, function in GSignondCredentials
-gsignond_credentials_get_id, function in GSignondCredentials +gsignond_credentials_get_password, function in GSignondCredentials
-gsignond_credentials_get_password, function in GSignondCredentials +gsignond_credentials_get_username, function in GSignondCredentials
-gsignond_credentials_get_username, function in GSignondCredentials +gsignond_credentials_new, function in GSignondCredentials
-gsignond_credentials_new, function in GSignondCredentials +gsignond_credentials_set_data, function in GSignondCredentials
-gsignond_credentials_set_data, function in GSignondCredentials +gsignond_credentials_set_id, function in GSignondCredentials
-gsignond_credentials_set_id, function in GSignondCredentials +gsignond_credentials_set_password, function in GSignondCredentials
-gsignond_credentials_set_password, function in GSignondCredentials -
-
-
-gsignond_credentials_set_username, function in GSignondCredentials +gsignond_credentials_set_username, function in GSignondCredentials

D

@@ -216,104 +180,104 @@
-GSignondDictionary, typedef in GSignondDictionary +gsignond_dictionary_contains, function in GSignondDictionary
-gsignond_dictionary_copy, function in GSignondDictionary +gsignond_dictionary_copy, function in GSignondDictionary
-gsignond_dictionary_get, function in GSignondDictionary +gsignond_dictionary_get, function in GSignondDictionary
-gsignond_dictionary_get_boolean, function in GSignondDictionary +gsignond_dictionary_get_boolean, function in GSignondDictionary
-gsignond_dictionary_get_int32, function in GSignondDictionary +gsignond_dictionary_get_int32, function in GSignondDictionary
-gsignond_dictionary_get_int64, function in GSignondDictionary +gsignond_dictionary_get_int64, function in GSignondDictionary
-gsignond_dictionary_get_string, function in GSignondDictionary +gsignond_dictionary_get_string, function in GSignondDictionary
-gsignond_dictionary_get_uint32, function in GSignondDictionary +gsignond_dictionary_get_uint32, function in GSignondDictionary
-gsignond_dictionary_get_uint64, function in GSignondDictionary +gsignond_dictionary_get_uint64, function in GSignondDictionary
-gsignond_dictionary_new, function in GSignondDictionary +gsignond_dictionary_new, function in GSignondDictionary
-gsignond_dictionary_new_from_variant, function in GSignondDictionary +gsignond_dictionary_new_from_variant, function in GSignondDictionary
-gsignond_dictionary_ref, function in GSignondDictionary +gsignond_dictionary_ref, function in GSignondDictionary
-gsignond_dictionary_remove, function in GSignondDictionary +gsignond_dictionary_remove, function in GSignondDictionary
-gsignond_dictionary_set, function in GSignondDictionary +gsignond_dictionary_set, function in GSignondDictionary
-gsignond_dictionary_set_boolean, function in GSignondDictionary +gsignond_dictionary_set_boolean, function in GSignondDictionary
-gsignond_dictionary_set_int32, function in GSignondDictionary +gsignond_dictionary_set_int32, function in GSignondDictionary
-gsignond_dictionary_set_int64, function in GSignondDictionary +gsignond_dictionary_set_int64, function in GSignondDictionary
-gsignond_dictionary_set_string, function in GSignondDictionary +gsignond_dictionary_set_string, function in GSignondDictionary
-gsignond_dictionary_set_uint32, function in GSignondDictionary +gsignond_dictionary_set_uint32, function in GSignondDictionary
-gsignond_dictionary_set_uint64, function in GSignondDictionary +gsignond_dictionary_set_uint64, function in GSignondDictionary
-gsignond_dictionary_to_variant, function in GSignondDictionary +gsignond_dictionary_to_variant, function in GSignondDictionary
-gsignond_dictionary_unref, function in GSignondDictionary +gsignond_dictionary_to_variant_builder, function in GSignondDictionary
-GSignondDigestPlugin, struct in GSignondDigestPlugin +gsignond_dictionary_unref, function in GSignondDictionary
+

E

-GSignondDigestPluginClass, struct in GSignondDigestPlugin +ERR, macro in Logging
-

E

-ERR, macro in Logging +GSIGNOND_ERROR, macro in Errors
@@ -321,543 +285,547 @@
-GSIGNOND_ERROR, macro in Errors +gsignond_error_new_from_variant, function in Errors
-gsignond_error_new_from_variant, function in Errors +gsignond_error_quark, function in Errors
-gsignond_error_quark, function in Errors +gsignond_error_to_variant, function in Errors
-gsignond_error_to_variant, function in Errors +gsignond_extension_get_access_control_manager, function in GSignondExtension
-GSignondExtension, struct in GSignondExtension +gsignond_extension_get_name, function in GSignondExtension
-GSignondExtensionClass, struct in GSignondExtension +gsignond_extension_get_secret_storage, function in GSignondExtension
-gsignond_extension_get_access_control_manager, function in GSignondExtension +gsignond_extension_get_storage_manager, function in GSignondExtension
-gsignond_extension_get_name, function in GSignondExtension +gsignond_extension_get_version, function in GSignondExtension
+

G

-gsignond_extension_get_secret_storage, function in GSignondExtension +gsignond_generate_nonce, function in Utility functions
-gsignond_extension_get_storage_manager, function in GSignondExtension +gsignond_get_gerror_for_id, macro in Errors
+

I

-gsignond_extension_get_version, function in GSignondExtension +INFO, macro in Logging
-

G

-gsignond_generate_nonce, function in Utility functions +gsignond_is_host_in_domain, function in Utility functions
+

P

-gsignond_get_gerror_for_id, macro in Errors +GSignondPlugin::error, object signal in GSignondPlugin
-

I

-INFO, macro in Logging +GSignondPlugin::refreshed, object signal in GSignondPlugin
-

P

-GSignondPasswordPlugin, struct in GSignondPasswordPlugin +GSignondPlugin::response, object signal in GSignondPlugin
-GSignondPasswordPluginClass, struct in GSignondPasswordPlugin +GSignondPlugin::response-final, object signal in GSignondPlugin
-GSignondPluginInterface, struct in GSignondPlugin +GSignondPlugin::status-changed, object signal in GSignondPlugin
-GSignondPluginState, enum in GSignondPlugin +GSignondPlugin::store, object signal in GSignondPlugin
-gsignond_plugin_cancel, function in GSignondPlugin +GSignondPlugin::user-action-required, object signal in GSignondPlugin
-gsignond_plugin_error, function in GSignondPlugin +GSignondPlugin:mechanisms, object property in GSignondPlugin
-gsignond_plugin_refresh, function in GSignondPlugin +GSignondPlugin:type, object property in GSignondPlugin
-gsignond_plugin_refreshed, function in GSignondPlugin +GSignondPluginInterface, struct in GSignondPlugin
-gsignond_plugin_request, function in GSignondPlugin +GSignondPluginState, enum in GSignondPlugin
-gsignond_plugin_request_initial, function in GSignondPlugin +gsignond_plugin_cancel, function in GSignondPlugin
-gsignond_plugin_response, function in GSignondPlugin +gsignond_plugin_error, function in GSignondPlugin
-gsignond_plugin_response_final, function in GSignondPlugin +gsignond_plugin_refresh, function in GSignondPlugin
-gsignond_plugin_status_changed, function in GSignondPlugin +gsignond_plugin_refreshed, function in GSignondPlugin
-gsignond_plugin_store, function in GSignondPlugin +gsignond_plugin_request, function in GSignondPlugin
-gsignond_plugin_user_action_finished, function in GSignondPlugin +gsignond_plugin_request_initial, function in GSignondPlugin
-gsignond_plugin_user_action_required, function in GSignondPlugin +gsignond_plugin_response, function in GSignondPlugin
-

S

-GSignondSecretStorage, struct in GSignondSecretStorage +gsignond_plugin_response_final, function in GSignondPlugin
-GSignondSecretStorage:config, object property in GSignondSecretStorage +gsignond_plugin_status_changed, function in GSignondPlugin
-GSignondSecretStorageClass, struct in GSignondSecretStorage +gsignond_plugin_store, function in GSignondPlugin
-gsignond_secret_storage_check_credentials, function in GSignondSecretStorage +gsignond_plugin_user_action_finished, function in GSignondPlugin
-gsignond_secret_storage_clear_db, function in GSignondSecretStorage +gsignond_plugin_user_action_required, function in GSignondPlugin
+

S

-gsignond_secret_storage_close_db, function in GSignondSecretStorage +GSignondSecretStorage:config, object property in GSignondSecretStorage
-gsignond_secret_storage_get_last_error, function in GSignondSecretStorage +gsignond_secret_storage_check_credentials, function in GSignondSecretStorage
-gsignond_secret_storage_is_open_db, function in GSignondSecretStorage +gsignond_secret_storage_clear_db, function in GSignondSecretStorage
-gsignond_secret_storage_load_credentials, function in GSignondSecretStorage +gsignond_secret_storage_close_db, function in GSignondSecretStorage
-gsignond_secret_storage_load_data, function in GSignondSecretStorage +gsignond_secret_storage_get_last_error, function in GSignondSecretStorage
-gsignond_secret_storage_open_db, function in GSignondSecretStorage +gsignond_secret_storage_is_open_db, function in GSignondSecretStorage
-gsignond_secret_storage_remove_credentials, function in GSignondSecretStorage +gsignond_secret_storage_load_credentials, function in GSignondSecretStorage
-gsignond_secret_storage_remove_data, function in GSignondSecretStorage +gsignond_secret_storage_load_data, function in GSignondSecretStorage
-gsignond_secret_storage_update_credentials, function in GSignondSecretStorage +gsignond_secret_storage_open_db, function in GSignondSecretStorage
-gsignond_secret_storage_update_data, function in GSignondSecretStorage +gsignond_secret_storage_remove_credentials, function in GSignondSecretStorage
-GSignondSecurityContext, struct in GSignondSecurityContext +gsignond_secret_storage_remove_data, function in GSignondSecretStorage
-GSignondSecurityContextList, typedef in GSignondSecurityContext +gsignond_secret_storage_update_credentials, function in GSignondSecretStorage
-gsignond_security_context_check, function in GSignondSecurityContext +gsignond_secret_storage_update_data, function in GSignondSecretStorage
-gsignond_security_context_compare, function in GSignondSecurityContext +GSignondSecurityContext, struct in GSignondSecurityContext
-gsignond_security_context_copy, function in GSignondSecurityContext +GSignondSecurityContextList, typedef in GSignondSecurityContext
-gsignond_security_context_free, function in GSignondSecurityContext +gsignond_security_context_check, function in GSignondSecurityContext
-gsignond_security_context_from_variant, function in GSignondSecurityContext +gsignond_security_context_compare, function in GSignondSecurityContext
-gsignond_security_context_get_application_context, function in GSignondSecurityContext +gsignond_security_context_copy, function in GSignondSecurityContext
-gsignond_security_context_get_system_context, function in GSignondSecurityContext +gsignond_security_context_free, function in GSignondSecurityContext
-gsignond_security_context_list_copy, function in GSignondSecurityContext +gsignond_security_context_from_variant, function in GSignondSecurityContext
-gsignond_security_context_list_free, function in GSignondSecurityContext +gsignond_security_context_get_application_context, function in GSignondSecurityContext
-gsignond_security_context_list_from_variant, function in GSignondSecurityContext +gsignond_security_context_get_system_context, function in GSignondSecurityContext
-gsignond_security_context_list_to_variant, function in GSignondSecurityContext +gsignond_security_context_list_copy, function in GSignondSecurityContext
-gsignond_security_context_match, function in GSignondSecurityContext +gsignond_security_context_list_free, function in GSignondSecurityContext
-gsignond_security_context_new, function in GSignondSecurityContext +gsignond_security_context_list_from_variant, function in GSignondSecurityContext
-gsignond_security_context_new_from_values, function in GSignondSecurityContext +gsignond_security_context_list_to_variant, function in GSignondSecurityContext
-gsignond_security_context_set_application_context, function in GSignondSecurityContext +gsignond_security_context_match, function in GSignondSecurityContext
-gsignond_security_context_set_system_context, function in GSignondSecurityContext +gsignond_security_context_new, function in GSignondSecurityContext
-gsignond_security_context_to_variant, function in GSignondSecurityContext +gsignond_security_context_new_from_values, function in GSignondSecurityContext
-GSignondSessionData, typedef in GSignondSessionData +gsignond_security_context_set_application_context, function in GSignondSecurityContext
-gsignond_session_data_get_caption, function in GSignondSessionData +gsignond_security_context_set_system_context, function in GSignondSecurityContext
-gsignond_session_data_get_network_proxy, function in GSignondSessionData +gsignond_security_context_to_variant, function in GSignondSecurityContext
-gsignond_session_data_get_network_timeout, function in GSignondSessionData +gsignond_sequence_to_array, function in Utility functions
-gsignond_session_data_get_realm, function in GSignondSessionData +gsignond_sequence_to_variant, function in Utility functions
-gsignond_session_data_get_renew_token, function in GSignondSessionData +gsignond_session_data_get_allowed_realms, function in GSignondSessionData
-gsignond_session_data_get_secret, function in GSignondSessionData +gsignond_session_data_get_caption, function in GSignondSessionData
-gsignond_session_data_get_ui_policy, function in GSignondSessionData +gsignond_session_data_get_network_proxy, function in GSignondSessionData
-gsignond_session_data_get_username, function in GSignondSessionData +gsignond_session_data_get_network_timeout, function in GSignondSessionData
-gsignond_session_data_get_window_id, function in GSignondSessionData +gsignond_session_data_get_realm, function in GSignondSessionData
-gsignond_session_data_set_caption, function in GSignondSessionData +gsignond_session_data_get_renew_token, function in GSignondSessionData
-gsignond_session_data_set_network_proxy, function in GSignondSessionData +gsignond_session_data_get_secret, function in GSignondSessionData
-gsignond_session_data_set_network_timeout, function in GSignondSessionData +gsignond_session_data_get_ui_policy, function in GSignondSessionData
-gsignond_session_data_set_realm, function in GSignondSessionData +gsignond_session_data_get_username, function in GSignondSessionData
-gsignond_session_data_set_renew_token, function in GSignondSessionData +gsignond_session_data_get_window_id, function in GSignondSessionData
-gsignond_session_data_set_secret, function in GSignondSessionData +gsignond_session_data_set_allowed_realms, function in GSignondSessionData
-gsignond_session_data_set_ui_policy, function in GSignondSessionData +gsignond_session_data_set_caption, function in GSignondSessionData
-gsignond_session_data_set_username, function in GSignondSessionData +gsignond_session_data_set_network_proxy, function in GSignondSessionData
-gsignond_session_data_set_window_id, function in GSignondSessionData +gsignond_session_data_set_network_timeout, function in GSignondSessionData
-GSignondSignonuiData, typedef in GSignondSignonuiData +gsignond_session_data_set_realm, function in GSignondSessionData
-GSignondSignonuiError, enum in GSignondSignonuiData +gsignond_session_data_set_renew_token, function in GSignondSessionData
-gsignond_signonui_data_get_captcha_response, function in GSignondSignonuiData +gsignond_session_data_set_secret, function in GSignondSessionData
-gsignond_signonui_data_get_captcha_url, function in GSignondSignonuiData +gsignond_session_data_set_ui_policy, function in GSignondSessionData
-gsignond_signonui_data_get_caption, function in GSignondSignonuiData +gsignond_session_data_set_username, function in GSignondSessionData
-gsignond_signonui_data_get_confirm, function in GSignondSignonuiData +gsignond_session_data_set_window_id, function in GSignondSessionData
-gsignond_signonui_data_get_final_url, function in GSignondSignonuiData +GSignondSignonuiError, enum in GSignondSignonuiData +
+
+
+gsignond_signonui_data_get_captcha_response, function in GSignondSignonuiData
-gsignond_signonui_data_get_forgot_password, function in GSignondSignonuiData +gsignond_signonui_data_get_captcha_url, function in GSignondSignonuiData
-gsignond_signonui_data_get_forgot_password_url, function in GSignondSignonuiData +gsignond_signonui_data_get_caption, function in GSignondSignonuiData
-gsignond_signonui_data_get_message, function in GSignondSignonuiData +gsignond_signonui_data_get_confirm, function in GSignondSignonuiData
-gsignond_signonui_data_get_open_url, function in GSignondSignonuiData +gsignond_signonui_data_get_final_url, function in GSignondSignonuiData
-gsignond_signonui_data_get_password, function in GSignondSignonuiData +gsignond_signonui_data_get_forgot_password, function in GSignondSignonuiData
-gsignond_signonui_data_get_query_error, function in GSignondSignonuiData +gsignond_signonui_data_get_forgot_password_url, function in GSignondSignonuiData
-gsignond_signonui_data_get_query_password, function in GSignondSignonuiData +gsignond_signonui_data_get_message, function in GSignondSignonuiData
-gsignond_signonui_data_get_query_username, function in GSignondSignonuiData +gsignond_signonui_data_get_open_url, function in GSignondSignonuiData
-gsignond_signonui_data_get_remember_password, function in GSignondSignonuiData +gsignond_signonui_data_get_password, function in GSignondSignonuiData
-gsignond_signonui_data_get_request_id, function in GSignondSignonuiData +gsignond_signonui_data_get_query_error, function in GSignondSignonuiData
-gsignond_signonui_data_get_test_reply, function in GSignondSignonuiData +gsignond_signonui_data_get_query_password, function in GSignondSignonuiData
-gsignond_signonui_data_get_title, function in GSignondSignonuiData +gsignond_signonui_data_get_query_username, function in GSignondSignonuiData
-gsignond_signonui_data_get_url_response, function in GSignondSignonuiData +gsignond_signonui_data_get_remember_password, function in GSignondSignonuiData
-gsignond_signonui_data_get_username, function in GSignondSignonuiData +gsignond_signonui_data_get_request_id, function in GSignondSignonuiData
-gsignond_signonui_data_set_captcha_response, function in GSignondSignonuiData +gsignond_signonui_data_get_test_reply, function in GSignondSignonuiData
-gsignond_signonui_data_set_captcha_url, function in GSignondSignonuiData +gsignond_signonui_data_get_title, function in GSignondSignonuiData
-gsignond_signonui_data_set_caption, function in GSignondSignonuiData +gsignond_signonui_data_get_url_response, function in GSignondSignonuiData
-gsignond_signonui_data_set_confirm, function in GSignondSignonuiData +gsignond_signonui_data_get_username, function in GSignondSignonuiData
-gsignond_signonui_data_set_final_url, function in GSignondSignonuiData +gsignond_signonui_data_set_captcha_response, function in GSignondSignonuiData
-gsignond_signonui_data_set_forgot_password, function in GSignondSignonuiData +gsignond_signonui_data_set_captcha_url, function in GSignondSignonuiData
-gsignond_signonui_data_set_forgot_password_url, function in GSignondSignonuiData +gsignond_signonui_data_set_caption, function in GSignondSignonuiData
-gsignond_signonui_data_set_message, function in GSignondSignonuiData +gsignond_signonui_data_set_confirm, function in GSignondSignonuiData
-gsignond_signonui_data_set_open_url, function in GSignondSignonuiData +gsignond_signonui_data_set_final_url, function in GSignondSignonuiData
-gsignond_signonui_data_set_password, function in GSignondSignonuiData +gsignond_signonui_data_set_forgot_password, function in GSignondSignonuiData
-gsignond_signonui_data_set_query_error, function in GSignondSignonuiData +gsignond_signonui_data_set_forgot_password_url, function in GSignondSignonuiData
-gsignond_signonui_data_set_query_password, function in GSignondSignonuiData +gsignond_signonui_data_set_message, function in GSignondSignonuiData
-gsignond_signonui_data_set_query_username, function in GSignondSignonuiData +gsignond_signonui_data_set_open_url, function in GSignondSignonuiData
-gsignond_signonui_data_set_remember_password, function in GSignondSignonuiData +gsignond_signonui_data_set_password, function in GSignondSignonuiData
-gsignond_signonui_data_set_request_id, function in GSignondSignonuiData +gsignond_signonui_data_set_query_error, function in GSignondSignonuiData
-gsignond_signonui_data_set_test_reply, function in GSignondSignonuiData +gsignond_signonui_data_set_query_password, function in GSignondSignonuiData
-gsignond_signonui_data_set_title, function in GSignondSignonuiData +gsignond_signonui_data_set_query_username, function in GSignondSignonuiData
-gsignond_signonui_data_set_url_response, function in GSignondSignonuiData +gsignond_signonui_data_set_remember_password, function in GSignondSignonuiData
-gsignond_signonui_data_set_username, function in GSignondSignonuiData +gsignond_signonui_data_set_request_id, function in GSignondSignonuiData
-GSignondSsoTestPlugin, struct in GSignondSsoTestPlugin +gsignond_signonui_data_set_test_reply, function in GSignondSignonuiData
-GSignondSsoTestPluginClass, struct in GSignondSsoTestPlugin +gsignond_signonui_data_set_title, function in GSignondSignonuiData
-GSignondStorageManager, struct in GSignondStorageManager +gsignond_signonui_data_set_url_response, function in GSignondSignonuiData
-GSignondStorageManager:config, object property in GSignondStorageManager +gsignond_signonui_data_set_username, function in GSignondSignonuiData
-GSignondStorageManagerClass, struct in GSignondStorageManager +GSignondStorageManager:config, object property in GSignondStorageManager
-gsignond_storage_manager_delete_storage, function in GSignondStorageManager +gsignond_storage_manager_delete_storage, function in GSignondStorageManager
-gsignond_storage_manager_filesystem_is_mounted, function in GSignondStorageManager +gsignond_storage_manager_filesystem_is_mounted, function in GSignondStorageManager
-gsignond_storage_manager_initialize_storage, function in GSignondStorageManager +gsignond_storage_manager_initialize_storage, function in GSignondStorageManager
-gsignond_storage_manager_mount_filesystem, function in GSignondStorageManager +gsignond_storage_manager_mount_filesystem, function in GSignondStorageManager
-gsignond_storage_manager_storage_is_initialized, function in GSignondStorageManager +gsignond_storage_manager_storage_is_initialized, function in GSignondStorageManager
-gsignond_storage_manager_unmount_filesystem, function in GSignondStorageManager +gsignond_storage_manager_unmount_filesystem, function in GSignondStorageManager

T

@@ -870,22 +838,27 @@ GSignondUiPolicy, enum in GSignondSessionData
+

V

+
+gsignond_variant_to_sequence, function in Utility functions +
+

W

WARN, macro in Logging
-gsignond_wipe_directory, function in Utility functions +gsignond_wipe_directory, function in Utility functions
-gsignond_wipe_file, function in Utility functions +gsignond_wipe_file, function in Utility functions
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/ch01.html b/docs/html/ch01.html index 106fb9d..4ebff1c 100644 --- a/docs/html/ch01.html +++ b/docs/html/ch01.html @@ -2,32 +2,32 @@ -GSignond building and installation - +gsignond API Reference Manual: GSignond building and installation + - + - +
-

-GSignond building and installation

-
+

+GSignond building and installation

+
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/docs/html/ch02.html b/docs/html/ch02.html index e81db75..5707874 100644 --- a/docs/html/ch02.html +++ b/docs/html/ch02.html @@ -2,27 +2,27 @@ -GSignond configuration - +gsignond API Reference Manual: GSignond configuration + - + - +
-

-GSignond configuration

-
+

+GSignond configuration

+
GSignondConfig — gSSO configuration information
@@ -30,15 +30,12 @@ General configuration — gSSO general configuration keys
-Database configuration — gSSO database configuration keys -
-
DBus configuration — gSSO dbus configuration keys
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/docs/html/ch03.html b/docs/html/ch03.html index f978c66..26e2c41 100644 --- a/docs/html/ch03.html +++ b/docs/html/ch03.html @@ -2,43 +2,32 @@ -GSignond API for writing authentication plugins - +gsignond API Reference Manual: Authentication plugins, plugin loaders and D-Bus IPC + - - + + - + - +
-

-GSignond API for writing authentication plugins

-
-
-GSignondPlugin — an interface for implementing authentication plugins -
-
-GSignondDictionary — a dictionary container holding string keys and variant values -
-
-GSignondSessionData — definitions for authentication session parameters -
-
-GSignondSignonuiData — definitions for user interaction parameters -
-
+

+Authentication plugins, plugin loaders and D-Bus IPC

+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/ch04.html b/docs/html/ch04.html index 35f1d17..d6b1b5c 100644 --- a/docs/html/ch04.html +++ b/docs/html/ch04.html @@ -2,40 +2,43 @@ -Standard in-tree authentication plugins - +gsignond API Reference Manual: GSignond API for writing GLib-based authentication plugins + - - - + + + - + - - + +
-

-Standard in-tree authentication plugins

-
+

+GSignond API for writing GLib-based authentication plugins

+
-GSignondDigestPlugin — a plugin that performs HTTP Digest authentication +GSignondPlugin — an interface for implementing GLib-based authentication plugins
-GSignondSsoTestPlugin — a plugin that is used internally in gsignond unit test +GSignondDictionary — a dictionary container holding string keys and variant values
-GSignondPasswordPlugin — a plugin for retrieving the username/password +GSignondSessionData — definitions for authentication session parameters +
+
+GSignondSignonuiData — definitions for user interaction parameters
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/docs/html/ch05.html b/docs/html/ch05.html index 3b4a82a..382a53c 100644 --- a/docs/html/ch05.html +++ b/docs/html/ch05.html @@ -2,49 +2,40 @@ -GSignond API for writing platform adaptation extensions - +gsignond API Reference Manual: Standard in-tree authentication plugins + - - - + + + - + - - + +
-

-GSignond API for writing platform adaptation extensions

-
+

+Standard in-tree authentication plugins

+
-GSignondExtension — provides platform adaptation functionality +GSignondDigestPlugin — a plugin that performs HTTP Digest authentication
-GSignondAccessControlManager — an object that performs access control checks +GSignondSsoTestPlugin — a plugin that is used internally in gsignond unit test
-GSignondSecurityContext — security context descriptor used in access control checks -
-
-GSignondStorageManager — manages encrypted disk storage for storing the secret database -
-
-GSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache -
-
-GSignondCredentials — credentials (username, password) associated with an identity +GSignondPasswordPlugin — a plugin for retrieving the username/password
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/docs/html/ch06.html b/docs/html/ch06.html index 9c984a2..a6a62b2 100644 --- a/docs/html/ch06.html +++ b/docs/html/ch06.html @@ -2,40 +2,49 @@ -Miscellaneous - +gsignond API Reference Manual: GSignond API for writing platform adaptation extensions + - - - + + + - + - - + +
-

-Miscellaneous

-
+

+GSignond API for writing platform adaptation extensions

+
-Errors — error definitions and utilities +GSignondExtension — provides platform adaptation functionality
-Logging — logging facilities +GSignondAccessControlManager — an object that performs access control checks
-Utility functions — miscellaneous utility functions +GSignondSecurityContext — security context descriptor used in access control checks +
+
+GSignondStorageManager — manages encrypted disk storage for storing the secret database +
+
+GSignondSecretStorage — provides access to the database that stores user credentials and identity/method cache +
+
+GSignondCredentials — credentials (username, password) associated with an identity
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/docs/html/ch07.html b/docs/html/ch07.html new file mode 100644 index 0000000..99681fb --- /dev/null +++ b/docs/html/ch07.html @@ -0,0 +1,41 @@ + + + + +gsignond API Reference Manual: Miscellaneous + + + + + + + + + + + + + + + + +
+

+Miscellaneous

+
+
+Errors — error definitions and utilities +
+
+Logging — logging facilities +
+
+Utility functions — miscellaneous utility functions +
+
+
+ + + \ No newline at end of file diff --git a/docs/html/deprecated-api-index.html b/docs/html/deprecated-api-index.html index 47eb706..77dfee8 100644 --- a/docs/html/deprecated-api-index.html +++ b/docs/html/deprecated-api-index.html @@ -2,30 +2,30 @@ -Index of deprecated API - +gsignond API Reference Manual: Index of deprecated API + - + - +
-

-Index of deprecated API

+

+Index of deprecated API

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-DBus-configuration.html b/docs/html/gsignond-DBus-configuration.html index d466a79..8b57863 100644 --- a/docs/html/gsignond-DBus-configuration.html +++ b/docs/html/gsignond-DBus-configuration.html @@ -2,25 +2,25 @@ -DBus configuration - +gsignond API Reference Manual: DBus configuration + - - - + + + - - +
@@ -30,78 +30,91 @@

DBus configuration

DBus configuration — gSSO dbus configuration keys

- +
-
-

Synopsis

-
-#include <gsignond/gsignond-config.h>
-
-#define             GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT
-#define             GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT
-#define             GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT
-#define             GSIGNOND_CONFIG_DBUS_TIMEOUTS
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-config.h>
 

Description

-

-DBus configuration keys are defined below. See GSignondConfig for how to use them. -

+

DBus configuration keys are defined below. See GSignondConfig for how to use them.

+
+
+

Functions

-

Details

+

Types and Values

-

GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT

-
#define             GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT
-

-A timeout in seconds, after which inactive authentication session dbus objects will be removed. -If not set, the dbus objects will persist. -

-

-Can be overriden in debug -builds by setting SSO_AUTH_SESSION_TIMEOUT environment variable. -

+

GSIGNOND_CONFIG_DBUS_TIMEOUTS

+
#define GSIGNOND_CONFIG_DBUS_TIMEOUTS  "ObjectTimeouts"
+
+

A prefix for dbus timeout keys. Should be used only when defining new keys.


GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT

#define             GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT
-

-A timeout in seconds, after which the gSSO daemon will exit. If not set, -the daemon will not exit. Has no effect if P2P DBus is in use. -

-

-Can be overriden in debug -builds by setting SSO_DAEMON_TIMEOUT environment variable. -

+

A timeout in seconds, after which the gSSO daemon will exit. If not set, +the daemon will not exit. Has no effect if P2P DBus is in use.

+

Can be overriden in debug +builds by setting SSO_DAEMON_TIMEOUT environment variable.


GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT

#define             GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT
-

-A timeout in seconds, after which inactive identity dbus objects will be removed. -If not set, the dbus objects will persist. -

-

-Can be overriden in debug -builds by setting SSO_IDENTITY_TIMEOUT environment variable. -

+

A timeout in seconds, after which inactive identity dbus objects will be removed. +If not set, the dbus objects will persist.

+

Can be overriden in debug +builds by setting SSO_IDENTITY_TIMEOUT environment variable.


-

GSIGNOND_CONFIG_DBUS_TIMEOUTS

-
#define GSIGNOND_CONFIG_DBUS_TIMEOUTS  "ObjectTimeouts"
-
-

-A prefix for dbus timeout keys. Should be used only when defining new keys. -

+

GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT

+
#define             GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT
+

A timeout in seconds, after which inactive authentication session dbus objects will be removed. +If not set, the dbus objects will persist.

+

Can be overriden in debug +builds by setting SSO_AUTH_SESSION_TIMEOUT environment variable.

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-Database-configuration.html b/docs/html/gsignond-Database-configuration.html deleted file mode 100644 index f60a27d..0000000 --- a/docs/html/gsignond-Database-configuration.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -Database configuration - - - - - - - - - - - - - - - - -
-
-
- - -
-

Database configuration

-

Database configuration — gSSO database configuration keys

-
-
-

Synopsis

-
-#include <gsignond/gsignond-config.h>
-
-#define             GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME
-#define             GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME
-#define             GSIGNOND_CONFIG_DB_SSO
-
-
-
-

Description

-

-Database configuration keys are defined below. See GSignondConfig for how to use them. -

-
-
-

Details

-
-

GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME

-
#define             GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME
-

-The filename of the metadata database. -

-

-Default value: "metadata.db". -

-
-
-
-

GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME

-
#define             GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME
-

-The filename of the credentials database. -

-

-Default value: "secret.db". -

-
-
-
-

GSIGNOND_CONFIG_DB_SSO

-
#define GSIGNOND_CONFIG_DB_SSO                  "Storage"
-
-

-A prefix for database keys. Should be used only when defining new keys. -

-
-
-
- - - \ No newline at end of file diff --git a/docs/html/gsignond-Errors.html b/docs/html/gsignond-Errors.html index 75e5ddd..81a8288 100644 --- a/docs/html/gsignond-Errors.html +++ b/docs/html/gsignond-Errors.html @@ -2,25 +2,25 @@ -Errors - +gsignond API Reference Manual: Errors + - - + + - + - - - + +
@@ -30,404 +30,500 @@

Errors

Errors — error definitions and utilities

- +
-
-

Synopsis

-
-#include <gsignond/gsignond-error.h>
-
-#define             GSIGNOND_ERROR
-enum                GSignondError;
-GError *            gsignond_error_new_from_variant     (GVariant *var);
-GQuark              gsignond_error_quark                (void);
-GVariant *          gsignond_error_to_variant           (GError *error);
-#define             gsignond_get_gerror_for_id          (err,
-                                                         message,
-                                                         ...)
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
#defineGSIGNOND_ERROR
+GQuark + +gsignond_error_quark () +
+GError * + +gsignond_error_new_from_variant () +
+GVariant * + +gsignond_error_to_variant () +
#define +gsignond_get_gerror_for_id() +
+
+
+

Types and Values

+
++++ + + + + +
enumGSignondError
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-error.h>
 

Description

-

-This file provides GSignond error definitions and utilities. +

This file provides GSignond error definitions and utilities. When creating an error, use GSIGNOND_ERROR for the error domain and errors -from GSignondError for the error code. -

-

-

+from GSignondError for the error code.

- - + +
1
-2
GError* err = g_error_new(GSIGNOND_ERROR, GSIGNOND_ERROR_MISSING_DATA,
-    "Not enough data");
1
"Not enough data");
-

-

+

-

Details

+

Functions

GSIGNOND_ERROR

#define GSIGNOND_ERROR   (gsignond_error_quark())
 
-

-This macro should be used when creating a GError in GSignond plugins and extensions. -(for example with g_error_new() ) -

+

This macro should be used when creating a GError in GSignond plugins and extensions. +(for example with g_error_new() )


-

enum GSignondError

-
typedef enum {
-    GSIGNOND_ERROR_NONE,
-
-    GSIGNOND_ERROR_UNKNOWN = 1,
-    GSIGNOND_ERROR_INTERNAL_SERVER = 2,
-    GSIGNOND_ERROR_INTERNAL_COMMUNICATION = 3,
-    GSIGNOND_ERROR_PERMISSION_DENIED = 4,
-    GSIGNOND_ERROR_ENCRYPTION_FAILURE,
-
-    GSIGNOND_ERROR_AUTH_SERVICE_ERR = 100,      /* Placeholder to rearrange enumeration - AuthService specific */
-    GSIGNOND_ERROR_METHOD_NOT_KNOWN,
-    GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE,
-    GSIGNOND_ERROR_INVALID_QUERY,
-
-    GSIGNOND_ERROR_IDENTITY_ERR = 200,          /* Placeholder to rearrange enumeration - Identity specific */
-    GSIGNOND_ERROR_METHOD_NOT_AVAILABLE,
-    GSIGNOND_ERROR_IDENTITY_NOT_FOUND,
-    GSIGNOND_ERROR_STORE_FAILED,
-    GSIGNOND_ERROR_REMOVE_FAILED,
-    GSIGNOND_ERROR_SIGN_OUT_FAILED,
-    GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED,
-    GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE,
-    GSIGNOND_ERROR_REFERENCE_NOT_FOUND,
-
-    GSIGNOND_ERROR_AUTH_SESSION_ERR = 300,     /* Placeholder to rearrange enumeration - AuthSession/PluginInterface specific */
-    GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE,
-    GSIGNOND_ERROR_MISSING_DATA,
-    GSIGNOND_ERROR_INVALID_CREDENTIALS,
-    GSIGNOND_ERROR_NOT_AUTHORIZED,
-    GSIGNOND_ERROR_WRONG_STATE,
-    GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED,
-    GSIGNOND_ERROR_NO_CONNECTION,
-    GSIGNOND_ERROR_NETWORK,
-    GSIGNOND_ERROR_SSL,
-    GSIGNOND_ERROR_RUNTIME,
-    GSIGNOND_ERROR_SESSION_CANCELED,
-    GSIGNOND_ERROR_TIMED_OUT,
-    GSIGNOND_ERROR_USER_INTERACTION,
-    GSIGNOND_ERROR_OPERATION_FAILED,
-    GSIGNOND_ERROR_ENCRYPTION_FAILED,
-    GSIGNOND_ERROR_TOS_NOT_ACCEPTED,
-    GSIGNOND_ERROR_FORGOT_PASSWORD,
-    GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED,
-    GSIGNOND_ERROR_INCORRECT_DATE,
-
-    GSIGNOND_ERROR_USER_ERR = 400
-} GSignondError;
-
-

-This enum provides a list of errors that plugins and extensions can use. -

-
-+

gsignond_error_quark ()

+
GQuark
+gsignond_error_quark (void);
+

Creates and returns a domain for GSignond errors.

+ +
+
+

gsignond_error_new_from_variant ()

+
GError *
+gsignond_error_new_from_variant (GVariant *var);
+

Converts the GVariant to GError.

+
+

Parameters

+
+++++ + + + + + +

var

instance of GVariant

 
+
+
+

Returns

+

GError object if successful, NULL otherwise.

+

[transfer full]

+
+
+
+
+

gsignond_error_to_variant ()

+
GVariant *
+gsignond_error_to_variant (GError *error);
+

Converts the GError to GVariant.

+
+

Parameters

+
+++++ + + + + + +

error

instance of GError

 
+
+
+

Returns

+

GVariant object if successful, NULL otherwise.

+

[transfer full]

+
+
+
+
+

gsignond_get_gerror_for_id()

+
#define             gsignond_get_gerror_for_id(err, message, args...)
+

A helper macro that creates a GError with the proper gsignond domain

+
+

Parameters

+
+++++ - - - - - - + + + - - + + + - - + + + + +

GSIGNOND_ERROR_NONE

No error -

GSIGNOND_ERROR_UNKNOWN

Catch-all for errors not distinguished by another code. -

err

A GSignondError specifying the error

 

GSIGNOND_ERROR_INTERNAL_SERVER

Signon Daemon internal error. -

message

Format string for the error message

 

GSIGNOND_ERROR_INTERNAL_COMMUNICATION

Communication with Signon Daemon error. -

...

parameters for the error string

 
+
+
+
+
+

Types and Values

+
+

enum GSignondError

+

This enum provides a list of errors that plugins and extensions can use.

+
+

Members

+
+++++ + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - -

GSIGNOND_ERROR_PERMISSION_DENIED

The operation cannot be performed due to insufficient client permissions. +

GSIGNOND_ERROR_NONE

+

No error

 

GSIGNOND_ERROR_ENCRYPTION_FAILURE

Failure during data encryption/decryption. +

GSIGNOND_ERROR_UNKNOWN

+

Catch-all for errors not distinguished by another code.

 

GSIGNOND_ERROR_AUTH_SERVICE_ERR

Placeholder to rearrange enumeration - AuthService specific +

GSIGNOND_ERROR_INTERNAL_SERVER

+

Signon Daemon internal error.

 

GSIGNOND_ERROR_METHOD_NOT_KNOWN

The method with this name is not found. +

GSIGNOND_ERROR_INTERNAL_COMMUNICATION

+

Communication with Signon Daemon error.

 

GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE

The service is temporarily unavailable. +

GSIGNOND_ERROR_PERMISSION_DENIED

+

The operation cannot be performed due to insufficient client permissions.

 

GSIGNOND_ERROR_INVALID_QUERY

Parameters for the query are invalid. +

GSIGNOND_ERROR_ENCRYPTION_FAILURE

+

Failure during data encryption/decryption.

 

GSIGNOND_ERROR_IDENTITY_ERR

Placeholder to rearrange enumeration - Identity specific +

GSIGNOND_ERROR_AUTH_SERVICE_ERR

+

Placeholder to rearrange enumeration - AuthService specific

 

GSIGNOND_ERROR_METHOD_NOT_AVAILABLE

The requested method is not available. +

GSIGNOND_ERROR_METHOD_NOT_KNOWN

+

The method with this name is not found.

 

GSIGNOND_ERROR_IDENTITY_NOT_FOUND

The identity matching this Identity object was not found on the service. +

GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE

+

The service is temporarily unavailable.

 

GSIGNOND_ERROR_STORE_FAILED

Storing credentials failed. +

GSIGNOND_ERROR_INVALID_QUERY

+

Parameters for the query are invalid.

 

GSIGNOND_ERROR_REMOVE_FAILED

Removing credentials failed. +

GSIGNOND_ERROR_IDENTITY_ERR

+

Placeholder to rearrange enumeration - Identity specific

 

GSIGNOND_ERROR_SIGN_OUT_FAILED

SignOut failed. +

GSIGNOND_ERROR_METHOD_NOT_AVAILABLE

+

The requested method is not available.

 

GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED

Identity operation was canceled by user. +

GSIGNOND_ERROR_IDENTITY_NOT_FOUND

+

The identity matching this Identity object was not found on the service.

 

GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE

Query failed. +

GSIGNOND_ERROR_STORE_FAILED

+

Storing credentials failed.

 

GSIGNOND_ERROR_REFERENCE_NOT_FOUND

Trying to remove nonexistent reference. +

GSIGNOND_ERROR_REMOVE_FAILED

+

Removing credentials failed.

 

GSIGNOND_ERROR_AUTH_SESSION_ERR

Placeholder to rearrange enumeration - AuthSession/PluginInterface specific +

GSIGNOND_ERROR_SIGN_OUT_FAILED

+

SignOut failed.

 

GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE

The requested mechanism is not available. +

GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED

+

Identity operation was canceled by user.

 

GSIGNOND_ERROR_MISSING_DATA

The SessionData object does not contain necessary information. +

GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE

+

Query failed.

 

GSIGNOND_ERROR_INVALID_CREDENTIALS

The supplied credentials are invalid for the mechanism implementation. +

GSIGNOND_ERROR_REFERENCE_NOT_FOUND

+

Trying to remove nonexistent reference.

 

GSIGNOND_ERROR_NOT_AUTHORIZED

Authorization failed. +

GSIGNOND_ERROR_AUTH_SESSION_ERR

+

Placeholder to rearrange enumeration - AuthSession/PluginInterface specific

 

GSIGNOND_ERROR_WRONG_STATE

An operation method has been called in a wrong state. +

GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE

+

The requested mechanism is not available.

 

GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED

The operation is not supported by the mechanism implementation. +

GSIGNOND_ERROR_MISSING_DATA

+

The SessionData object does not contain necessary information.

 

GSIGNOND_ERROR_NO_CONNECTION

No Network connetion. +

GSIGNOND_ERROR_INVALID_CREDENTIALS

+

The supplied credentials are invalid for the mechanism implementation.

 

GSIGNOND_ERROR_NETWORK

Network connetion failed. +

GSIGNOND_ERROR_NOT_AUTHORIZED

+

Authorization failed.

 

GSIGNOND_ERROR_SSL

Ssl connection failed. +

GSIGNOND_ERROR_WRONG_STATE

+

An operation method has been called in a wrong state.

 

GSIGNOND_ERROR_RUNTIME

Casting SessionData into subclass failed +

GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED

+

The operation is not supported by the mechanism implementation.

 

GSIGNOND_ERROR_SESSION_CANCELED

Challenge was cancelled. +

GSIGNOND_ERROR_NO_CONNECTION

+

No Network connetion.

 

GSIGNOND_ERROR_TIMED_OUT

Challenge was timed out. +

GSIGNOND_ERROR_NETWORK

+

Network connetion failed.

 

GSIGNOND_ERROR_USER_INTERACTION

User interaction dialog failed +

GSIGNOND_ERROR_SSL

+

Ssl connection failed.

 

GSIGNOND_ERROR_OPERATION_FAILED

Temporary failure in authentication. +

GSIGNOND_ERROR_RUNTIME

+

Casting SessionData into subclass failed

 

GSIGNOND_ERROR_ENCRYPTION_FAILED

Failure during data encryption/decryption. +

GSIGNOND_ERROR_SESSION_CANCELED

+

Challenge was cancelled.

 

GSIGNOND_ERROR_TOS_NOT_ACCEPTED

User declined Terms of Service. +

GSIGNOND_ERROR_TIMED_OUT

+

Challenge was timed out.

 

GSIGNOND_ERROR_FORGOT_PASSWORD

User requested reset password sequence. +

GSIGNOND_ERROR_USER_INTERACTION

+

User interaction dialog failed

 

GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED

Method or mechanism not allowed for this identity. +

GSIGNOND_ERROR_OPERATION_FAILED

+

Temporary failure in authentication.

 

GSIGNOND_ERROR_INCORRECT_DATE

Date time incorrect on device. +

GSIGNOND_ERROR_ENCRYPTION_FAILED

+

Failure during data encryption/decryption.

 

GSIGNOND_ERROR_USER_ERR

Placeholder to rearrange enumeration - User space specific +

GSIGNOND_ERROR_TOS_NOT_ACCEPTED

+

User declined Terms of Service.

 
-
-
-
-

gsignond_error_new_from_variant ()

-
GError *            gsignond_error_new_from_variant     (GVariant *var);
-

-Converts the GVariant to GError. -

-
-- - - + + - - + + - -

var :

instance of GVariant +

GSIGNOND_ERROR_FORGOT_PASSWORD

+

User requested reset password sequence.

 

Returns :

-GError object if successful, NULL otherwise. [transfer full] +

GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED

+

Method or mechanism not allowed for this identity.

 
-
-
-
-

gsignond_error_quark ()

-
GQuark              gsignond_error_quark                (void);
-

-Creates and returns a domain for GSignond errors. -

-
-
-
-

gsignond_error_to_variant ()

-
GVariant *          gsignond_error_to_variant           (GError *error);
-

-Converts the GError to GVariant. -

-
-- - - + + - - + +

error :

instance of GError +

GSIGNOND_ERROR_INCORRECT_DATE

+

Date time incorrect on device.

 

Returns :

-GVariant object if successful, NULL otherwise. [transfer full] +

GSIGNOND_ERROR_USER_ERR

+

Placeholder to rearrange enumeration - User space specific

 
-
-
-

gsignond_get_gerror_for_id()

-
#define             gsignond_get_gerror_for_id(err, message, args...)
-

-A helper macro that creates a GError with the proper gsignond domain -

-
-- - - - - - - - - - - - - - -

err :

A GSignondError specifying the error

message :

Format string for the error message

... :

parameters for the error string
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-GSignondDictionary.html b/docs/html/gsignond-GSignondDictionary.html index 8c7f6e2..1170161 100644 --- a/docs/html/gsignond-GSignondDictionary.html +++ b/docs/html/gsignond-GSignondDictionary.html @@ -2,25 +2,25 @@ -GSignondDictionary - +gsignond API Reference Manual: GSignondDictionary + - - + + - + - - - + +
@@ -30,74 +30,217 @@

GSignondDictionary

GSignondDictionary — a dictionary container holding string keys and variant values

- +
-
-

Synopsis

-
-#include <gsignond/gsignond-dictionary.h>
-
-typedef             GSignondDictionary;
-GSignondDictionary * gsignond_dictionary_copy           (GSignondDictionary *other);
-GVariant *          gsignond_dictionary_get             (GSignondDictionary *dict,
-                                                         const gchar *key);
-gboolean            gsignond_dictionary_get_boolean     (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gboolean *value);
-gboolean            gsignond_dictionary_get_int32       (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gint *value);
-gboolean            gsignond_dictionary_get_int64       (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gint64 *value);
-const gchar *       gsignond_dictionary_get_string      (GSignondDictionary *dict,
-                                                         const gchar *key);
-gboolean            gsignond_dictionary_get_uint32      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         guint *value);
-gboolean            gsignond_dictionary_get_uint64      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         guint64 *value);
-GSignondDictionary * gsignond_dictionary_new            (void);
-GSignondDictionary * gsignond_dictionary_new_from_variant
-                                                        (GVariant *variant);
-GSignondDictionary * gsignond_dictionary_ref            (GSignondDictionary *dict);
-gboolean            gsignond_dictionary_remove          (GSignondDictionary *dict,
-                                                         const gchar *key);
-gboolean            gsignond_dictionary_set             (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         GVariant *value);
-gboolean            gsignond_dictionary_set_boolean     (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gboolean value);
-gboolean            gsignond_dictionary_set_int32       (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gint value);
-gboolean            gsignond_dictionary_set_int64       (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gint64 value);
-gboolean            gsignond_dictionary_set_string      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         const gchar *value);
-gboolean            gsignond_dictionary_set_uint32      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         guint32 value);
-gboolean            gsignond_dictionary_set_uint64      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         guint64 value);
-GVariant *          gsignond_dictionary_to_variant      (GSignondDictionary *dict);
-void                gsignond_dictionary_unref           (GSignondDictionary *dict);
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-dictionary.h>
 

Description

-

-A GSignondDictionary is a dictionary data structure that maps string keys to GVariant values. +

A GSignondDictionary is a dictionary data structure that maps string keys to GVariant values. It's used in multiple places in gsignond and its public API to pass key-value -data sets. -

-

-

+data sets.

@@ -108,664 +251,849 @@ data sets. 4 5 6 -7 -8 - + +guint32 age; +gboolean success =gsignond_dictionary_get_uint32(dict,"age", &age); +const gchar* name =gsignond_dictionary_get_string(dict,"name"); +gsignond_dictionary_unref(dict);
GSignondDictionary* dict = gsignond_dictionary_new();
-    gsignond_dictionary_set_string(dict, "name", "John Smith");
-    gsignond_dictionary_set_uint32(dict, "age", 32);
+7
gsignond_dictionary_set_string(dict, "name", "John Smith");
+gsignond_dictionary_set_uint32(dict, "age", 32);
 
-    guint32 age;
-    gboolean success = gsignond_dictionary_get_uint32(dict, "age", &age);
-    const gchar* name = gsignond_dictionary_get_string(dict, "name");
-    gsignond_dictionary_unref(dict);
-

-

+

-

Details

+

Functions

-

GSignondDictionary

-
typedef GHashTable GSignondDictionary;
-
-

-GSignondDictionary is a typedef for GHashTable, which -means the developers may also use methods associated with that structure. -

+

gsignond_dictionary_new ()

+
GSignondDictionary *
+gsignond_dictionary_new (void);
+

Creates a new instance of GSignondDictionary.

+
+

Returns

+

GSignondDictionary object if successful, +NULL otherwise.

+

[transfer full]

+

-

gsignond_dictionary_copy ()

-
GSignondDictionary * gsignond_dictionary_copy           (GSignondDictionary *other);
-

-Creates a copy of the dictionary. -

-
-- - - - - - - - - - +

gsignond_dictionary_ref ()

+
GSignondDictionary *
+gsignond_dictionary_ref (GSignondDictionary *dict);
+

Increments the reference count of the dictionary structure.

+
+

Parameters

+

other :

instance of GSignondDictionary -

Returns :

-GSignondDictionary object if the copy was successful, -NULL otherwise. [transfer full] -
+++++ + + + + +

dict

instance of GSignondDictionary

 
+
+

Returns

+

the pointer to the passed in GSignondDictionary

+

+
+

-

gsignond_dictionary_get ()

-
GVariant *          gsignond_dictionary_get             (GSignondDictionary *dict,
-                                                         const gchar *key);
-

-Retrieves a GVariant value from the dictionary. This can be used to retrieve -a value of an arbitrary type, and then convert it manually to a specific type -using GVariant methods. For most commonly used types, also getters that -return the specific type directly are provided (gsignond_dictionary_get_string() -and similar). -

-
-- - - - - - - - - - - - - - +

gsignond_dictionary_unref ()

+
void
+gsignond_dictionary_unref (GSignondDictionary *dict);
+

Decrements the reference count of the dictionary structure. If the reference +count reaches zero, the structure is deallocated and shouldn't be used.

+
+

Parameters

+

dict :

instance of GSignondDictionary -

key :

the key to look up in the dictionary

Returns :

the value; NULL is returned in case of failure (for -example if the entry corresponding to the supplied key doesn't exist). [transfer none] -
+++++ + + + + +

dict

instance of GSignondDictionary

 
+

-

gsignond_dictionary_get_boolean ()

-
gboolean            gsignond_dictionary_get_boolean     (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gboolean *value);
-

-Retrieves a gboolean value. -

-
-- - - - - - - - - - - - - - - - - - +

gsignond_dictionary_copy ()

+
GSignondDictionary *
+gsignond_dictionary_copy (GSignondDictionary *other);
+

Creates a copy of the dictionary.

+
+

Parameters

+

dict :

instance of GSignondDictionary -

key :

key to look up. [transfer none] -

value :

points to the location where the value should be set

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.
+++++ + + + + + +

other

instance of GSignondDictionary

 
+
+
+

Returns

+

GSignondDictionary object if the copy was successful, +NULL otherwise.

+

[transfer full]

+
+ +
+
+

gsignond_dictionary_new_from_variant ()

+
GSignondDictionary *
+gsignond_dictionary_new_from_variant (GVariant *variant);
+

Converts the GVariant to GSignondDictionary. This is useful for example if +the dictionary needs to be deserialized, or if it's contained in another +GSignondDictionary and has been retrieved using gsignond_dictionary_get().

+
+

Parameters

+
+++++ + + + + + +

variant

instance of GVariant

 
+
+
+

Returns

+

GSignondDictionary if successful, NULL otherwise.

+

[transfer full]

+
+
+
+
+

gsignond_dictionary_to_variant ()

+
GVariant *
+gsignond_dictionary_to_variant (GSignondDictionary *dict);
+

Converts the GSignondDictionary to a GVariant. The result can be serialized +or put into another GSignondDictionary using gsignond_dictionary_set().

+
+

Parameters

+
+++++ + + + + +

dict

instance of GSignondDictionary

 
+
+

Returns

+

GVariant object if successful, NULL otherwise.

+

[transfer full]

+
+
+
+
+

gsignond_dictionary_to_variant_builder ()

+
GVariantBuilder *
+gsignond_dictionary_to_variant_builder
+                               (GSignondDictionary *dict);
+

Converts the GSignondDictionary to a GVariantBuilder of type +G_VARIANT_TYPE_VARDICT.

+

Caller should use g_variant_builder_unref() on the return value when it is +no longer needed.

+
+

Parameters

+
+++++ + + + + + +

dict

instance of GSignondDictionary

 
+
+
+

Returns

+

GVariantBuilder if successful, NULL otherwise.

+

[transfer full]

+
+

-

gsignond_dictionary_get_int32 ()

-
gboolean            gsignond_dictionary_get_int32       (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gint *value);
-

-Retrieves a int32 value. -

-
-+

gsignond_dictionary_get ()

+
GVariant *
+gsignond_dictionary_get (GSignondDictionary *dict,
+                         const gchar *key);
+

Retrieves a GVariant value from the dictionary. This can be used to retrieve +a value of an arbitrary type, and then convert it manually to a specific type +using GVariant methods. For most commonly used types, also getters that +return the specific type directly are provided (gsignond_dictionary_get_string() +and similar).

+
+

Parameters

+
+++++ - - - - - - - - - - + + + - - + + +

dict :

instance of GSignondDictionary -

key :

key to look up. [transfer none] -

value :

points to the location where the value should be set

dict

instance of GSignondDictionary

 

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.

key

the key to look up in the dictionary

 
+
+

Returns

+

the value; NULL is returned in case of failure (for +example if the entry corresponding to the supplied key doesn't exist).

+

[transfer none]

+
+
-

gsignond_dictionary_get_int64 ()

-
gboolean            gsignond_dictionary_get_int64       (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gint64 *value);
-

-Retrieves a int64 value. -

-
-+

gsignond_dictionary_set ()

+
gboolean
+gsignond_dictionary_set (GSignondDictionary *dict,
+                         const gchar *key,
+                         GVariant *value);
+

Adds or replaces key-value pair in the dictionary. This allows to set a value +of an arbitrary type: it first needs to be converted to a GVariant. For most +commonly used types also type-specific setters are provided.

+
+

Parameters

+
+++++ - - + + + - - + + + - - - - - - + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

key :

key to look up. [transfer none] -

key

key to be set.

[transfer none]

value :

points to the location where the value should be set

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.

value

value to be set.

[transfer full]
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_dictionary_get_string ()

-
const gchar *       gsignond_dictionary_get_string      (GSignondDictionary *dict,
-                                                         const gchar *key);
-

-Retrieves a string value. -

-
-+

gsignond_dictionary_get_boolean ()

+
gboolean
+gsignond_dictionary_get_boolean (GSignondDictionary *dict,
+                                 const gchar *key,
+                                 gboolean *value);
+

Retrieves a gboolean value.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

key :

key to look up. [transfer none] -

key

key to look up.

[transfer none]

Returns :

the value if it was retrieved successfully, NULL otherwise. [transfer none] -

value

points to the location where the value should be set

 
+
+

Returns

+

TRUE if the value was retrieved successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_get_uint32 ()

-
gboolean            gsignond_dictionary_get_uint32      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         guint *value);
-

-Retrieves a uint32 value. -

-
-+

gsignond_dictionary_set_boolean ()

+
gboolean
+gsignond_dictionary_set_boolean (GSignondDictionary *dict,
+                                 const gchar *key,
+                                 gboolean value);
+

Sets or replaces a gboolean value in the dictionary.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + + - - + + +

dict :

instance of GSignondDictionary -

key :

key to look up. [transfer none] -

dict

instance of GSignondDictionary

 

value :

points to the location where the value should be set

key

key to set.

[transfer none]

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.

value

value to set

 
+
+

Returns

+

TRUE if the value was set or replaced successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_get_uint64 ()

-
gboolean            gsignond_dictionary_get_uint64      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         guint64 *value);
-

-Retrieves a uint64 value. -

-
-+

gsignond_dictionary_get_int32 ()

+
gboolean
+gsignond_dictionary_get_int32 (GSignondDictionary *dict,
+                               const gchar *key,
+                               gint *value);
+

Retrieves a int32 value.

+
+

Parameters

+
+++++ - - + + + - - + + + - - - - - - + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

key :

key to look up. [transfer none] -

key

key to look up.

[transfer none]

value :

points to the location where the value should be set

Returns :

TRUE if the value was retrieved successfully, FALSE otherwise.

value

points to the location where the value should be set

 
-
-
-

gsignond_dictionary_new ()

-
GSignondDictionary * gsignond_dictionary_new            (void);
-

-Creates a new instance of GSignondDictionary. -

-
-- - - - -

Returns :

-GSignondDictionary object if successful, -NULL otherwise. [transfer full] -
+
+

Returns

+

TRUE if the value was retrieved successfully, FALSE otherwise.

+

+

-

gsignond_dictionary_new_from_variant ()

-
GSignondDictionary * gsignond_dictionary_new_from_variant
-                                                        (GVariant *variant);
-

-Converts the GVariant to GSignondDictionary. This is useful for example if -the dictionary needs to be deserialized, or if it's contained in another -GSignondDictionary and has been retrieved using gsignond_dictionary_get(). -

-
-+

gsignond_dictionary_set_int32 ()

+
gboolean
+gsignond_dictionary_set_int32 (GSignondDictionary *dict,
+                               const gchar *key,
+                               gint value);
+

Sets or replaces a int32 value in the dictionary.

+
+

Parameters

+
+++++ - - + + + - - + + + + + + + +

variant :

instance of GVariant -

dict

instance of GSignondDictionary

 

Returns :

-GSignondDictionary if successful, NULL otherwise. [transfer full] -

key

key to set.

[transfer none]

value

value to set

 
+
+

Returns

+

TRUE if the value was set or replaced successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_ref ()

-
GSignondDictionary * gsignond_dictionary_ref            (GSignondDictionary *dict);
-

-Increments the reference count of the dictionary structure. -

-
-+

gsignond_dictionary_get_uint32 ()

+
gboolean
+gsignond_dictionary_get_uint32 (GSignondDictionary *dict,
+                                const gchar *key,
+                                guint *value);
+

Retrieves a uint32 value.

+
+

Parameters

+
+++++ - - + + + - - + + + + + + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

Returns :

the pointer to the passed in GSignondDictionary -

key

key to look up.

[transfer none]

value

points to the location where the value should be set

 
+
+

Returns

+

TRUE if the value was retrieved successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_remove ()

-
gboolean            gsignond_dictionary_remove          (GSignondDictionary *dict,
-                                                         const gchar *key);
-

-Removes key-value pair in the dictionary as per key. -

-
-+

gsignond_dictionary_set_uint32 ()

+
gboolean
+gsignond_dictionary_set_uint32 (GSignondDictionary *dict,
+                                const gchar *key,
+                                guint32 value);
+

Sets or replaces a uint32 value in the dictionary.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

key :

key which needs to be removed from the dictionary. [transfer none] -

key

key to set.

[transfer none]

Returns :

TRUE if successful, FALSE otherwise.

value

value to set

 
+
+

Returns

+

TRUE if the value was set or replaced successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_set ()

-
gboolean            gsignond_dictionary_set             (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         GVariant *value);
-

-Adds or replaces key-value pair in the dictionary. This allows to set a value -of an arbitrary type: it first needs to be converted to a GVariant. For most -commonly used types also type-specific setters are provided. -

-
-+

gsignond_dictionary_get_int64 ()

+
gboolean
+gsignond_dictionary_get_int64 (GSignondDictionary *dict,
+                               const gchar *key,
+                               gint64 *value);
+

Retrieves a int64 value.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + + - - + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

key :

key to be set. [transfer none] -

value :

value to be set. [transfer full] -

key

key to look up.

[transfer none]

Returns :

TRUE if successful, FALSE otherwise.

value

points to the location where the value should be set

 
+
+

Returns

+

TRUE if the value was retrieved successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_set_boolean ()

-
gboolean            gsignond_dictionary_set_boolean     (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gboolean value);
-

-Sets or replaces a gboolean value in the dictionary. -

-
-+

gsignond_dictionary_set_int64 ()

+
gboolean
+gsignond_dictionary_set_int64 (GSignondDictionary *dict,
+                               const gchar *key,
+                               gint64 value);
+

Sets or replaces a int64 value in the dictionary.

+
+

Parameters

+
+++++ - - + + + - - + + + - - - - - - + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

key :

key to set. [transfer none] -

key

key to set.

[transfer none]

value :

value to set

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.

value

value to set

 
+
+

Returns

+

TRUE if the value was set or replaced successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_set_int32 ()

-
gboolean            gsignond_dictionary_set_int32       (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gint value);
-

-Sets or replaces a int32 value in the dictionary. -

-
-+

gsignond_dictionary_get_uint64 ()

+
gboolean
+gsignond_dictionary_get_uint64 (GSignondDictionary *dict,
+                                const gchar *key,
+                                guint64 *value);
+

Retrieves a uint64 value.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + + - - + + +

dict :

instance of GSignondDictionary -

key :

key to set. [transfer none] -

dict

instance of GSignondDictionary

 

value :

value to set

key

key to look up.

[transfer none]

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.

value

points to the location where the value should be set

 
+
+

Returns

+

TRUE if the value was retrieved successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_set_int64 ()

-
gboolean            gsignond_dictionary_set_int64       (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         gint64 value);
-

-Sets or replaces a int64 value in the dictionary. -

-
-+

gsignond_dictionary_set_uint64 ()

+
gboolean
+gsignond_dictionary_set_uint64 (GSignondDictionary *dict,
+                                const gchar *key,
+                                guint64 value);
+

Sets or replaces a uint64 value in the dictionary.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + + - - + + +

dict :

instance of GSignondDictionary -

key :

key to set. [transfer none] -

dict

instance of GSignondDictionary

 

value :

value to set

key

key to set.

[transfer none]

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.

value

value to set

 
+
+

Returns

+

TRUE if the value was set or replaced successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_set_string ()

-
gboolean            gsignond_dictionary_set_string      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         const gchar *value);
-

-Sets or replaces a string value in the dictionary. -

-
-+

gsignond_dictionary_get_string ()

+
const gchar *
+gsignond_dictionary_get_string (GSignondDictionary *dict,
+                                const gchar *key);
+

Retrieves a string value.

+
+

Parameters

+
+++++ - - - - - - - - - - + + + - - + + +

dict :

instance of GSignondDictionary -

key :

key to set. [transfer none] -

value :

value to set. [transfer none] -

dict

instance of GSignondDictionary

 

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.

key

key to look up.

[transfer none]
+
+

Returns

+

the value if it was retrieved successfully, NULL otherwise.

+

[transfer none]

+
+
-

gsignond_dictionary_set_uint32 ()

-
gboolean            gsignond_dictionary_set_uint32      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         guint32 value);
-

-Sets or replaces a uint32 value in the dictionary. -

-
-+

gsignond_dictionary_set_string ()

+
gboolean
+gsignond_dictionary_set_string (GSignondDictionary *dict,
+                                const gchar *key,
+                                const gchar *value);
+

Sets or replaces a string value in the dictionary.

+
+

Parameters

+
+++++ - - + + + - - + + + - - - - - - + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

key :

key to set. [transfer none] -

key

key to set.

[transfer none]

value :

value to set

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.

value

value to set.

[transfer none]
+
+

Returns

+

TRUE if the value was set or replaced successfully, FALSE otherwise.

+

+
+
-

gsignond_dictionary_set_uint64 ()

-
gboolean            gsignond_dictionary_set_uint64      (GSignondDictionary *dict,
-                                                         const gchar *key,
-                                                         guint64 value);
-

-Sets or replaces a uint64 value in the dictionary. -

-
-+

gsignond_dictionary_remove ()

+
gboolean
+gsignond_dictionary_remove (GSignondDictionary *dict,
+                            const gchar *key);
+

Removes key-value pair in the dictionary as per key.

+
+

Parameters

+
+++++ - - - - - - - - - - + + + - - + + +

dict :

instance of GSignondDictionary -

key :

key to set. [transfer none] -

value :

value to set

dict

instance of GSignondDictionary

 

Returns :

TRUE if the value was set or replaced successfully, FALSE otherwise.

key

key which needs to be removed from the dictionary.

[transfer none]
+
+

Returns

+

TRUE if successful, FALSE otherwise.

+

+
+
-

gsignond_dictionary_to_variant ()

-
GVariant *          gsignond_dictionary_to_variant      (GSignondDictionary *dict);
-

-Converts the GSignondDictionary to a GVariant. The result can be serialized -or put into another GSignondDictionary using gsignond_dictionary_set(). -

-
-+

gsignond_dictionary_contains ()

+
gboolean
+gsignond_dictionary_contains (GSignondDictionary *dict,
+                              const gchar *key);
+

Checks if the dict + contains key +.

+
+

Parameters

+
+++++ - - + + + - - + + +

dict :

instance of GSignondDictionary -

dict

instance of GSignondDictionary

 

Returns :

-GVariant object if successful, NULL otherwise. [transfer full] -

key

key to check.

[transfer none]
-
-
-

gsignond_dictionary_unref ()

-
void                gsignond_dictionary_unref           (GSignondDictionary *dict);
-

-Decrements the reference count of the dictionary structure. If the reference -count reaches zero, the structure is deallocated and shouldn't be used. -

-
-- - - - -

dict :

instance of GSignondDictionary -
+
+

Returns

+

TRUE if found, FALSE otherwise.

+

+
+
+

Types and Values

+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-GSignondPlugin.html b/docs/html/gsignond-GSignondPlugin.html deleted file mode 100644 index d77d3f1..0000000 --- a/docs/html/gsignond-GSignondPlugin.html +++ /dev/null @@ -1,694 +0,0 @@ - - - - -GSignondPlugin - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSignondPlugin

-

GSignondPlugin — an interface for implementing authentication plugins

-
-
-

Synopsis

-
-#include <gsignond/gsignond-plugin-interface.h>
-
-struct              GSignondPluginInterface;
-enum                GSignondPluginState;
-void                gsignond_plugin_cancel              (GSignondPlugin *self);
-void                gsignond_plugin_error               (GSignondPlugin *self,
-                                                         GError *error);
-void                gsignond_plugin_refresh             (GSignondPlugin *self,
-                                                         GSignondSignonuiData *ui_data);
-void                gsignond_plugin_refreshed           (GSignondPlugin *self,
-                                                         GSignondSignonuiData *ui_data);
-void                gsignond_plugin_request             (GSignondPlugin *self,
-                                                         GSignondSessionData *session_data);
-void                gsignond_plugin_request_initial     (GSignondPlugin *self,
-                                                         GSignondSessionData *session_data,
-                                                         GSignondDictionary *identity_method_cache,
-                                                         const gchar *mechanism);
-void                gsignond_plugin_response            (GSignondPlugin *self,
-                                                         GSignondSessionData *session_data);
-void                gsignond_plugin_response_final      (GSignondPlugin *self,
-                                                         GSignondSessionData *session_data);
-void                gsignond_plugin_status_changed      (GSignondPlugin *self,
-                                                         GSignondPluginState state,
-                                                         const gchar *message);
-void                gsignond_plugin_store               (GSignondPlugin *self,
-                                                         GSignondDictionary *identity_method_cache);
-void                gsignond_plugin_user_action_finished
-                                                        (GSignondPlugin *self,
-                                                         GSignondSignonuiData *ui_data);
-void                gsignond_plugin_user_action_required
-                                                        (GSignondPlugin *self,
-                                                         GSignondSignonuiData *ui_data);
-
-
-
-

Description

-

-GSignondPlugin is an interface for implementing authentication plugins. -

-

-When creating a plugin, write the GObject boilerplate code as usual, but -

-

-a) declare the type as follows: -

-

-

-
- - - - - - - -
1
-2
-3
-4
G_DEFINE_TYPE_WITH_CODE (GSignondPasswordPlugin, gsignond_password_plugin,
-                        G_TYPE_OBJECT,
-                        G_IMPLEMENT_INTERFACE (GSIGNOND_TYPE_PLUGIN,
-                                               gsignond_plugin_interface_init));
-
- -

-

-

-b) implement gsignond_plugin_interface_init as follows: -

-

-

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
static void
-gsignond_plugin_interface_init (GSignondPluginInterface *iface)
-{
-    iface->cancel = gsignond_password_plugin_cancel;
-    iface->request_initial = gsignond_password_plugin_request_initial;
-    iface->request = gsignond_password_plugin_request;
-    iface->user_action_finished = gsignond_password_plugin_user_action_finished;
-    iface->refresh = gsignond_password_plugin_refresh;
-}
-
- -

-

-

-where the gsignond_password_plugin_cancel etc. are specific implementations of -plugin interface methods that every plugin must provide (see below for when -and how they're used by the daemon). -

-

-c) override "type" and "mechanisms" property -implementations in the plugin class constructor like this: -

-

-

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
static void
-gsignond_password_plugin_class_init (GSignondPasswordPluginClass *klass)
-{
-    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
-    gobject_class->set_property = gsignond_password_plugin_set_property;
-    gobject_class->get_property = gsignond_password_plugin_get_property;
-
-    g_object_class_override_property (gobject_class, PROP_TYPE, "type");
-    g_object_class_override_property (gobject_class, PROP_MECHANISMS,
-                                      "mechanisms");
-}
-
- -

-(naturally, plugin's property setter should ignore attempts to set these properties, -and plugin's property getter should provide their values when asked) -

-

-

-
-

The plugin API

-
-

-

-

-Plugins implement authentication sessions which are controlled through the -plugin API. Authentication sessions follow one another so there is only one active -session at a time. -

-

-The plugin API is a set of methods and signals that should be used in a specific -sequence: -

-

-

-
    -
  • successful authentication session begins with gsignond_plugin_request_initial() and ends -with the plugin issuing a "response-final" signal

  • -
  • at any point the application can cancel an active session with -gsignond_plugin_cancel()

  • -
  • at any point the plugin can cancel an active session by issuing "error" -signal, which also provides some details about the cancellation reason.

  • -
  • if a session is active, and the plugin has an intermediate response or needs -additional information, it issues "response" signal, which the -application should respond to with gsignond_plugin_request() method. This can -happen more than once.

  • -
  • if the plugin needs to launch UI interaction with the user, it's issuing -"user-action-required" signal, which the application should -follow up with gsignond_plugin_user_action_finished() method. This can happen -more than once as well.

  • -
  • if, during an active UI session, the application needs a UI refresh -(for example, to fetch a new captcha image), it's -requested from the plugin with gsignond_plugin_refresh() method, followed -by the plugin's response via "refreshed" signal. This can happen -more than once.

  • -
  • changes in plugin state are reported through "status-changed" signal.

  • -
  • if the plugin needs to store information in persistent storage, it issues -"store" signal. Later, that same information is provided as a -parameter to gsignond_plugin_request_initial().

  • -
-

-

-

-

-
-

Example plugins

-
-

-

-

-See example plugin implementation here: - -https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fplugins. -

-

-For examples of out of tree plugins, you can have a look at SASL or OAuth plugin -implementations: - -http://code.google.com/p/accounts-sso/source/browse?repo=gsignond-plugin-sasl. -

-

- -http://code.google.com/p/accounts-sso/source/browse?repo=gsignond-plugin-oa. -

-
-
-

Details

-
-

struct GSignondPluginInterface

-
struct GSignondPluginInterface {
-    GTypeInterface parent;
-
-    void (*cancel) (GSignondPlugin *self);
-    void (*request_initial) (GSignondPlugin *self, 
-                     GSignondSessionData *session_data,
-                     GSignondDictionary *identity_method_cache, 
-                     const gchar *mechanism);
-    void (*request) (GSignondPlugin *self, 
-                     GSignondSessionData *session_data);
-    void (*user_action_finished) (GSignondPlugin *self, 
-                                  GSignondSignonuiData *session_data);
-    void (*refresh) (GSignondPlugin *self, 
-                     GSignondSignonuiData *session_data);
-};
-
-

-GSignondPluginInterface interface containing pointers to methods that all -plugin implementations should provide. -

-
-- - - - - - - - - - - - - - - - - - - - - - - - - - -

GTypeInterface parent;

parent interface type.

cancel ()

implementation of gsignond_plugin_cancel() -

request_initial ()

implementation of gsignond_plugin_request_initial() -

request ()

implementation of gsignond_plugin_request() -

user_action_finished ()

implementation of gsignond_plugin_user_action_finished() -

refresh ()

implementation of gsignond_plugin_refresh() -
-
-
-
-

enum GSignondPluginState

-
typedef enum {
-    GSIGNOND_PLUGIN_STATE_NONE = 0,
-    GSIGNOND_PLUGIN_STATE_RESOLVING,
-    GSIGNOND_PLUGIN_STATE_CONNECTING,
-    GSIGNOND_PLUGIN_STATE_SENDING_DATA,
-    GSIGNOND_PLUGIN_STATE_WAITING,
-    GSIGNOND_PLUGIN_STATE_USER_PENDING,
-    GSIGNOND_PLUGIN_STATE_REFRESHING,
-    GSIGNOND_PLUGIN_STATE_PROCESS_PENDING,
-    GSIGNOND_PLUGIN_STATE_STARTED,
-    GSIGNOND_PLUGIN_STATE_CANCELING,
-    GSIGNOND_PLUGIN_STATE_DONE,
-    GSIGNOND_PLUGIN_STATE_HOLDING,
-} GSignondPluginState;
-
-

-The plugin provides state updates by emitting "status-changed" -signal with this enum and a string describing what happened. -

-
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GSIGNOND_PLUGIN_STATE_NONE

State unknown -

GSIGNOND_PLUGIN_STATE_RESOLVING

Resolving remote server host name -

GSIGNOND_PLUGIN_STATE_CONNECTING

Connecting to remote server -

GSIGNOND_PLUGIN_STATE_SENDING_DATA

Sending data to remote server -

GSIGNOND_PLUGIN_STATE_WAITING

Waiting for reply from remote server -

GSIGNOND_PLUGIN_STATE_USER_PENDING

Waiting for response from user -

GSIGNOND_PLUGIN_STATE_REFRESHING

Refreshing ui request -

GSIGNOND_PLUGIN_STATE_PROCESS_PENDING

Request has been queued -

GSIGNOND_PLUGIN_STATE_STARTED

Request has been dequeued -

GSIGNOND_PLUGIN_STATE_CANCELING

Canceling current process -

GSIGNOND_PLUGIN_STATE_DONE

Process is finished -

GSIGNOND_PLUGIN_STATE_HOLDING

Holding long non-expired token -
-
-
-
-

gsignond_plugin_cancel ()

-
void                gsignond_plugin_cancel              (GSignondPlugin *self);
-

-This method cancels an ongoing authentication session. The plugin implementations -should issue a "error" signal with GSIGNOND_ERROR_SESSION_CANCELED -error, and prepare for a new authentication session. -

-
-- - - - -

self :

plugin instance
-
-
-
-

gsignond_plugin_error ()

-
void                gsignond_plugin_error               (GSignondPlugin *self,
-                                                         GError *error);
-

-Plugin implementations should use this to issue "error" -signal. This method should not be used otherwise. -

-
-- - - - - - - - - - -

self :

plugin instance

error :

the error
-
-
-
-

gsignond_plugin_refresh ()

-
void                gsignond_plugin_refresh             (GSignondPlugin *self,
-                                                         GSignondSignonuiData *ui_data);
-

-This method asks the plugin to refresh the UI. The plugin responds with -"refreshed" signal. -

-
-- - - - - - - - - - -

self :

plugin instance

ui_data :

UI refresh parameters
-
-
-
-

gsignond_plugin_refreshed ()

-
void                gsignond_plugin_refreshed           (GSignondPlugin *self,
-                                                         GSignondSignonuiData *ui_data);
-

-Plugin implementations should use this to issue "refreshed" -signal. This method should not be used otherwise. -

-
-- - - - - - - - - - -

self :

plugin instance

ui_data :

UI data
-
-
-
-

gsignond_plugin_request ()

-
void                gsignond_plugin_request             (GSignondPlugin *self,
-                                                         GSignondSessionData *session_data);
-

-This method provides the plugin with additional parameters for the session -after the plugin has asked for it via "response" signal. -

-
-- - - - - - - - - - -

self :

plugin instance

session_data :

additional parameters for the session
-
-
-
-

gsignond_plugin_request_initial ()

-
void                gsignond_plugin_request_initial     (GSignondPlugin *self,
-                                                         GSignondSessionData *session_data,
-                                                         GSignondDictionary *identity_method_cache,
-                                                         const gchar *mechanism);
-

-This method starts a new authentication session. -

-
-- - - - - - - - - - - - - - - - - - -

self :

plugin instance

session_data :

parameters for the session

identity_method_cache :

data from persistent storage, saved previously via -"store" signal

mechanism :

mechanism to use for the authentication
-
-
-
-

gsignond_plugin_response ()

-
void                gsignond_plugin_response            (GSignondPlugin *self,
-                                                         GSignondSessionData *session_data);
-

-Plugin implementations should use this to issue "response" -signal. This method should not be used otherwise. -

-
-- - - - - - - - - - -

self :

plugin instance

session_data :

session data
-
-
-
-

gsignond_plugin_response_final ()

-
void                gsignond_plugin_response_final      (GSignondPlugin *self,
-                                                         GSignondSessionData *session_data);
-

-Plugin implementations should use this to issue "response-final" -signal. This method should not be used otherwise. -

-
-- - - - - - - - - - -

self :

plugin instance

session_data :

session data
-
-
-
-

gsignond_plugin_status_changed ()

-
void                gsignond_plugin_status_changed      (GSignondPlugin *self,
-                                                         GSignondPluginState state,
-                                                         const gchar *message);
-

-Plugin implementations should use this to issue "status-changed" -signal. This method should not be used otherwise. -

-
-- - - - - - - - - - - - - - -

self :

plugin instance

state :

the new state

message :

the message
-
-
-
-

gsignond_plugin_store ()

-
void                gsignond_plugin_store               (GSignondPlugin *self,
-                                                         GSignondDictionary *identity_method_cache);
-

-Plugin implementations should use this to issue "store" -signal. This method should not be used otherwise. -

-
-- - - - - - - - - - -

self :

plugin instance

identity_method_cache :

data to store
-
-
-
-

gsignond_plugin_user_action_finished ()

-
void                gsignond_plugin_user_action_finished
-                                                        (GSignondPlugin *self,
-                                                         GSignondSignonuiData *ui_data);
-

-This method provides the plugin with the results of UI interaction -after the plugin has asked for it via "user-action-required" signal. -

-
-- - - - - - - - - - -

self :

plugin instance

ui_data :

results of UI interaction
-
-
-
-

gsignond_plugin_user_action_required ()

-
void                gsignond_plugin_user_action_required
-                                                        (GSignondPlugin *self,
-                                                         GSignondSignonuiData *ui_data);
-

-Plugin implementations should use this to issue "user-action-required" -signal. This method should not be used otherwise. -

-
-- - - - - - - - - - -

self :

plugin instance

ui_data :

UI data
-
-
-
- - - \ No newline at end of file diff --git a/docs/html/gsignond-GSignondSecurityContext.html b/docs/html/gsignond-GSignondSecurityContext.html index 3fffcef..da94409 100644 --- a/docs/html/gsignond-GSignondSecurityContext.html +++ b/docs/html/gsignond-GSignondSecurityContext.html @@ -2,24 +2,24 @@ -GSignondSecurityContext - +gsignond API Reference Manual: GSignondSecurityContext + - + - + - - + @@ -30,521 +30,741 @@

GSignondSecurityContext

GSignondSecurityContext — security context descriptor used in access control checks

- + -
-

Synopsis

-
-#include <gsignond/gsignond-security-context.h>
-
-                    GSignondSecurityContext;
-typedef             GSignondSecurityContextList;
-gboolean            gsignond_security_context_check     (const GSignondSecurityContext *reference,
-                                                         const GSignondSecurityContext *test);
-int                 gsignond_security_context_compare   (const GSignondSecurityContext *ctx1,
-                                                         const GSignondSecurityContext *ctx2);
-GSignondSecurityContext * gsignond_security_context_copy
-                                                        (const GSignondSecurityContext *src_ctx);
-void                gsignond_security_context_free      (GSignondSecurityContext *ctx);
-GSignondSecurityContext * gsignond_security_context_from_variant
-                                                        (GVariant *variant);
-const gchar *       gsignond_security_context_get_application_context
-                                                        (const GSignondSecurityContext *ctx);
-const gchar *       gsignond_security_context_get_system_context
-                                                        (const GSignondSecurityContext *ctx);
-GSignondSecurityContextList * gsignond_security_context_list_copy
-                                                        (const GSignondSecurityContextList *src_list);
-void                gsignond_security_context_list_free (GSignondSecurityContextList *seclist);
-GSignondSecurityContextList * gsignond_security_context_list_from_variant
-                                                        (GVariant *variant);
-GVariant *          gsignond_security_context_list_to_variant
-                                                        (const GSignondSecurityContextList *list);
-gboolean            gsignond_security_context_match     (const GSignondSecurityContext *ctx1,
-                                                         const GSignondSecurityContext *ctx2);
-GSignondSecurityContext * gsignond_security_context_new ();
-GSignondSecurityContext * gsignond_security_context_new_from_values
-                                                        (const gchar *system_context,
-                                                         const gchar *application_context);
-void                gsignond_security_context_set_application_context
-                                                        (GSignondSecurityContext *ctx,
-                                                         const gchar *application_context);
-void                gsignond_security_context_set_system_context
-                                                        (GSignondSecurityContext *ctx,
-                                                         const gchar *system_context);
-GVariant *          gsignond_security_context_to_variant
-                                                        (const GSignondSecurityContext *ctx);
-
-
-

Description

-

-Security context is a string tuple of system context and application context. -

-

-System context can be a binary path, SMACK-label, or MSSF token. -

-

-Application context identifies a script or a webpage within an application, -and it's used for providing access control to runtime environments (when making an access -control decision requires not only a binary identifier, but also information -about what the binary is doing). -

-

-When an application is trying to access the gSSO service, the system context -is determined by a specific GSignondAccessControlManager instance using -system services of a specific platform. Application context is set by the -application itself. Then both contexts are used by GSignondAccessControlManager -to perform an access control check. -

-
-
-

Details

-
-

GSignondSecurityContext

-
typedef struct {
-    gchar *sys_ctx;
-    gchar *app_ctx;
-} GSignondSecurityContext;
-
-

-Security context descriptor used for access control checks. System context -and application context can contain a wildcard match "*" which has special -meaning in gsignond_security_context_match() and -gsignond_security_context_check(). -

-
-+

Functions

+
++++ - - + + - - + + - -

gchar *sys_ctx;

system context +GSignondSecurityContext * + +gsignond_security_context_new () +

gchar *app_ctx;

application context +GSignondSecurityContext * + +gsignond_security_context_new_from_values () +
-
-
-
-

GSignondSecurityContextList

-
typedef GList GSignondSecurityContextList;
-
-

-GList of GSignondSecurityContext items. -

-
-
-
-

gsignond_security_context_check ()

-
gboolean            gsignond_security_context_check     (const GSignondSecurityContext *reference,
-                                                         const GSignondSecurityContext *test);
-

-Check if test is covered by reference. -

-
-- - - + + - - + + - - + + - -

reference :

reference security context item to check against. +void + +gsignond_security_context_free () +

test :

security context item to be checked. +GSignondSecurityContext * + +gsignond_security_context_copy () +

Returns :

TRUE if contexts are equal or the reference has a wildcard -system context, or if system contexts are equal and reference has a wildcard -application context, otherwise FALSE. If either or both contexts are NULL, -FALSE is returned. +void + +gsignond_security_context_set_system_context () +
-
-
-
-

gsignond_security_context_compare ()

-
int                 gsignond_security_context_compare   (const GSignondSecurityContext *ctx1,
-                                                         const GSignondSecurityContext *ctx2);
-

-Compare two GSignondSecurityContext items in a similar way to strcmp(). -

-
-- - - + + - - + + - - + + - -

ctx1 :

first item to compare.const gchar * + +gsignond_security_context_get_system_context () +

ctx2 :

second item to compare. +void + +gsignond_security_context_set_application_context () +

Returns :

negative if ctx1 < ctx2, 0 if ctx1 == ctx2 and positive if ctx1 > ctx2.const gchar * + +gsignond_security_context_get_application_context () +
-
-
-
-

gsignond_security_context_copy ()

-
GSignondSecurityContext * gsignond_security_context_copy
-                                                        (const GSignondSecurityContext *src_ctx);
-

-Copies a security context item. -

-
-- - - + + - - + - -

src_ctx :

source security context to copy. +GVariant * + +gsignond_security_context_to_variant () +

Returns :

a copy of the GSignondSecurityContext item. [transfer full] + +GSignondSecurityContext * + +gsignond_security_context_from_variant ()
-
-
-
-

gsignond_security_context_free ()

-
void                gsignond_security_context_free      (GSignondSecurityContext *ctx);
-

-Frees a security context item. -

-
-- - - - -

ctx :

-GSignondSecurityContext to be freed.
-
-
-
-

gsignond_security_context_from_variant ()

-
GSignondSecurityContext * gsignond_security_context_from_variant
-                                                        (GVariant *variant);
-

-Builds a GSignondSecurityContext item from a GVariant of type "(ss)". -

-
-- - - + + - - + - -

variant :

GVariant item with a GSignondSecurityContext construct. +int + +gsignond_security_context_compare () +

Returns :

-GSignondSecurityContext item. [transfer full] + +gboolean + +gsignond_security_context_match ()
-
-
-
-

gsignond_security_context_get_application_context ()

-
const gchar *       gsignond_security_context_get_application_context
-                                                        (const GSignondSecurityContext *ctx);
-

-Get the application context part of -the GSignondSecurityContext. -

-
-- - - + + - - + + + + + + + + + + + + +

ctx :

-GSignondSecurityContext item. +gboolean + +gsignond_security_context_check () +

Returns :

application context. [transfer none] + +GVariant * + +gsignond_security_context_list_to_variant () +
+GSignondSecurityContextList * + +gsignond_security_context_list_from_variant () +
+GSignondSecurityContextList * + +gsignond_security_context_list_copy () +
+void + +gsignond_security_context_list_free ()
-
-
-

gsignond_security_context_get_system_context ()

-
const gchar *       gsignond_security_context_get_system_context
-                                                        (const GSignondSecurityContext *ctx);
-

-Get the system context partof the -GSignondSecurityContext. -

-
-+
+

Types and Values

+
++++ - - + + - - + +

ctx :

-GSignondSecurityContext item. GSignondSecurityContext

Returns :

system context. [transfer none] -typedefGSignondSecurityContextList
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-security-context.h>
+
+
+
+

Description

+

Security context is a string tuple of system context and application context.

+

System context can be a binary path, SMACK-label, or MSSF token.

+

Application context identifies a script or a webpage within an application, +and it's used for providing access control to runtime environments (when making an access +control decision requires not only a binary identifier, but also information +about what the binary is doing).

+

When an application is trying to access the gSSO service, the system context +is determined by a specific GSignondAccessControlManager instance using +system services of a specific platform. Application context is set by the +application itself. Then both contexts are used by GSignondAccessControlManager +to perform an access control check.

+
+
+

Functions

+
+

gsignond_security_context_new ()

+
GSignondSecurityContext *
+gsignond_security_context_new ();
+

Allocates a new security context item. System and app context are empty strings.

+
+

Returns

+

allocated GSignondSecurityContext.

+

[transfer full]

+
+

-

gsignond_security_context_list_copy ()

-
GSignondSecurityContextList * gsignond_security_context_list_copy
-                                                        (const GSignondSecurityContextList *src_list);
-

-Copies a GList of GSignondSecurityContext items. -

-
-+

gsignond_security_context_new_from_values ()

+
GSignondSecurityContext *
+gsignond_security_context_new_from_values
+                               (const gchar *system_context,
+                                const gchar *application_context);
+

Allocates and initializes a new security context item.

+
+

Parameters

+
+++++ - - + + + - - + + +

src_list :

source GSignondSecurityContextList.

system_context

system security context

 

Returns :

-GSignondSecurityContextList item. [transfer full] -

application_context

application security context

 
+
+

Returns

+

allocated GSignondSecurityContext.

+

[transfer full]

+
+

-

gsignond_security_context_list_free ()

-
void                gsignond_security_context_list_free (GSignondSecurityContextList *seclist);
-

-Frees all items and the GList of GSignondSecurityContext. -

-
-+

gsignond_security_context_free ()

+
void
+gsignond_security_context_free (GSignondSecurityContext *ctx);
+

Frees a security context item.

+
+

Parameters

+
+++++ - - + + +

seclist :

-GSignondSecurityContextList item. [transfer full] -

ctx

GSignondSecurityContext to be freed.

 
+

-

gsignond_security_context_list_from_variant ()

-
GSignondSecurityContextList * gsignond_security_context_list_from_variant
-                                                        (GVariant *variant);
-

-Builds a GList of GSignondSecurityContext items from a GVariant of type -"a(ss)". -

-
-- - - - - - - - - - +

gsignond_security_context_copy ()

+
GSignondSecurityContext *
+gsignond_security_context_copy (const GSignondSecurityContext *src_ctx);
+

Copies a security context item.

+
+

Parameters

+

variant :

GVariant item with a list of security context tuples.

Returns :

-GSignondSecurityContextList item. [transfer full] -
+++++ + + + + +

src_ctx

source security context to copy.

 
+
+

Returns

+

a copy of the GSignondSecurityContext item.

+

[transfer full]

+
+
-

gsignond_security_context_list_to_variant ()

-
GVariant *          gsignond_security_context_list_to_variant
-                                                        (const GSignondSecurityContextList *list);
-

-Builds a GVariant of type "a(ss)" from a GList of GSignondSecurityContext -items. -

-
-+

gsignond_security_context_set_system_context ()

+
void
+gsignond_security_context_set_system_context
+                               (GSignondSecurityContext *ctx,
+                                const gchar *system_context);
+

Sets the system context part of the +GSignondSecurityContext.

+
+

Parameters

+
+++++ - - + + + - - + + +

list :

-GSignondSecurityContextList item.

ctx

GSignondSecurityContext item.

 

Returns :

GVariant construct of a GSignondSecurityContextList. [transfer full] -

system_context

system security context.

 
+
-

gsignond_security_context_match ()

-
gboolean            gsignond_security_context_match     (const GSignondSecurityContext *ctx1,
-                                                         const GSignondSecurityContext *ctx2);
-

-Compare two GSignondSecurityContext items match. -

-
-+

gsignond_security_context_get_system_context ()

+
const gchar *
+gsignond_security_context_get_system_context
+                               (const GSignondSecurityContext *ctx);
+

Get the system context partof the +GSignondSecurityContext.

+
+

Parameters

+
+++++ + + + + + +

ctx

GSignondSecurityContext item.

 
+
+
+

Returns

+

system context.

+

[transfer none]

+
+ +
+
+

gsignond_security_context_set_application_context ()

+
void
+gsignond_security_context_set_application_context
+                               (GSignondSecurityContext *ctx,
+                                const gchar *application_context);
+

Sets the application context part of +the GSignondSecurityContext.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

ctx1 :

first item to compare.

ctx

GSignondSecurityContext item.

 

ctx2 :

second item to compare.

Returns :

TRUE if contexts are equal or if either side has a wildcard match for -system context, or if system contexts are equal and either side has a wildcard -match for the app context, -otherwise FALSE. Two NULL contexts match.

application_context

application security context.

 
+

-

gsignond_security_context_new ()

-
GSignondSecurityContext * gsignond_security_context_new ();
-

-Allocates a new security context item. System and app context are empty strings. -

-
-+

gsignond_security_context_get_application_context ()

+
const gchar *
+gsignond_security_context_get_application_context
+                               (const GSignondSecurityContext *ctx);
+

Get the application context part of +the GSignondSecurityContext.

+
+

Parameters

+
+++++ - - + + + + +

Returns :

allocated GSignondSecurityContext. [transfer full] -

ctx

GSignondSecurityContext item.

 
+
+
+

Returns

+

application context.

+

[transfer none]

+
+ +
+
+

gsignond_security_context_to_variant ()

+
GVariant *
+gsignond_security_context_to_variant (const GSignondSecurityContext *ctx);
+

Build a GVariant of type "(ss)" from a GSignondSecurityContext item.

+
+

Parameters

+
+++++ + + + + + +

ctx

GSignondSecurityContext item.

 
+
+
+

Returns

+

GVariant construct of a GSignondSecurityContext.

+

[transfer full]

+
+
+
+
+

gsignond_security_context_from_variant ()

+
GSignondSecurityContext *
+gsignond_security_context_from_variant
+                               (GVariant *variant);
+

Builds a GSignondSecurityContext item from a GVariant of type "(ss)".

+
+

Parameters

+
+++++ + + + +

variant

GVariant item with a GSignondSecurityContext construct.

 
+
+

Returns

+

GSignondSecurityContext item.

+

[transfer full]

+
+

-

gsignond_security_context_new_from_values ()

-
GSignondSecurityContext * gsignond_security_context_new_from_values
-                                                        (const gchar *system_context,
-                                                         const gchar *application_context);
-

-Allocates and initializes a new security context item. -

-
-+

gsignond_security_context_compare ()

+
int
+gsignond_security_context_compare (const GSignondSecurityContext *ctx1,
+                                   const GSignondSecurityContext *ctx2);
+

Compare two GSignondSecurityContext items in a similar way to strcmp().

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

system_context :

system security context

application_context :

application security context

ctx1

first item to compare.

 

Returns :

allocated GSignondSecurityContext. [transfer full] -

ctx2

second item to compare.

 
+
+

Returns

+

negative if ctx1 < ctx2, 0 if ctx1 == ctx2 and positive if ctx1 > ctx2.

+

+
+
-

gsignond_security_context_set_application_context ()

-
void                gsignond_security_context_set_application_context
-                                                        (GSignondSecurityContext *ctx,
-                                                         const gchar *application_context);
-

-Sets the application context part of -the GSignondSecurityContext. -

-
-+

gsignond_security_context_match ()

+
gboolean
+gsignond_security_context_match (const GSignondSecurityContext *ctx1,
+                                 const GSignondSecurityContext *ctx2);
+

Compare two GSignondSecurityContext items match.

+
+

Parameters

+
+++++ - - + + + - - + + +

ctx :

-GSignondSecurityContext item.

ctx1

first item to compare.

 

application_context :

application security context.

ctx2

second item to compare.

 
+
+

Returns

+

TRUE if contexts are equal or if either side has a wildcard match for +system context, or if system contexts are equal and either side has a wildcard +match for the app context, +otherwise FALSE. Two NULL contexts match.

+

+
+
-

gsignond_security_context_set_system_context ()

-
void                gsignond_security_context_set_system_context
-                                                        (GSignondSecurityContext *ctx,
-                                                         const gchar *system_context);
-

-Sets the system context part of the -GSignondSecurityContext. -

-
-+

gsignond_security_context_check ()

+
gboolean
+gsignond_security_context_check (const GSignondSecurityContext *reference,
+                                 const GSignondSecurityContext *test);
+

Check if test + is covered by reference +.

+
+

Parameters

+
+++++ - - + + + - - + + +

ctx :

-GSignondSecurityContext item.

reference

reference security context item to check against.

 

system_context :

system security context.

test

security context item to be checked.

 
+
+

Returns

+

TRUE if contexts are equal or the reference +has a wildcard +system context, or if system contexts are equal and reference +has a wildcard +application context, otherwise FALSE. If either or both contexts are NULL, +FALSE is returned.

+

+
+
-

gsignond_security_context_to_variant ()

-
GVariant *          gsignond_security_context_to_variant
-                                                        (const GSignondSecurityContext *ctx);
-

-Build a GVariant of type "(ss)" from a GSignondSecurityContext item. -

-
-+

gsignond_security_context_list_to_variant ()

+
GVariant *
+gsignond_security_context_list_to_variant
+                               (const GSignondSecurityContextList *list);
+

Builds a GVariant of type "a(ss)" from a GList of GSignondSecurityContext +items.

+
+

Parameters

+
+++++ + + + + + +

list

GSignondSecurityContextList item.

 
+
+
+

Returns

+

GVariant construct of a GSignondSecurityContextList.

+

[transfer full]

+
+ +
+
+

gsignond_security_context_list_from_variant ()

+
GSignondSecurityContextList *
+gsignond_security_context_list_from_variant
+                               (GVariant *variant);
+

Builds a GList of GSignondSecurityContext items from a GVariant of type +"a(ss)".

+
+

Parameters

+
+++++ + + + + + +

variant

GVariant item with a list of security context tuples.

 
+
+
+

Returns

+

GSignondSecurityContextList item.

+

[transfer full]

+
+
+
+
+

gsignond_security_context_list_copy ()

+
GSignondSecurityContextList *
+gsignond_security_context_list_copy (const GSignondSecurityContextList *src_list);
+

Copies a GList of GSignondSecurityContext items.

+
+

Parameters

+
+++++ + + + + + +

src_list

source GSignondSecurityContextList.

 
+
+
+

Returns

+

GSignondSecurityContextList item.

+

[transfer full]

+
+
+
+
+

gsignond_security_context_list_free ()

+
void
+gsignond_security_context_list_free (GSignondSecurityContextList *seclist);
+

Frees all items and the GList of GSignondSecurityContext.

+
+

Parameters

+
+++++ + + + + + +

seclist

GSignondSecurityContextList item.

[transfer full]
+
+
+ +
+

Types and Values

+
+

GSignondSecurityContext

+
typedef struct {
+    gchar *sys_ctx;
+    gchar *app_ctx;
+} GSignondSecurityContext;
+
+

Security context descriptor used for access control checks. System context +and application context can contain a wildcard match "*" which has special +meaning in gsignond_security_context_match() and +gsignond_security_context_check().

+
+

Members

+
+++++ - - + + + - - + + +

ctx :

-GSignondSecurityContext item.

gchar *sys_ctx;

system context

 

Returns :

GVariant construct of a GSignondSecurityContext. [transfer full] -

gchar *app_ctx;

application context

 
+
+
+

GSignondSecurityContextList

+
typedef GList GSignondSecurityContextList;
+
+

GList of GSignondSecurityContext items.

+
+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-GSignondSessionData.html b/docs/html/gsignond-GSignondSessionData.html index 5682ef3..82fb393 100644 --- a/docs/html/gsignond-GSignondSessionData.html +++ b/docs/html/gsignond-GSignondSessionData.html @@ -2,24 +2,24 @@ -GSignondSessionData - +gsignond API Reference Manual: GSignondSessionData + - + - + - - + @@ -30,553 +30,889 @@

GSignondSessionData

GSignondSessionData — definitions for authentication session parameters

- + -
-

Synopsis

-
-#include <gsignond/gsignond-session-data.h>
-
-typedef             GSignondSessionData;
-enum                GSignondUiPolicy;
-const gchar *       gsignond_session_data_get_caption   (GSignondSessionData *data);
-const gchar *       gsignond_session_data_get_network_proxy
-                                                        (GSignondSessionData *data);
-gboolean            gsignond_session_data_get_network_timeout
-                                                        (GSignondSessionData *data,
-                                                         guint32 *network_timeout);
-const gchar *       gsignond_session_data_get_realm     (GSignondSessionData *data);
-gboolean            gsignond_session_data_get_renew_token
-                                                        (GSignondSessionData *data,
-                                                         gboolean *renew_token);
-const gchar *       gsignond_session_data_get_secret    (GSignondSessionData *data);
-gboolean            gsignond_session_data_get_ui_policy (GSignondSessionData *data,
-                                                         GSignondUiPolicy *ui_policy);
-const gchar *       gsignond_session_data_get_username  (GSignondSessionData *data);
-gboolean            gsignond_session_data_get_window_id (GSignondSessionData *data,
-                                                         guint32 *window_id);
-void                gsignond_session_data_set_caption   (GSignondSessionData *data,
-                                                         const gchar *caption);
-void                gsignond_session_data_set_network_proxy
-                                                        (GSignondSessionData *data,
-                                                         const gchar *network_proxy);
-void                gsignond_session_data_set_network_timeout
-                                                        (GSignondSessionData *data,
-                                                         guint32 network_timeout);
-void                gsignond_session_data_set_realm     (GSignondSessionData *data,
-                                                         const gchar *realm);
-void                gsignond_session_data_set_renew_token
-                                                        (GSignondSessionData *data,
-                                                         gboolean renew_token);
-void                gsignond_session_data_set_secret    (GSignondSessionData *data,
-                                                         const gchar *secret);
-void                gsignond_session_data_set_ui_policy (GSignondSessionData *data,
-                                                         GSignondUiPolicy ui_policy);
-void                gsignond_session_data_set_username  (GSignondSessionData *data,
-                                                         const gchar *username);
-void                gsignond_session_data_set_window_id (GSignondSessionData *data,
-                                                         guint32 window_id);
-
-
-
-

Description

-

-This file provides commonly used parameters for authentication sessions. -For each of those a getter and setter is defined, on GSignondSessionData -container. The plugins may not use all of these parameters, and they commonly -require additional, custom parameters which are set using GSignondDictionary -setters with explicit key string. -

-
-

Details

-
-

GSignondSessionData

-
typedef GSignondDictionary GSignondSessionData;
-
-

-GSignondSessionData is simply a typedef for GSignondDictionary, which -means the developers may also freely use methods associated with that structure, -in particular for creating a GSignondSessionData object with -gsignond_dictionary_new(). -

-
-
-
-

enum GSignondUiPolicy

-
typedef enum {
-    GSIGNOND_UI_POLICY_DEFAULT = 0,
-    GSIGNOND_UI_POLICY_REQUEST_PASSWORD,
-    GSIGNOND_UI_POLICY_NO_USER_INTERACTION,
-    GSIGNOND_UI_POLICY_VALIDATION
-} GSignondUiPolicy;
-
-

-Policy setting to define how plugins should handle interaction with the user. -

-
-+

Functions

+
++++ - - + - - + - - + - - + - -

GSIGNOND_UI_POLICY_DEFAULT

use a default user interaction scenario +const gchar * + +gsignond_session_data_get_username ()

GSIGNOND_UI_POLICY_REQUEST_PASSWORD

force an authorization request from the user; -any cached access tokens should be discarded by the plugin. + +void + +gsignond_session_data_set_username ()

GSIGNOND_UI_POLICY_NO_USER_INTERACTION

force no interaction with the user +const gchar * + +gsignond_session_data_get_secret ()

GSIGNOND_UI_POLICY_VALIDATION

interaction with the user is only allowed -for validation captchas and similar security measures + +void + +gsignond_session_data_set_secret ()
-
-
-
-

gsignond_session_data_get_caption ()

-
const gchar *       gsignond_session_data_get_caption   (GSignondSessionData *data);
-

-A getter for a caption associated with the authentication session. -Caption tells the user which application/credentials/provider is requestion -authentication. -

-
-- - - + + - - + + - -

data :

a GSignondDictionary structureconst gchar * + +gsignond_session_data_get_realm () +

Returns :

(transfer none) +void + +gsignond_session_data_set_realm () +
-
-
-
-

gsignond_session_data_get_network_proxy ()

-
const gchar *       gsignond_session_data_get_network_proxy
-                                                        (GSignondSessionData *data);
-

-A getter for a network proxy setting associated with the authentication session. -If this property is not set, the default system proxy settings should be used. -

-
-- - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - -

data :

a GSignondDictionary structure +GSequence * + +gsignond_session_data_get_allowed_realms () +

Returns :

(transfer none) +void + +gsignond_session_data_set_allowed_realms () +
const gchar * + +gsignond_session_data_get_caption () +
+void + +gsignond_session_data_set_caption () +
+gboolean + +gsignond_session_data_get_renew_token () +
+void + +gsignond_session_data_set_renew_token () +
+gboolean + +gsignond_session_data_get_ui_policy () +
+void + +gsignond_session_data_set_ui_policy () +
const gchar * + +gsignond_session_data_get_network_proxy () +
-
-
-
-

gsignond_session_data_get_network_timeout ()

-
gboolean            gsignond_session_data_get_network_timeout
-                                                        (GSignondSessionData *data,
-                                                         guint32 *network_timeout);
-

-A getter for a network timeout setting associated with the authentication session. -This can be used to change the default timeout in case of unresponsive servers. -

-
-- - - + + - - + + - - + + + + + + + + + +

data :

a GSignondDictionary structure +void + +gsignond_session_data_set_network_proxy () +

network_timeout :

the value for the parameter is written here +gboolean + +gsignond_session_data_get_network_timeout () +

Returns :

whether the key-value pair exists in the data dictionary or not. +void + +gsignond_session_data_set_network_timeout () +
+gboolean + +gsignond_session_data_get_window_id () +
+void + +gsignond_session_data_set_window_id () +
+
+

Types and Values

+
++++ + + + + +
enumGSignondUiPolicy
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-session-data.h>
+
+
+
+

Description

+

This file provides commonly used parameters for authentication sessions. +For each of those a getter and setter is defined, on GSignondSessionData +container. The plugins may not use all of these parameters, and they commonly +require additional, custom parameters which are set using GSignondDictionary +setters with explicit key string.

+
+
+

Functions

+
+

gsignond_session_data_get_username ()

+
const gchar *
+gsignond_session_data_get_username (GSignondSessionData *data);
+

A getter for a username associated with the authentication session.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+

-

gsignond_session_data_get_realm ()

-
const gchar *       gsignond_session_data_get_realm     (GSignondSessionData *data);
-

-A getter for a realm associated with the authentication session. -

-
-+

gsignond_session_data_set_username ()

+
void
+gsignond_session_data_set_username (GSignondSessionData *data,
+                                    const gchar *username);
+

A setter for a username associated with the authentication session.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

Returns :

(transfer none)

username

username to set

 
+

-

gsignond_session_data_get_renew_token ()

-
gboolean            gsignond_session_data_get_renew_token
-                                                        (GSignondSessionData *data,
-                                                         gboolean *renew_token);
-

-A getter for a renew token property associated with the authentication session. -This property tells the plugin to discard any cached tokens and start -the authentication process anew. -

-
-+

gsignond_session_data_get_secret ()

+
const gchar *
+gsignond_session_data_get_secret (GSignondSessionData *data);
+

A getter for a secret (e.g. a password) associated with the authentication session.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+
+
+
+

gsignond_session_data_set_secret ()

+
void
+gsignond_session_data_set_secret (GSignondSessionData *data,
+                                  const gchar *secret);
+

A setter for a secret (e.g. a password) associated with the authentication session.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

data :

a GSignondDictionary structure

renew_token :

the value for the parameter is written here

data

a GSignondDictionary structure

 

Returns :

whether the key-value pair exists in the data dictionary or not.

secret

a secret to set

 
+
+
+
+

gsignond_session_data_get_realm ()

+
const gchar *
+gsignond_session_data_get_realm (GSignondSessionData *data);
+

A getter for a realm associated with the authentication session.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+

-

gsignond_session_data_get_secret ()

-
const gchar *       gsignond_session_data_get_secret    (GSignondSessionData *data);
-

-A getter for a secret (e.g. a password) associated with the authentication session. -

-
-+

gsignond_session_data_set_realm ()

+
void
+gsignond_session_data_set_realm (GSignondSessionData *data,
+                                 const gchar *realm);
+

A setter for a realm associated with the authentication session.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

Returns :

(transfer none)

realm

a realm to set

 
+
-

gsignond_session_data_get_ui_policy ()

-
gboolean            gsignond_session_data_get_ui_policy (GSignondSessionData *data,
-                                                         GSignondUiPolicy *ui_policy);
-

-A getter for UI policy setting associated with the authentication session. -The UI policy indicates how the authentication plugin should interact with the user. -

-
-+

gsignond_session_data_get_allowed_realms ()

+
GSequence *
+gsignond_session_data_get_allowed_realms
+                               (GSignondSessionData *data);
+

A getter for a list of realms allowed for the identity use.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

GSequence of allowed realms.

+

[transfer full]

+
+ +
+
+

gsignond_session_data_set_allowed_realms ()

+
void
+gsignond_session_data_set_allowed_realms
+                               (GSignondSessionData *data,
+                                GSequence *realms);
+

A setter for a list of realms allowed for the identity use.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

data :

a GSignondDictionary structure

ui_policy :

the value for the parameter is written here

data

a GSignondDictionary structure

 

Returns :

whether the key-value pair exists in the data dictionary or not.

realms

a GSequence if allowed realms

 
+

-

gsignond_session_data_get_username ()

-
const gchar *       gsignond_session_data_get_username  (GSignondSessionData *data);
-

-A getter for a username associated with the authentication session. -

-
-+

gsignond_session_data_get_caption ()

+
const gchar *
+gsignond_session_data_get_caption (GSignondSessionData *data);
+

A getter for a caption associated with the authentication session. +Caption tells the user which application/credentials/provider is requestion +authentication.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_session_data_set_caption ()

+
void
+gsignond_session_data_set_caption (GSignondSessionData *data,
+                                   const gchar *caption);
+

A setter for a caption associated with the authentication session. +Caption tells the user which application/credentials/provider is requestion +authentication.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

Returns :

(transfer none)

caption

a caption to set

 
+

-

gsignond_session_data_get_window_id ()

-
gboolean            gsignond_session_data_get_window_id (GSignondSessionData *data,
-                                                         guint32 *window_id);
-

-A getter for a window id setting associated with the authentication session. -This can be used to embed the user interaction window produced by the authentication -session into an application window. -

-
-+

gsignond_session_data_get_renew_token ()

+
gboolean
+gsignond_session_data_get_renew_token (GSignondSessionData *data,
+                                       gboolean *renew_token);
+

A getter for a renew token property associated with the authentication session. +This property tells the plugin to discard any cached tokens and start +the authentication process anew.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

data :

a GSignondDictionary structure

window_id :

the value for the parameter is written here

data

a GSignondDictionary structure

 

Returns :

whether the key-value pair exists in the data dictionary or not.

renew_token

the value for the parameter is written here

 
+
+

Returns

+

whether the key-value pair exists in the data +dictionary or not.

+

+
+
-

gsignond_session_data_set_caption ()

-
void                gsignond_session_data_set_caption   (GSignondSessionData *data,
-                                                         const gchar *caption);
-

-A setter for a caption associated with the authentication session. -Caption tells the user which application/credentials/provider is requestion -authentication. -

-
-+

gsignond_session_data_set_renew_token ()

+
void
+gsignond_session_data_set_renew_token (GSignondSessionData *data,
+                                       gboolean renew_token);
+

A setter for a renew token property associated with the authentication session. +This property tells the plugin to discard any cached tokens and start +the authentication process anew.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

caption :

a caption to set

renew_token

whether to renew the token set

 
+
-

gsignond_session_data_set_network_proxy ()

-
void                gsignond_session_data_set_network_proxy
-                                                        (GSignondSessionData *data,
-                                                         const gchar *network_proxy);
-

-A setter for a network proxy setting associated with the authentication session. -If this property is not set, the default system proxy settings should be used. -

-
-+

gsignond_session_data_get_ui_policy ()

+
gboolean
+gsignond_session_data_get_ui_policy (GSignondSessionData *data,
+                                     GSignondUiPolicy *ui_policy);
+

A getter for UI policy setting associated with the authentication session. +The UI policy indicates how the authentication plugin should interact with the user.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

network_proxy :

network proxy to use

ui_policy

the value for the parameter is written here

 
+
+

Returns

+

whether the key-value pair exists in the data +dictionary or not.

+

+
+
-

gsignond_session_data_set_network_timeout ()

-
void                gsignond_session_data_set_network_timeout
-                                                        (GSignondSessionData *data,
-                                                         guint32 network_timeout);
-

-A setter for a network timeout setting associated with the authentication session. -This can be used to change the default timeout in case of unresponsive servers. -

-
-+

gsignond_session_data_set_ui_policy ()

+
void
+gsignond_session_data_set_ui_policy (GSignondSessionData *data,
+                                     GSignondUiPolicy ui_policy);
+

A getter for UI policy setting associated with the authentication session. +The UI policy indicates how the authentication plugin should interact with the user.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

network_timeout :

network timeout to use

ui_policy

ui policy to set

 
+
-

gsignond_session_data_set_realm ()

-
void                gsignond_session_data_set_realm     (GSignondSessionData *data,
-                                                         const gchar *realm);
-

-A setter for a realm associated with the authentication session. -

-
-+

gsignond_session_data_get_network_proxy ()

+
const gchar *
+gsignond_session_data_get_network_proxy
+                               (GSignondSessionData *data);
+

A getter for a network proxy setting associated with the authentication session. +If this property is not set, the default system proxy settings should be used.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_session_data_set_network_proxy ()

+
void
+gsignond_session_data_set_network_proxy
+                               (GSignondSessionData *data,
+                                const gchar *network_proxy);
+

A setter for a network proxy setting associated with the authentication session. +If this property is not set, the default system proxy settings should be used.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

realm :

a realm to set

network_proxy

network proxy to use

 
+

-

gsignond_session_data_set_renew_token ()

-
void                gsignond_session_data_set_renew_token
-                                                        (GSignondSessionData *data,
-                                                         gboolean renew_token);
-

-A setter for a renew token property associated with the authentication session. -This property tells the plugin to discard any cached tokens and start -the authentication process anew. -

-
-+

gsignond_session_data_get_network_timeout ()

+
gboolean
+gsignond_session_data_get_network_timeout
+                               (GSignondSessionData *data,
+                                guint32 *network_timeout);
+

A getter for a network timeout setting associated with the authentication session. +This can be used to change the default timeout in case of unresponsive servers.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

renew_token :

whether to renew the token set

network_timeout

the value for the parameter is written here

 
+
+

Returns

+

whether the key-value pair exists in the data +dictionary or not.

+

+
+
-

gsignond_session_data_set_secret ()

-
void                gsignond_session_data_set_secret    (GSignondSessionData *data,
-                                                         const gchar *secret);
-

-A setter for a secret (e.g. a password) associated with the authentication session. -

-
-+

gsignond_session_data_set_network_timeout ()

+
void
+gsignond_session_data_set_network_timeout
+                               (GSignondSessionData *data,
+                                guint32 network_timeout);
+

A setter for a network timeout setting associated with the authentication session. +This can be used to change the default timeout in case of unresponsive servers.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

secret :

a secret to set

network_timeout

network timeout to use

 
+
-

gsignond_session_data_set_ui_policy ()

-
void                gsignond_session_data_set_ui_policy (GSignondSessionData *data,
-                                                         GSignondUiPolicy ui_policy);
-

-A getter for UI policy setting associated with the authentication session. -The UI policy indicates how the authentication plugin should interact with the user. -

-
-+

gsignond_session_data_get_window_id ()

+
gboolean
+gsignond_session_data_get_window_id (GSignondSessionData *data,
+                                     guint32 *window_id);
+

A getter for a window id setting associated with the authentication session. +This can be used to embed the user interaction window produced by the authentication +session into an application window.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

ui_policy :

ui policy to set

window_id

the value for the parameter is written here

 
+
+

Returns

+

whether the key-value pair exists in the data +dictionary or not.

+

+
+
-

gsignond_session_data_set_username ()

-
void                gsignond_session_data_set_username  (GSignondSessionData *data,
-                                                         const gchar *username);
-

-A setter for a username associated with the authentication session. -

-
-+

gsignond_session_data_set_window_id ()

+
void
+gsignond_session_data_set_window_id (GSignondSessionData *data,
+                                     guint32 window_id);
+

A setter for a window id setting associated with the authentication session. +This can be used to embed the user interaction window produced by the authentication +session into an application window.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

username :

username to set

window_id

window id to use

 
-
+ + +
+

Types and Values

-

gsignond_session_data_set_window_id ()

-
void                gsignond_session_data_set_window_id (GSignondSessionData *data,
-                                                         guint32 window_id);
-

-A setter for a window id setting associated with the authentication session. -This can be used to embed the user interaction window produced by the authentication -session into an application window. -

-
-+

enum GSignondUiPolicy

+

Policy setting to define how plugins should handle interaction with the user.

+
+

Members

+
+++++ - - + + + - - + + + + + + + + + + + + +

data :

a GSignondDictionary structure

GSIGNOND_UI_POLICY_DEFAULT

+

use a default user interaction scenario

+
 

window_id :

window id to use

GSIGNOND_UI_POLICY_REQUEST_PASSWORD

+

force an authorization request from the user; +any cached access tokens should be discarded by the plugin.

+
 

GSIGNOND_UI_POLICY_NO_USER_INTERACTION

+

force no interaction with the user

+
 

GSIGNOND_UI_POLICY_VALIDATION

+

interaction with the user is only allowed +for validation captchas and similar security measures

+
 
+ + Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-GSignondSignonuiData.html b/docs/html/gsignond-GSignondSignonuiData.html index 75053f5..1a21aa8 100644 --- a/docs/html/gsignond-GSignondSignonuiData.html +++ b/docs/html/gsignond-GSignondSignonuiData.html @@ -2,26 +2,26 @@ -GSignondSignonuiData - +gsignond API Reference Manual: GSignondSignonuiData + - + - - + + - - + - +
@@ -30,1131 +30,1651 @@

GSignondSignonuiData

GSignondSignonuiData — definitions for user interaction parameters

- +
-
-

Synopsis

-
-#include <gsignond/gsignond-signonui-data.h>
-
-typedef             GSignondSignonuiData;
-enum                GSignondSignonuiError;
-const gchar *       gsignond_signonui_data_get_captcha_response
-                                                        (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_captcha_url
-                                                        (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_caption  (GSignondSignonuiData *data);
-gboolean            gsignond_signonui_data_get_confirm  (GSignondSignonuiData *data,
-                                                         gboolean *confirm);
-const gchar *       gsignond_signonui_data_get_final_url
-                                                        (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_forgot_password
-                                                        (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_forgot_password_url
-                                                        (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_message  (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_open_url (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_password (GSignondSignonuiData *data);
-gboolean            gsignond_signonui_data_get_query_error
-                                                        (GSignondSignonuiData *data,
-                                                         GSignondSignonuiError *error);
-gboolean            gsignond_signonui_data_get_query_password
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean *query_password);
-gboolean            gsignond_signonui_data_get_query_username
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean *query_username);
-gboolean            gsignond_signonui_data_get_remember_password
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean *remember_password);
-const gchar *       gsignond_signonui_data_get_request_id
-                                                        (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_test_reply
-                                                        (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_title    (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_url_response
-                                                        (GSignondSignonuiData *data);
-const gchar *       gsignond_signonui_data_get_username (GSignondSignonuiData *data);
-void                gsignond_signonui_data_set_captcha_response
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *response);
-void                gsignond_signonui_data_set_captcha_url
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *url);
-void                gsignond_signonui_data_set_caption  (GSignondSignonuiData *data,
-                                                         const gchar *caption);
-void                gsignond_signonui_data_set_confirm  (GSignondSignonuiData *data,
-                                                         gboolean confirm);
-void                gsignond_signonui_data_set_final_url
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *url);
-void                gsignond_signonui_data_set_forgot_password
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *forgot);
-void                gsignond_signonui_data_set_forgot_password_url
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *url);
-void                gsignond_signonui_data_set_message  (GSignondSignonuiData *data,
-                                                         const gchar *message);
-void                gsignond_signonui_data_set_open_url (GSignondSignonuiData *data,
-                                                         const gchar *url);
-void                gsignond_signonui_data_set_password (GSignondSignonuiData *data,
-                                                         const gchar *password);
-void                gsignond_signonui_data_set_query_error
-                                                        (GSignondSignonuiData *data,
-                                                         GSignondSignonuiError error);
-void                gsignond_signonui_data_set_query_password
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean query);
-void                gsignond_signonui_data_set_query_username
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean query);
-void                gsignond_signonui_data_set_remember_password
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean remember);
-void                gsignond_signonui_data_set_request_id
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *id);
-void                gsignond_signonui_data_set_test_reply
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *reply);
-void                gsignond_signonui_data_set_title    (GSignondSignonuiData *data,
-                                                         const gchar *title);
-void                gsignond_signonui_data_set_url_response
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *response);
-void                gsignond_signonui_data_set_username (GSignondSignonuiData *data,
-                                                         const gchar *username);
-
-
-

Description

-

-This file provides commonly used parameters for user interaction during -authentication sessions. -For each of those a getter and setter is defined, on GSignondSessionData -container. -

-

-This container is used in two directions: by plugins to specify the parameters -for user interaction that is then performed by SignonUI component, and by SignonUI -to return the results of that interaction to the plugins. See GSignondPlugin -for the user interaction API from the plugins' perspective. -

-

-The parameters that are set by the plugin and read by signon UI are captcha url, -caption, confirm, final url, forgot password, forgot password url, message, -open url, password, query password, query username, remember -password, request id, test reply values, title, username. -

-

-The parameters that are returned by signon UI to the plugin are captcha response, -password, query error code, remember password, url response. -

-
-
-

Details

-
-

GSignondSignonuiData

-
typedef GSignondDictionary GSignondSignonuiData;
-
-

-GSignondSignonuiData is simply a typedef for GSignondDictionary, which -means the developers may also freely use methods associated with that structure, -in particular for creating a GSignondSignonuiData object with -gsignond_dictionary_new(). -

-
-
-
-

enum GSignondSignonuiError

-
typedef enum {
-    SIGNONUI_ERROR_NONE = 0, 
-    SIGNONUI_ERROR_GENERAL,
-    SIGNONUI_ERROR_NO_SIGNONUI,
-    SIGNONUI_ERROR_BAD_PARAMETERS,
-    SIGNONUI_ERROR_CANCELED,
-    SIGNONUI_ERROR_NOT_AVAILABLE, 
-    SIGNONUI_ERROR_BAD_URL, 
-    SIGNONUI_ERROR_BAD_CAPTCHA,
-    SIGNONUI_ERROR_BAD_CAPTCHA_URL,
-    SIGNONUI_ERROR_REFRESH_FAILED, 
-    SIGNONUI_ERROR_FORBIDDEN,
-    SIGNONUI_ERROR_FORGOT_PASSWORD
-} GSignondSignonuiError;
-
-

-This enum defines errors that may happen during user interaction. -

-
-+

Functions

+
++++ - - - - - - - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - -

SIGNONUI_ERROR_NONE

No errors +const gchar *

SIGNONUI_ERROR_GENERAL

Generic error during interaction + +gsignond_signonui_data_get_captcha_response ()

SIGNONUI_ERROR_NO_SIGNONUI

Cannot send request to signon-ui + +void + +gsignond_signonui_data_set_captcha_response ()

SIGNONUI_ERROR_BAD_PARAMETERS

Signon-Ui cannot create dialog based on the given UiSessionData +const gchar * + +gsignond_signonui_data_get_captcha_url ()

SIGNONUI_ERROR_CANCELED

User canceled action. Plugin should not retry automatically after this + +void + +gsignond_signonui_data_set_captcha_url ()

SIGNONUI_ERROR_NOT_AVAILABLE

Requested ui is not available. For example browser cannot be started +const gchar * + +gsignond_signonui_data_get_caption ()

SIGNONUI_ERROR_BAD_URL

Given url was not valid + +void + +gsignond_signonui_data_set_caption ()

SIGNONUI_ERROR_BAD_CAPTCHA

Given captcha image was not valid + +gboolean + +gsignond_signonui_data_get_confirm ()

SIGNONUI_ERROR_BAD_CAPTCHA_URL

Given url for capctha loading was not valid + +void + +gsignond_signonui_data_set_confirm ()

SIGNONUI_ERROR_REFRESH_FAILED

Refresh failed +const gchar * + +gsignond_signonui_data_get_final_url ()

SIGNONUI_ERROR_FORBIDDEN

Showing ui forbidden by ui policy + +void + +gsignond_signonui_data_set_final_url ()

SIGNONUI_ERROR_FORGOT_PASSWORD

User pressed forgot password +const gchar * + +gsignond_signonui_data_get_forgot_password ()
-
-
-
-

gsignond_signonui_data_get_captcha_response ()

-
const gchar *       gsignond_signonui_data_get_captcha_response
-                                                        (GSignondSignonuiData *data);
-

-A getter for the user's response to a captcha query. -

-
-- - - + + - - + - -

data :

a GSignondDictionary structure +void + +gsignond_signonui_data_set_forgot_password () +

Returns :

the string entered by the user in response to a captcha query. [transfer none] +const gchar * + +gsignond_signonui_data_get_forgot_password_url ()
-
-
-
-

gsignond_signonui_data_get_captcha_url ()

-
const gchar *       gsignond_signonui_data_get_captcha_url
-                                                        (GSignondSignonuiData *data);
-

-A getter for the captcha URL. -

-
-- - - + + - - + - -

data :

a GSignondDictionary structure +void + +gsignond_signonui_data_set_forgot_password_url () +

Returns :

the URL to the captcha image to be verified by user. [transfer none] +const gchar * + +gsignond_signonui_data_get_message ()
-
-
-
-

gsignond_signonui_data_get_caption ()

-
const gchar *       gsignond_signonui_data_get_caption  (GSignondSignonuiData *data);
-

-A getter for the caption string. Caption tells the user which -application/credentials/provider is requestion authentication. -

-
-- - - + + - - + + - -

data :

a GSignondDictionary structure +void + +gsignond_signonui_data_set_message () +

Returns :

(transfer none)const gchar * + +gsignond_signonui_data_get_open_url () +
-
-
-
-

gsignond_signonui_data_get_confirm ()

-
gboolean            gsignond_signonui_data_get_confirm  (GSignondSignonuiData *data,
-                                                         gboolean *confirm);
-

-A getter for the confirm mode. In confirm mode the user is asked to enter -an old password (which is compared to the supplied password), and a new password twice -(which is returned). -

-
-- - - + + - - + + - - + + - -

data :

a GSignondDictionary structure +void + +gsignond_signonui_data_set_open_url () +

confirm :

the value for the property is written hereconst gchar * + +gsignond_signonui_data_get_password () +

Returns :

whether this property exists in the data dictionary or not. +void + +gsignond_signonui_data_set_password () +
-
-
-
-

gsignond_signonui_data_get_final_url ()

-
const gchar *       gsignond_signonui_data_get_final_url
-                                                        (GSignondSignonuiData *data);
-

-A getter for the final URL. When the signon UI detects that the user is at -the final URL (possibly with additional query or fragment parameters), it -will close the window and return the full URL via url response property. -This is used by redirection-based authentication, such as OAuth. -

-
-- - - + + - - + + - -

data :

a GSignondDictionary structure +gboolean + +gsignond_signonui_data_get_query_error () +

Returns :

(transfer none) +void + +gsignond_signonui_data_set_query_error () +
-
-
-
-

gsignond_signonui_data_get_forgot_password ()

-
const gchar *       gsignond_signonui_data_get_forgot_password
-                                                        (GSignondSignonuiData *data);
-

-A getter for the forgot password string which is shown to the user as a link to -reset the password or remind him of the password. -

-
-- - - + + - - + + - -

data :

a GSignondDictionary structure +gboolean + +gsignond_signonui_data_get_query_password () +

Returns :

(transfer none) +void + +gsignond_signonui_data_set_query_password () +
-
-
-
-

gsignond_signonui_data_get_forgot_password_url ()

-
const gchar *       gsignond_signonui_data_get_forgot_password_url
-                                                        (GSignondSignonuiData *data);
-

-A getter for the forgot password URL, where the user can reset or request a -reminder of the password. -

-
-- - - + + - - + + - -

data :

a GSignondDictionary structure +gboolean + +gsignond_signonui_data_get_query_username () +

Returns :

(transfer none) +void + +gsignond_signonui_data_set_query_username () +
-
-
-
-

gsignond_signonui_data_get_message ()

-
const gchar *       gsignond_signonui_data_get_message  (GSignondSignonuiData *data);
-

-A getter for the message which is show to the user in the signon UI dialog. -

-
-- - - + + - - + + - -

data :

a GSignondDictionary structure +gboolean + +gsignond_signonui_data_get_remember_password () +

Returns :

(transfer none) +void + +gsignond_signonui_data_set_remember_password () +
-
-
-
-

gsignond_signonui_data_get_open_url ()

-
const gchar *       gsignond_signonui_data_get_open_url (GSignondSignonuiData *data);
-

-A getter for the URL that should be opened by signon UI. -

-
-- - - + + - - + + - -

data :

a GSignondDictionary structureconst gchar * + +gsignond_signonui_data_get_request_id () +

Returns :

(transfer none) +void + +gsignond_signonui_data_set_request_id () +
-
-
-
-

gsignond_signonui_data_get_password ()

-
const gchar *       gsignond_signonui_data_get_password (GSignondSignonuiData *data);
-

-A getter for the password string. -

-
-- - - + + - - + + - -

data :

a GSignondDictionary structureconst gchar * + +gsignond_signonui_data_get_test_reply () +

Returns :

(transfer none) +void + +gsignond_signonui_data_set_test_reply () +
-
-
-
-

gsignond_signonui_data_get_query_error ()

-
gboolean            gsignond_signonui_data_get_query_error
-                                                        (GSignondSignonuiData *data,
-                                                         GSignondSignonuiError *error);
-

-A getter for the UI interaction error. Signon UI sets this to SIGNONUI_ERROR_NONE if -there were no errors. -

-
-- - - + + - - + + - - + + - -

data :

a GSignondDictionary structureconst gchar * + +gsignond_signonui_data_get_title () +

error :

the error is written here +void + +gsignond_signonui_data_set_title () +

Returns :

whether this property exists in the data dictionary or not.const gchar * + +gsignond_signonui_data_get_url_response () +
-
-
-
-

gsignond_signonui_data_get_query_password ()

-
gboolean            gsignond_signonui_data_get_query_password
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean *query_password);
-

-A getter for the query password property. It indicates whether the signon UI -should ask the user for a password (and return it in the password property). -

-
-- - - + + - - + + - - + +

data :

a GSignondDictionary structure +void + +gsignond_signonui_data_set_url_response () +

query_password :

the property is written hereconst gchar * + +gsignond_signonui_data_get_username () +

Returns :

whether this property exists in the data dictionary or not. +void + +gsignond_signonui_data_set_username () +
+
+

Types and Values

+
++++ + + + + +
enumGSignondSignonuiError
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-signonui-data.h>
+
+
+
+

Description

+

This file provides commonly used parameters for user interaction during +authentication sessions. +For each of those a getter and setter is defined, on GSignondSessionData +container.

+

This container is used in two directions: by plugins to specify the parameters +for user interaction that is then performed by SignonUI component, and by SignonUI +to return the results of that interaction to the plugins. See GSignondPlugin +for the user interaction API from the plugins' perspective.

+

The parameters that are set by the plugin and read by signon UI are captcha url, +caption, confirm, final url, forgot password, forgot password url, message, +open url, password, query password, query username, remember +password, request id, test reply values, title, username.

+

The parameters that are returned by signon UI to the plugin are captcha response, +password, query error code, remember password, url response.

+
+
+

Functions

+
+

gsignond_signonui_data_get_captcha_response ()

+
const gchar *
+gsignond_signonui_data_get_captcha_response
+                               (GSignondSignonuiData *data);
+

A getter for the user's response to a captcha query.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

the string entered by the user in response to a captcha query.

+

[transfer none]

+
+

-

gsignond_signonui_data_get_query_username ()

-
gboolean            gsignond_signonui_data_get_query_username
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean *query_username);
-

-A getter for the query username property. It indicates whether the signon UI -should ask the user for a username (and return it in the username property). -

-
-+

gsignond_signonui_data_set_captcha_response ()

+
void
+gsignond_signonui_data_set_captcha_response
+                               (GSignondSignonuiData *data,
+                                const gchar *response);
+

A setter for the user's response to a captcha query.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

data :

a GSignondDictionary structure

query_username :

the property is written here

data

a GSignondDictionary structure

 

Returns :

whether this property exists in the data dictionary or not.

response

the string entered by the user in response to a captcha query.

 
+

-

gsignond_signonui_data_get_remember_password ()

-
gboolean            gsignond_signonui_data_get_remember_password
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean *remember_password);
-

-A getter for whether the password should be remembered. -

-
-- - - - - - - - - - - - - - +

gsignond_signonui_data_get_captcha_url ()

+
const gchar *
+gsignond_signonui_data_get_captcha_url
+                               (GSignondSignonuiData *data);
+

A getter for the captcha URL.

+
+

Parameters

+

data :

a GSignondDictionary structure

remember_password :

the property is written here

Returns :

whether this property exists in the data dictionary or not.
+++++ + + + + +

data

a GSignondDictionary structure

 
+
+

Returns

+

the URL to the captcha image to be verified by user.

+

[transfer none]

+
+

-

gsignond_signonui_data_get_request_id ()

-
const gchar *       gsignond_signonui_data_get_request_id
-                                                        (GSignondSignonuiData *data);
-

-A getter for the dialog request id. The id identifies the dialog so that it -can be refreshed or updated. -

-
-+

gsignond_signonui_data_set_captcha_url ()

+
void
+gsignond_signonui_data_set_captcha_url
+                               (GSignondSignonuiData *data,
+                                const gchar *url);
+

A setter for the captcha URL.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

Returns :

(transfer none)

url

the URL to the captcha image to be verified by user

 
+
-

gsignond_signonui_data_get_test_reply ()

-
const gchar *       gsignond_signonui_data_get_test_reply
-                                                        (GSignondSignonuiData *data);
-

-A getter for the test reply values. It's used only by the signon ui -implementations to test themselves. -

-
-+

gsignond_signonui_data_get_caption ()

+
const gchar *
+gsignond_signonui_data_get_caption (GSignondSignonuiData *data);
+

A getter for the caption string. Caption tells the user which +application/credentials/provider is requestion authentication.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_caption ()

+
void
+gsignond_signonui_data_set_caption (GSignondSignonuiData *data,
+                                    const gchar *caption);
+

A setter for the caption string. Caption tells the user which +application/credentials/provider is requestion authentication.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

Returns :

(transfer none)

caption

the caption string

 
+

-

gsignond_signonui_data_get_title ()

-
const gchar *       gsignond_signonui_data_get_title    (GSignondSignonuiData *data);
-

-A getter for the UI dialog title. -

-
-+

gsignond_signonui_data_get_confirm ()

+
gboolean
+gsignond_signonui_data_get_confirm (GSignondSignonuiData *data,
+                                    gboolean *confirm);
+

A getter for the confirm mode. In confirm mode the user is asked to enter +an old password (which is compared to the supplied password), and a new password twice +(which is returned).

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

Returns :

(transfer none)

confirm

the value for the property is written here

 
+
+

Returns

+

whether this property exists in the data +dictionary or not.

+

+
+
-

gsignond_signonui_data_get_url_response ()

-
const gchar *       gsignond_signonui_data_get_url_response
-                                                        (GSignondSignonuiData *data);
-

-A getter for the response URL. If the final URL was set in the request to the signon UI, and the signon UI -detects that it has been reached, then the full final URL is returned using -this property. This is used by redirection-based authentication such as OAauth. -

-
-+

gsignond_signonui_data_set_confirm ()

+
void
+gsignond_signonui_data_set_confirm (GSignondSignonuiData *data,
+                                    gboolean confirm);
+

A setter for the confirm mode. In confirm mode the user is asked to enter +an old password (which is compared to the supplied password), and a new password twice +(which is returned).

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

Returns :

(transfer none)

confirm

the value for the property

 
+
-

gsignond_signonui_data_get_username ()

-
const gchar *       gsignond_signonui_data_get_username (GSignondSignonuiData *data);
-

-A getter for the username string. -

-
-+

gsignond_signonui_data_get_final_url ()

+
const gchar *
+gsignond_signonui_data_get_final_url (GSignondSignonuiData *data);
+

A getter for the final URL. When the signon UI detects that the user is at +the final URL (possibly with additional query or fragment parameters), it +will close the window and return the full URL via url response property. +This is used by redirection-based authentication, such as OAuth.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_final_url ()

+
void
+gsignond_signonui_data_set_final_url (GSignondSignonuiData *data,
+                                      const gchar *url);
+

A setter for the final URL. When the signon UI detects that the user is at +the final URL (possibly with additional query or fragment parameters), it +will close the window and return the full URL via url response property. +This is used by redirection-based authentication, such as OAuth.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

Returns :

(transfer none)

url

the final url

 
+
+
+
+

gsignond_signonui_data_get_forgot_password ()

+
const gchar *
+gsignond_signonui_data_get_forgot_password
+                               (GSignondSignonuiData *data);
+

A getter for the forgot password string which is shown to the user as a link to +reset the password or remind him of the password.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+

-

gsignond_signonui_data_set_captcha_response ()

-
void                gsignond_signonui_data_set_captcha_response
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *response);
-

-A setter for the user's response to a captcha query. -

-
-+

gsignond_signonui_data_set_forgot_password ()

+
void
+gsignond_signonui_data_set_forgot_password
+                               (GSignondSignonuiData *data,
+                                const gchar *forgot);
+

A setter for the forgot password string, which is shown to the user as a link to +reset the password or remind him of the password.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

response :

the string entered by the user in response to a captcha query.

forgot

the forgot password string

 
+
+

Returns

+

.

+

[transfer none]

+
+ +
+
+

gsignond_signonui_data_get_forgot_password_url ()

+
const gchar *
+gsignond_signonui_data_get_forgot_password_url
+                               (GSignondSignonuiData *data);
+

A getter for the forgot password URL, where the user can reset or request a +reminder of the password.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+

-

gsignond_signonui_data_set_captcha_url ()

-
void                gsignond_signonui_data_set_captcha_url
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *url);
-

-A setter for the captcha URL. -

-
-+

gsignond_signonui_data_set_forgot_password_url ()

+
void
+gsignond_signonui_data_set_forgot_password_url
+                               (GSignondSignonuiData *data,
+                                const gchar *url);
+

A setter for the forgot password URL, where the user can reset or request a +reminder of the password.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

url :

the URL to the captcha image to be verified by user

url

the forgot password URL

 
+
+

Returns

+

(transfer none)

+

+
+
-

gsignond_signonui_data_set_caption ()

-
void                gsignond_signonui_data_set_caption  (GSignondSignonuiData *data,
-                                                         const gchar *caption);
-

-A setter for the caption string. Caption tells the user which -application/credentials/provider is requestion authentication. -

-
-+

gsignond_signonui_data_get_message ()

+
const gchar *
+gsignond_signonui_data_get_message (GSignondSignonuiData *data);
+

A getter for the message which is show to the user in the signon UI dialog.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_message ()

+
void
+gsignond_signonui_data_set_message (GSignondSignonuiData *data,
+                                    const gchar *message);
+

A setter for the message which is show to the user in the signon UI dialog.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

caption :

the caption string

message

the message

 
+

-

gsignond_signonui_data_set_confirm ()

-
void                gsignond_signonui_data_set_confirm  (GSignondSignonuiData *data,
-                                                         gboolean confirm);
-

-A setter for the confirm mode. In confirm mode the user is asked to enter -an old password (which is compared to the supplied password), and a new password twice -(which is returned). -

-
-+

gsignond_signonui_data_get_open_url ()

+
const gchar *
+gsignond_signonui_data_get_open_url (GSignondSignonuiData *data);
+

A getter for the URL that should be opened by signon UI.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_open_url ()

+
void
+gsignond_signonui_data_set_open_url (GSignondSignonuiData *data,
+                                     const gchar *url);
+

A setter for the URL that should be opened by signon UI.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

confirm :

the value for the property

url

the url to open

 
+

-

gsignond_signonui_data_set_final_url ()

-
void                gsignond_signonui_data_set_final_url
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *url);
-

-A setter for the final URL. When the signon UI detects that the user is at -the final URL (possibly with additional query or fragment parameters), it -will close the window and return the full URL via url response property. -This is used by redirection-based authentication, such as OAuth. -

-
-+

gsignond_signonui_data_get_password ()

+
const gchar *
+gsignond_signonui_data_get_password (GSignondSignonuiData *data);
+

A getter for the password string.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_password ()

+
void
+gsignond_signonui_data_set_password (GSignondSignonuiData *data,
+                                     const gchar *password);
+

A setter for the password string.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

url :

the final url

password

the password string

 
+

-

gsignond_signonui_data_set_forgot_password ()

-
void                gsignond_signonui_data_set_forgot_password
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *forgot);
-

-A setter for the forgot password string, which is shown to the user as a link to -reset the password or remind him of the password. -

-
-+

gsignond_signonui_data_get_query_error ()

+
gboolean
+gsignond_signonui_data_get_query_error
+                               (GSignondSignonuiData *data,
+                                GSignondSignonuiError *error);
+

A getter for the UI interaction error. Signon UI sets this to SIGNONUI_ERROR_NONE + if +there were no errors.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

forgot :

the forgot password string

error

the error is written here

 
+
+

Returns

+

whether this property exists in the data +dictionary or not.

+

+
+
-

gsignond_signonui_data_set_forgot_password_url ()

-
void                gsignond_signonui_data_set_forgot_password_url
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *url);
-

-A setter for the forgot password URL, where the user can reset or request a -reminder of the password. -

-
-+

gsignond_signonui_data_set_query_error ()

+
void
+gsignond_signonui_data_set_query_error
+                               (GSignondSignonuiData *data,
+                                GSignondSignonuiError error);
+

A setter for the UI interaction error. Signon UI sets this to SIGNONUI_ERROR_NONE + if +there were no errors.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

url :

the forgot password URL

error

the error

 
+
-

gsignond_signonui_data_set_message ()

-
void                gsignond_signonui_data_set_message  (GSignondSignonuiData *data,
-                                                         const gchar *message);
-

-A setter for the message which is show to the user in the signon UI dialog. -

-
-+

gsignond_signonui_data_get_query_password ()

+
gboolean
+gsignond_signonui_data_get_query_password
+                               (GSignondSignonuiData *data,
+                                gboolean *query_password);
+

A getter for the query password property. It indicates whether the signon UI +should ask the user for a password (and return it in the password property).

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

message :

the message

query_password

the property is written here

 
+
+

Returns

+

whether this property exists in the data +dictionary or not.

+

+
+
-

gsignond_signonui_data_set_open_url ()

-
void                gsignond_signonui_data_set_open_url (GSignondSignonuiData *data,
-                                                         const gchar *url);
-

-A setter for the URL that should be opened by signon UI. -

-
-+

gsignond_signonui_data_set_query_password ()

+
void
+gsignond_signonui_data_set_query_password
+                               (GSignondSignonuiData *data,
+                                gboolean query);
+

A setter for the query password property. It indicates whether the signon UI +should ask the user for a password (and return it in the password property).

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

url :

the url to open

query

the property value

 
+
-

gsignond_signonui_data_set_password ()

-
void                gsignond_signonui_data_set_password (GSignondSignonuiData *data,
-                                                         const gchar *password);
-

-A setter for the password string. -

-
-+

gsignond_signonui_data_get_query_username ()

+
gboolean
+gsignond_signonui_data_get_query_username
+                               (GSignondSignonuiData *data,
+                                gboolean *query_username);
+

A getter for the query username property. It indicates whether the signon UI +should ask the user for a username (and return it in the username property).

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

password :

the password string

query_username

the property is written here

 
+
+

Returns

+

whether this property exists in the data +dictionary or not.

+

+
+
-

gsignond_signonui_data_set_query_error ()

-
void                gsignond_signonui_data_set_query_error
-                                                        (GSignondSignonuiData *data,
-                                                         GSignondSignonuiError error);
-

-A setter for the UI interaction error. Signon UI sets this to SIGNONUI_ERROR_NONE if -there were no errors. -

-
-+

gsignond_signonui_data_set_query_username ()

+
void
+gsignond_signonui_data_set_query_username
+                               (GSignondSignonuiData *data,
+                                gboolean query);
+

A setter for the query username property. It indicates whether the signon UI +should ask the user for a username (and return it in the username property).

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

error :

the error

query

the property value

 
+
-

gsignond_signonui_data_set_query_password ()

-
void                gsignond_signonui_data_set_query_password
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean query);
-

-A setter for the query password property. It indicates whether the signon UI -should ask the user for a password (and return it in the password property). -

-
-+

gsignond_signonui_data_get_remember_password ()

+
gboolean
+gsignond_signonui_data_get_remember_password
+                               (GSignondSignonuiData *data,
+                                gboolean *remember_password);
+

A getter for whether the password should be remembered.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

query :

the property value

remember_password

the property is written here

 
+
+

Returns

+

whether this property exists in the data +dictionary or not.

+

+
+
-

gsignond_signonui_data_set_query_username ()

-
void                gsignond_signonui_data_set_query_username
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean query);
-

-A setter for the query username property. It indicates whether the signon UI -should ask the user for a username (and return it in the username property). -

-
-+

gsignond_signonui_data_set_remember_password ()

+
void
+gsignond_signonui_data_set_remember_password
+                               (GSignondSignonuiData *data,
+                                gboolean remember);
+

A setter for whether the password should be remembered.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

query :

the property value

remember

the property value

 
+ +
+
+

gsignond_signonui_data_get_request_id ()

+
const gchar *
+gsignond_signonui_data_get_request_id (GSignondSignonuiData *data);
+

A getter for the dialog request id. The id identifies the dialog so that it +can be refreshed or updated.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+

-

gsignond_signonui_data_set_remember_password ()

-
void                gsignond_signonui_data_set_remember_password
-                                                        (GSignondSignonuiData *data,
-                                                         gboolean remember);
-

-A setter for whether the password should be remembered. -

-
-+

gsignond_signonui_data_set_request_id ()

+
void
+gsignond_signonui_data_set_request_id (GSignondSignonuiData *data,
+                                       const gchar *id);
+

A setter for the dialog request id. The id identifies the dialog so that it +can be refreshed or updated.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

remember :

the property value

id

request id

 
+
-

gsignond_signonui_data_set_request_id ()

-
void                gsignond_signonui_data_set_request_id
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *id);
-

-A setter for the dialog request id. The id identifies the dialog so that it -can be refreshed or updated. -

-
-+

gsignond_signonui_data_get_test_reply ()

+
const gchar *
+gsignond_signonui_data_get_test_reply (GSignondSignonuiData *data);
+

A getter for the test reply values. It's used only by the signon ui +implementations to test themselves.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_test_reply ()

+
void
+gsignond_signonui_data_set_test_reply (GSignondSignonuiData *data,
+                                       const gchar *reply);
+

A setter for the test reply values. It's used only by the signon ui +implementations to test themselves.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

id :

request id

reply

test reply values

 
+

-

gsignond_signonui_data_set_test_reply ()

-
void                gsignond_signonui_data_set_test_reply
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *reply);
-

-A setter for the test reply values. It's used only by the signon ui -implementations to test themselves. -

-
-+

gsignond_signonui_data_get_title ()

+
const gchar *
+gsignond_signonui_data_get_title (GSignondSignonuiData *data);
+

A getter for the UI dialog title.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_title ()

+
void
+gsignond_signonui_data_set_title (GSignondSignonuiData *data,
+                                  const gchar *title);
+

A setter for the UI dialog title.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

reply :

test reply values

title

the title

 
+

-

gsignond_signonui_data_set_title ()

-
void                gsignond_signonui_data_set_title    (GSignondSignonuiData *data,
-                                                         const gchar *title);
-

-A setter for the UI dialog title. -

-
-+

gsignond_signonui_data_get_url_response ()

+
const gchar *
+gsignond_signonui_data_get_url_response
+                               (GSignondSignonuiData *data);
+

A getter for the response URL. If the final URL was set in the request to the signon UI, and the signon UI +detects that it has been reached, then the full final URL is returned using +this property. This is used by redirection-based authentication such as OAauth.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_url_response ()

+
void
+gsignond_signonui_data_set_url_response
+                               (GSignondSignonuiData *data,
+                                const gchar *response);
+

A getter for the response URL. If the final URL was set in the request to the +signon UI, and the signon UI +detects that it has been reached, then the full final URL is returned using +this property. This is used by redirection-based authentication such as OAauth.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

title :

the title

response

the response URL

 
+
+

Returns

+

(transfer none)

+

+
+

-

gsignond_signonui_data_set_url_response ()

-
void                gsignond_signonui_data_set_url_response
-                                                        (GSignondSignonuiData *data,
-                                                         const gchar *response);
-

-A getter for the response URL. If the final URL was set in the request to the -signon UI, and the signon UI -detects that it has been reached, then the full final URL is returned using -this property. This is used by redirection-based authentication such as OAauth. -

-
-+

gsignond_signonui_data_get_username ()

+
const gchar *
+gsignond_signonui_data_get_username (GSignondSignonuiData *data);
+

A getter for the username string.

+
+

Parameters

+
+++++ + + + + + +

data

a GSignondDictionary structure

 
+
+
+

Returns

+

(transfer none)

+

+
+ +
+
+

gsignond_signonui_data_set_username ()

+
void
+gsignond_signonui_data_set_username (GSignondSignonuiData *data,
+                                     const gchar *username);
+

A setter for the username string.

+
+

Parameters

+
+++++ - - + + + - - + + +

data :

a GSignondDictionary structure

data

a GSignondDictionary structure

 

response :

the response URL

username

the username string

 
-
+
+ +
+

Types and Values

-

gsignond_signonui_data_set_username ()

-
void                gsignond_signonui_data_set_username (GSignondSignonuiData *data,
-                                                         const gchar *username);
-

-A setter for the username string. -

-
-+

enum GSignondSignonuiError

+

This enum defines errors that may happen during user interaction.

+
+

Members

+
+++++ - - + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

data :

a GSignondDictionary structure

SIGNONUI_ERROR_NONE

+

No errors

+
 

SIGNONUI_ERROR_GENERAL

+

Generic error during interaction

+
 

username :

the username string

SIGNONUI_ERROR_NO_SIGNONUI

+

Cannot send request to signon-ui

+
 

SIGNONUI_ERROR_BAD_PARAMETERS

+

Signon-Ui cannot create dialog based on the given UiSessionData

+
 

SIGNONUI_ERROR_CANCELED

+

User canceled action. Plugin should not retry automatically after this

+
 

SIGNONUI_ERROR_NOT_AVAILABLE

+

Requested ui is not available. For example browser cannot be started

+
 

SIGNONUI_ERROR_BAD_URL

+

Given url was not valid

+
 

SIGNONUI_ERROR_BAD_CAPTCHA

+

Given captcha image was not valid

+
 

SIGNONUI_ERROR_BAD_CAPTCHA_URL

+

Given url for capctha loading was not valid

+
 

SIGNONUI_ERROR_REFRESH_FAILED

+

Refresh failed

+
 

SIGNONUI_ERROR_FORBIDDEN

+

Showing ui forbidden by ui policy

+
 

SIGNONUI_ERROR_FORGOT_PASSWORD

+

User pressed forgot password

+
 
+ + Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-General-configuration.html b/docs/html/gsignond-General-configuration.html index 90875dd..e61b509 100644 --- a/docs/html/gsignond-General-configuration.html +++ b/docs/html/gsignond-General-configuration.html @@ -2,26 +2,26 @@ -General configuration - +gsignond API Reference Manual: General configuration + - - + + - - +
@@ -30,132 +30,118 @@

General configuration

General configuration — gSSO general configuration keys

- +
-
-

Synopsis

-
-#include <gsignond/gsignond-config.h>
-
-#define             GSIGNOND_CONFIG_GENERAL
-#define             GSIGNOND_CONFIG_GENERAL_BIN_DIR
-#define             GSIGNOND_CONFIG_GENERAL_EXTENSION
-#define             GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR
-#define             GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR
-#define             GSIGNOND_CONFIG_GENERAL_SECURE_DIR
-#define             GSIGNOND_CONFIG_GENERAL_STORAGE_PATH
-#define             GSIGNOND_CONFIG_PLUGIN_TIMEOUT
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-config.h>
 

Description

-

-General configuration keys are defined below. See GSignondConfig for how to use them. -

+

General configuration keys are defined below. See GSignondConfig for how to use them.

-

Details

+

Functions

+
+
+

Types and Values

GSIGNOND_CONFIG_GENERAL

#define GSIGNOND_CONFIG_GENERAL                 "General"
 
-

-A prefix for general keys. Should be used only when defining new keys. -

+

A prefix for general keys. Should be used only when defining new keys.


-

GSIGNOND_CONFIG_GENERAL_BIN_DIR

-
#define             GSIGNOND_CONFIG_GENERAL_BIN_DIR
-

-The path where gSSO is looking for the gsignond-plugind binary when it needs -to start a plugin process. Can be used for finding other supplementary binaries in -the future. -

-

-Default value: $(bindir), can be overriden in debug -builds by setting SSO_BIN_DIR environment variable. -

+

GSIGNOND_CONFIG_GENERAL_STORAGE_PATH

+
#define             GSIGNOND_CONFIG_GENERAL_STORAGE_PATH
+

Base path for GSignondStorageManager to operate in.

+

Default value: "/var/db", can be overriden in debug +builds by setting SSO_STORAGE_PATH environment variable.


GSIGNOND_CONFIG_GENERAL_EXTENSION

#define             GSIGNOND_CONFIG_GENERAL_EXTENSION
-

-The name of the gSSO extension to use. If not specified, the default -implementation is used (see GSignondExtension). -

-

-Can be overriden in debug -builds by setting SSO_EXTENSION environment variable. -

-
-
-
-

GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR

-
#define             GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR
-

-The path where gSSO is looking for available extension modules. -

-

-Default value: $(pkglibdir)/extensions, can be overriden in debug -builds by setting SSO_EXTENSIONS_DIR environment variable. -

-
-
-
-

GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR

-
#define             GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR
-

-The path where gSSO is looking for available plugins. -

-

-Default value: $(pkglibdir)/plugins, can be overriden in debug -builds by setting SSO_PLUGINS_DIR environment variable. -

+

The name of the gSSO extension to use. If not specified, the default +implementation is used (see GSignondExtension).

+

Can be overriden in debug +builds by setting SSO_EXTENSION environment variable.


GSIGNOND_CONFIG_GENERAL_SECURE_DIR

#define             GSIGNOND_CONFIG_GENERAL_SECURE_DIR
-

-Path provided by GSignondStorageManager for storing user-specific -information, including secret and metadata databases. -

-

-Value provided by the default implementation: -GSIGNOND_CONFIG_GENERAL_STORAGE_PATH + "/gsignond." + g_get_user_name(). -

+

Path provided by GSignondStorageManager for storing user-specific +information, including secret and metadata databases.

+

This is a run-time value and any value read from configuration file +is overwritten.

+

Value provided by the default implementation: +GSIGNOND_CONFIG_GENERAL_STORAGE_PATH + "/gsignond." + g_get_user_name().


-

GSIGNOND_CONFIG_GENERAL_STORAGE_PATH

-
#define             GSIGNOND_CONFIG_GENERAL_STORAGE_PATH
-

-Base path for GSignondStorageManager to operate in. -

-

-Default value: "/var/db", can be overriden in debug -builds by setting SSO_STORAGE_PATH environment variable. -

+

GSIGNOND_CONFIG_PLUGIN_TIMEOUT

+
#define             GSIGNOND_CONFIG_PLUGIN_TIMEOUT
+

A timeout in seconds, after which inactive plugin objects and processes are removed. +If not set, the plugin objects will persist for possible reuse.

+

Can be overriden in debug +builds by setting SSO_PLUGIN_TIMEOUT environment variable.


-

GSIGNOND_CONFIG_PLUGIN_TIMEOUT

-
#define             GSIGNOND_CONFIG_PLUGIN_TIMEOUT
-

-A timeout in seconds, after which inactive plugin objects and processes are removed. -If not set, the plugin objects will persist for possible reuse. -

-

-Can be overriden in debug -builds by setting SSO_PLUGIN_TIMEOUT environment variable. -

+

GSIGNOND_CONFIG_GENERAL_KEYCHAIN_SYSCTX

+
#define             GSIGNOND_CONFIG_GENERAL_KEYCHAIN_SYSCTX
+

System security context of the keychain UI process +(see GSignondAccessControlManager).

+

Default value can be defined through configure --enable-keychain flag (see

+Building gsignond).
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-Logging.html b/docs/html/gsignond-Logging.html index 074a419..1ead9d0 100644 --- a/docs/html/gsignond-Logging.html +++ b/docs/html/gsignond-Logging.html @@ -2,24 +2,24 @@ -Logging - +gsignond API Reference Manual: Logging + - + - + - - + @@ -30,148 +30,204 @@

Logging

Logging — logging facilities

- + -
-

Synopsis

-
-#include <gsignond/gsignond-log.h>
-
-#define             DBG                                 (frmt,
-                                                         ...)
-#define             ERR                                 (frmt,
-                                                         ...)
-#define             INFO                                (frmt,
-                                                         ...)
-#define             TRACEBACK
-#define             WARN                                (frmt,
-                                                         ...)
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
#defineTRACEBACK
#define +INFO() +
#define +ERR() +
#define +WARN() +
#define +DBG() +
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-log.h>
 

Description

-

-gsignond/gsignond-log.h file contains logging macros -that plugins and extensions should use for debugging and tracing. -

-

-For example: -

+

gsignond/gsignond-log.h file contains logging macros +that plugins and extensions should use for debugging and tracing.

+

For example:

- +
1
INFO("Plugin %s initialized", plugin_mechanism);
-

-

-

Details

+

Functions

-

DBG()

-
#define             DBG(frmt, args...)
-

-Use this macro to log debug messages. GSignond will take care of -correctly saving them. -

-
-+

TRACEBACK

+
#define             TRACEBACK()
+

This macro prints the current function call stack to stderr.

+ +
+
+

INFO()

+
#define             INFO(frmt, args...)
+

Use this macro to log informational messages. GSignond will take care of +correctly saving them.

+
+

Parameters

+
+++++ - - + + + - - + + +

frmt :

format string for the message

frmt

format string for the message

 

... :

arguments for the format string

...

arguments for the format string

 
+

ERR()

#define             ERR(frmt, args...)
-

-Use this macro to log error messages. GSignond will take care of -correctly saving them. -

-
-+

Use this macro to log error messages. GSignond will take care of +correctly saving them.

+
+

Parameters

+
+++++ - - + + + - - + + +

frmt :

format string for the message

frmt

format string for the message

 

... :

arguments for the format string

...

arguments for the format string

 
+

-

INFO()

-
#define             INFO(frmt, args...)
-

-Use this macro to log informational messages. GSignond will take care of -correctly saving them. -

-
-+

WARN()

+
#define             WARN(frmt, args...)
+

Use this macro to log warning messages. GSignond will take care of +correctly saving them.

+
+

Parameters

+
+++++ - - + + + - - + + +

frmt :

format string for the message

frmt

format string for the message

 

... :

arguments for the format string

...

arguments for the format string

 
-
-
-

TRACEBACK

-
#define             TRACEBACK()
-

-This macro prints the current function call stack to stderr. -


-

WARN()

-
#define             WARN(frmt, args...)
-

-Use this macro to log warning messages. GSignond will take care of -correctly saving them. -

-
-+

DBG()

+
#define             DBG(frmt, args...)
+

Use this macro to log debug messages. GSignond will take care of +correctly saving them.

+
+

Parameters

+
+++++ - - + + + - - + + +

frmt :

format string for the message

frmt

format string for the message

 

... :

arguments for the format string

...

arguments for the format string

 
+
+

Types and Values

+
+ + Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-Utility-functions.html b/docs/html/gsignond-Utility-functions.html index 26fcca1..3ce1362 100644 --- a/docs/html/gsignond-Utility-functions.html +++ b/docs/html/gsignond-Utility-functions.html @@ -2,24 +2,24 @@ -Utility functions - +gsignond API Reference Manual: Utility functions + - + - + - - + @@ -30,90 +30,354 @@

Utility functions

Utility functions — miscellaneous utility functions

- + -
-

Synopsis

-
-#include <gsignond/gsignond-utils.h>
-
-gchar *             gsignond_generate_nonce             ();
-gboolean            gsignond_wipe_directory             (const gchar *dirname);
-gboolean            gsignond_wipe_file                  (const gchar *filename);
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+gboolean + +gsignond_wipe_file () +
+gboolean + +gsignond_wipe_directory () +
+gchar * + +gsignond_generate_nonce () +
+GVariant * + +gsignond_sequence_to_variant () +
+GSequence * + +gsignond_variant_to_sequence () +
+gchar ** + +gsignond_sequence_to_array () +
+GSequence * + +gsignond_array_to_sequence () +
+GSequence * + +gsignond_copy_array_to_sequence () +
+gboolean + +gsignond_is_host_in_domain () +
+
+
+

Object Hierarchy

+
+
+
+
+

Includes

+
#include <gsignond/gsignond-utils.h>
 

Description

-

-Miscellaneous utility functions are described below. -

+

Miscellaneous utility functions are described below.

-

Details

+

Functions

-

gsignond_generate_nonce ()

-
gchar *             gsignond_generate_nonce             ();
-

-This function generates a random secure nonce using SHA1 HMAC. -

-
-+

gsignond_wipe_file ()

+
gboolean
+gsignond_wipe_file (const gchar *filename);
+

This function securely wipes the contents of the file, by overwriting it with +0's, then 1's, then random data. The file is then removed.

+
+

Parameters

+
+++++ - - + + +

Returns :

the nonce in lowercase hexadecimal format, 40 bytes long. [transfer full] -

filename

filename to wipe

 
+
+

Returns

+

TRUE if wiping and removal was successful.

+

+
+

-

gsignond_wipe_directory ()

-
gboolean            gsignond_wipe_directory             (const gchar *dirname);
-

-This function securely wipes the contents of the directory by calling -gsignond_wipe_file() on each file. It also removes links and empty directories but -does not recursively wipe them. -

-
-- - - - - - - - - - +

gsignond_wipe_directory ()

+
gboolean
+gsignond_wipe_directory (const gchar *dirname);
+

This function securely wipes the contents of the directory by calling +gsignond_wipe_file() on each file. It also removes links and empty directories but +does not recursively wipe them.

+
+

Parameters

+

dirname :

directory to wipe

Returns :

TRUE if wiping and removal was successful.
+++++ + + + + +

dirname

directory to wipe

 
+
+

Returns

+

TRUE if wiping and removal was successful.

+

+
+
+
+
+

gsignond_generate_nonce ()

+
gchar *
+gsignond_generate_nonce ();
+

This function generates a random secure nonce using SHA1 HMAC.

+
+

Returns

+

the nonce in lowercase hexadecimal format, 40 bytes long.

+

[transfer full]

+
+

-

gsignond_wipe_file ()

-
gboolean            gsignond_wipe_file                  (const gchar *filename);
-

-This function securely wipes the contents of the file, by overwriting it with -0's, then 1's, then random data. The file is then removed. -

-
-+

gsignond_sequence_to_variant ()

+
GVariant *
+gsignond_sequence_to_variant (GSequence *seq);
+

Convert a string sequence to a variant.

+
+

Parameters

+
+++++ + + + + + +

seq

Sequence of strings to convert

 
+
+
+

Returns

+

GVariant of type "as".

+

[transfer full]

+
+ +
+
+

gsignond_variant_to_sequence ()

+
GSequence *
+gsignond_variant_to_sequence (GVariant *var);
+

Convert variant containing string array to sequence.

+
+

Parameters

+
+++++ + + + + + +

var

Variant of "as" to convert

 
+
+
+

Returns

+

GSequence of strings.

+

[transfer full]

+
+
+
+
+

gsignond_sequence_to_array ()

+
gchar **
+gsignond_sequence_to_array (GSequence *seq);
+

Convert sequence of strings to null-terminated string array.

+
+

Parameters

+
+++++ + + + + + +

seq

Sequence of strings to convert

 
+
+
+

Returns

+

Null-terminated array of strings.

+

[transfer full]

+
+
+
+
+

gsignond_array_to_sequence ()

+
GSequence *
+gsignond_array_to_sequence (gchar **items);
+

Convert null-terminated array of strings to a sequence.

+
+

Parameters

+
+++++ + + + + + +

items

Null-terminated array of strings to convert.

[transfer full]
+
+
+

Returns

+

GSequence of strings.

+

[transfer full]

+
+
+
+
+

gsignond_copy_array_to_sequence ()

+
GSequence *
+gsignond_copy_array_to_sequence (const gchar **items);
+

Copy null-terminated array of strings to a sequence.

+
+

Parameters

+
+++++ + + + + + +

items

Null-terminated array of strings to copy

 
+
+
+

Returns

+

GSequence of strings.

+

[transfer full]

+
+
+
+
+

gsignond_is_host_in_domain ()

+
gboolean
+gsignond_is_host_in_domain (const gchar *host,
+                            const gchar *domain);
+

Checks if host + belongs to domain +.

+
+

Parameters

+
+++++ - - + + + - - + + +

filename :

filename to wipe

domain

a domain name

 

Returns :

TRUE if wiping and removal was successful.

host

a host name

 
+
+

Returns

+

the result

+

+
+
+ +
+

Types and Values

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/gsignond-building.html b/docs/html/gsignond-building.html index d92d299..2402db5 100644 --- a/docs/html/gsignond-building.html +++ b/docs/html/gsignond-building.html @@ -2,18 +2,18 @@ -Building and installing the gsignond daemon - +gsignond API Reference Manual: Building and installing the gsignond daemon + - + - + @@ -63,7 +63,7 @@ are pkg-config and GNU make.

-
  • +

    • pkg-config is a tool for tracking the compilation flags needed for libraries that are used by the GSignond. (For each @@ -75,7 +75,7 @@

      GSignond depends on a number of other libraries.

      -
        +
        • The GLib library is the development framework that GSignond is built on. @@ -120,7 +120,7 @@ Sets the way in which GSignond is using DBus to communicate with the client library. dbus-type can be one of

          -
            +
            • 'p2p' which is the default and recommended value. GSignond will use direct connection over a UNIX domain socket @@ -141,6 +141,20 @@

            +

            --enable-keychain=sysctx.  + Sets the system security context of keychain UI process as returned by + the default + GSignondAccessControlManager. This value becomes written to the + gsignond.conf in addition to being encoded as default value + through config.h. +

            +

            --enable-storagedir=path.  + Sets the base path for user specific storage directories where + database files will be located as utilised by + + GSignondStorageManager. + Default location is /var/db +

          Building distribution packages

          @@ -156,6 +170,6 @@
          + Generated by GTK-Doc V1.20
        \ No newline at end of file diff --git a/docs/html/gsignond-plugin-loaders-overview.html b/docs/html/gsignond-plugin-loaders-overview.html new file mode 100644 index 0000000..6b60a1f --- /dev/null +++ b/docs/html/gsignond-plugin-loaders-overview.html @@ -0,0 +1,130 @@ + + + + +gsignond API Reference Manual: Overview of GSignond's authentication plugin subsystem + + + + + + + + + +
+ + + + + + +
+
+
+

Introduction

+

+ For security and flexibility reasons, authentication sessions in GSSO are performed + by authentication plugins that run in separate processes and communicate with + the GSSO daemon using D-Bus IPC. This page describes that IPC, and the + options that plugin writers have for implementing additional plugins. +

+
+
+

GLib plugins

+

+ The standard, most simple way to write plugins is by using GLib to + implement GSignondPlugin interface, + package the code as a shared library, and install the library into + gsso's standard location for GLib plugins. This approach is described + in detail in GSignondPlugin chapter. +

+
+
+

Plugin loaders

+

+ If using GLib to implement authentication plugins is undesirable or + impossible, you can provide a binary that implements a GSSO plugin + loader, which should be installed in + pkg-config gsignond --variable=pluginloadersdir. +

+

+ The GLib plugin loader that manages GLib-based plugins is a reference + implementation for such a loader. It is possible to fork and tweak its + code (as long as the IPC protocol, described below, is preserved), + or it's also possible to write such a loader from scratch. The source + code for the GLib plugin loader can be found + + here. +

+
+
+

Plugin loaders' command line options

+

+ The plugin loader binary should implement the following command line options: +

+
    +
  • +--list-plugins command line option + must be supported. The plugin loader binary should then list + available plugin names, one name per line, for example: +


    +                    > gsignond-plugind --list-plugins
    +                    password
    +                    ssotest
    +                    digest
    +                    

    + NOTE: it is recommended that plugin names are either hardcoded + in the plugin loader, or determined from plugin filenames in + the filesystem. It's less secure to determine the names by + loading the plugins' code and calling into each plugin. +
  • +
  • +--load-plugin=name command line option + must also be supported. The plugin loader binary should then + load and prepare the plugin with the corresponding name (or + simply prepare the plugin that is provided within the plugin + loader itself), and export a d-bus object on standard input and + output streams that gsso daemon will communicate with. The next + session describes this in more detail. +
  • +
+

+

+
+
+

Plugin loaders' D-Bus IPC

+

+ When run with a --load-plugin command line + option, the plugin loader process is expected to export a D-Bus object + on path "/" that implements + + this interface. +

+

+ The interface declarations map directly to the plugin API. See + GSignondPlugin interface for + the meaning of various methods, signals and properties. +

+

+ The object is exported on a connection that is formed from standard + input and standard output streams. This is the most secure way + to communicate with the gsso daemon, because these streams are visible + only to the two ends of the connection - the plugin loader process + and the parent process (the gsso daemon). +

+

+ NOTE: at the moment input and output should happen on two separate + streams, the standard input and the standard output respectively. + In the future, gsso will set both streams to the same + bidirectional channel, for compatibility with + + D-Bus' unixexec transport. +

+
+
+ + + \ No newline at end of file diff --git a/docs/html/gsignond.devhelp2 b/docs/html/gsignond.devhelp2 index 107f848..c362b01 100644 --- a/docs/html/gsignond.devhelp2 +++ b/docs/html/gsignond.devhelp2 @@ -8,21 +8,23 @@ - - - + + + + + - + - + @@ -30,7 +32,7 @@ - + @@ -41,280 +43,205 @@ - - - - - - - + + + + + - + - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/docs/html/index.html b/docs/html/index.html index 7f2313d..d84d1b7 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -2,11 +2,11 @@ -gsignond API Reference Manual - +gsignond API Reference Manual: gsignond API Reference Manual + - + @@ -23,7 +23,7 @@
-
+
GSignond building and installation
Building and installing the gsignond daemon @@ -37,16 +37,17 @@ General configuration — gSSO general configuration keys
-Database configuration — gSSO database configuration keys -
-
DBus configuration — gSSO dbus configuration keys
-
GSignond API for writing authentication plugins
+
Authentication plugins, plugin loaders and D-Bus IPC
+
+Overview of GSignond's authentication plugin subsystem +
+
GSignond API for writing GLib-based authentication plugins
-GSignondPlugin — an interface for implementing authentication plugins +GSignondPlugin — an interface for implementing GLib-based authentication plugins
GSignondDictionary — a dictionary container holding string keys and variant values @@ -58,7 +59,7 @@ GSignondSignonuiData — definitions for user interaction parameters
-
Standard in-tree authentication plugins
+
Standard in-tree authentication plugins
GSignondDigestPlugin — a plugin that performs HTTP Digest authentication @@ -70,7 +71,7 @@ GSignondPasswordPlugin — a plugin for retrieving the username/password
-
GSignond API for writing platform adaptation extensions
+
GSignond API for writing platform adaptation extensions
GSignondExtension — provides platform adaptation functionality @@ -91,7 +92,7 @@ GSignondCredentials — credentials (username, password) associated with an identity
-
Miscellaneous
+
Miscellaneous
Errors — error definitions and utilities @@ -111,6 +112,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/docs/html/index.sgml b/docs/html/index.sgml index 0a1fd7c..cb15578 100644 --- a/docs/html/index.sgml +++ b/docs/html/index.sgml @@ -5,377 +5,351 @@ - + + - - - - - + + + + - + + + - + + - + - - - - - - - - - - + - + + + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - - - - - - - - - - + - - + + + + + + + + - - + + + + - - + + + + + - + + + + - - - - - - - - - - + + + + + + + + + + - + - - - + + + - - - - - + + + - + + + + - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + - - - + + - - + - - - + + - - + - - - + + - + + - - - - + - - + + + + - - + + + - - - - + + + - + - + + + + - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + - - + + + - - - - - + - + + + + - - + + + - - - - - + + - + - - - - + + + + + + - + + - - - - - - - + - + + + + + + - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + + - - - - + + + + + - + + + - - - + + + + + + + + + + diff --git a/docs/html/object-tree.html b/docs/html/object-tree.html index 78b42ff..4aeea42 100644 --- a/docs/html/object-tree.html +++ b/docs/html/object-tree.html @@ -2,41 +2,43 @@ -Object Hierarchy - +gsignond API Reference Manual: Object Hierarchy + - + - +
-

-Object Hierarchy

+

+Object Hierarchy

     GObject
-        GSignondAccessControlManager
-        GSignondConfig
-        GSignondCredentials
-        GSignondDigestPlugin
-        GSignondExtension
-        GSignondPasswordPlugin
-        GSignondSecretStorage
-        GSignondSsoTestPlugin
-        GSignondStorageManager
+    ├── GSignondAccessControlManager
+    ├── GSignondConfig
+    ├── GSignondCredentials
+    ├── GSignondDigestPlugin
+    ├── GSignondExtension
+    ├── GSignondPasswordPlugin
+    ├── GSignondSecretStorage
+    ├── GSignondSsoTestPlugin
+    ╰── GSignondStorageManager
+    GInterface
+    ╰── GSignondPlugin
 
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/docs/html/style.css b/docs/html/style.css index 221d1bc..705a5c9 100644 --- a/docs/html/style.css +++ b/docs/html/style.css @@ -6,14 +6,18 @@ body { /* tango:aluminium 1/2 */ background: #eeeeec; - border: solid 1px #d3d7cf; + background: rgba(238, 238, 236, 0.5); + border: solid 1px rgb(238, 238, 236); padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ + /* fallback for no rgba support */ background: #e6f3ff; border: solid 1px #729fcf; + background: rgba(114, 159, 207, 0.1); + border: solid 1px rgba(114, 159, 207, 0.2); padding: 0.5em; } .variablelist @@ -31,7 +35,6 @@ body { position: relative; top: 0em ! important; - } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] @@ -50,16 +53,20 @@ body */ body { - padding-top: 3.2em; - padding-bottom: 20em; + padding-top: 5em; + padding-bottom: 500px; + max-width: 60em; + } + p + { + max-width: 60em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; - /* tango:aluminum 2 */ - background: #d3d7cf; - border: solid 1px #babdb6; + background: #e2e2e2; + border-bottom: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; top: 0; @@ -84,6 +91,42 @@ body font-size: 80%; white-space: nowrap; } + td.shortcuts .dim + { + color: #babdb6; + } +} +@media screen and (min-width: 60em) { + /* screen larger than 60em */ + body { margin: auto; } +} +@media screen and (max-width: 60em) { + /* screen less than 60em */ + #nav_hierarchy { display: none; } + #nav_interfaces { display: none; } + #nav_prerequisites { display: none; } + #nav_derived_interfaces { display: none; } + #nav_implementations { display: none; } + #nav_child_properties { display: none; } + #nav_style_properties { display: none; } + #nav_index { display: none; } + #nav_glossary { display: none; } + .gallery_image { display: none; } + .property_flags { display: none; } + .signal_flags { display: none; } + .parameter_annotations { display: none; } + .enum_member_annotations { display: none; } + .struct_member_annotations { display: none; } + .union_member_annotations { display: none; } + /* now that a column is hidden, optimize space */ + col.parameters_name { width: auto; } + col.parameters_description { width: auto; } + col.struct_members_name { width: auto; } + col.struct_members_description { width: auto; } + col.enum_members_name { width: auto; } + col.enum_members_description { width: auto; } + col.union_members_name { width: auto; } + col.union_members_description { width: auto; } } @media print { table.navigation { @@ -93,8 +136,7 @@ body div.titlepage table.navigation { visibility: visible; display: table; - /* tango:aluminum 2 */ - background: #d3d7cf; + background: #e2e2e2; border: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; @@ -136,6 +178,67 @@ a:hover color: #729fcf; } +div.informaltable table +{ + border-collapse: separate; + border-spacing: 20px 3px; + border: none; +} + +div.informaltable table td, div.informaltable table th +{ + vertical-align: top; +} + +.function_type, +.variable_type, +.property_type, +.signal_type, +.parameter_name, +.struct_member_name, +.union_member_name, +.define_keyword, +.datatype_keyword, +.typedef_keyword +{ + text-align: right; +} + +/* dim non-primary columns */ +.c_punctuation, +.function_type, +.variable_type, +.property_type, +.signal_type, +.define_keyword, +.datatype_keyword, +.typedef_keyword, +.property_flags, +.signal_flags, +.parameter_annotations, +.enum_member_annotations, +.struct_member_annotations, +.union_member_annotations +{ + color: #888a85; +} + +.function_type a, +.function_type a:visited, +.function_type a:hover, +.property_type a, +.property_type a:visited, +.property_type a:hover, +.signal_type a, +.signal_type a:visited, +.signal_type a:hover, +.signal_flags a, +.signal_flags a:visited, +.signal_flags a:hover +{ + color: #729fcf; +} + div.table table { border-collapse: collapse; @@ -158,6 +261,11 @@ div.table table th background-color: #d3d7cf; } +h4 +{ + color: #555753; +} + hr { /* tango:aluminium 1 */ @@ -166,6 +274,7 @@ hr border: none 0px; height: 1px; clear: both; + margin: 2.0em 0em 2.0em 0em; } dl.toc dt @@ -203,46 +312,57 @@ dl.toc > dt .informalfigure, .figure { - margin: 2em; + margin: 1em; } .informalexample, .example { - margin: 2em; + margin-top: 1em; + margin-bottom: 1em; } .warning { /* tango:orange 0/1 */ background: #ffeed9; + background: rgba(252, 175, 62, 0.1); border-color: #ffb04f; + border-color: rgba(252, 175, 62, 0.2); } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; + background: rgba(138, 226, 52, 0.1); border-color: #abf562; + border-color: rgba(138, 226, 52, 0.2); +} +div.blockquote +{ + border-color: #eeeeec; } -.note, .warning +.note, .warning, div.blockquote { padding: 0.5em; border-width: 1px; border-style: solid; margin: 2em; } -.note h3, .warning h3 +.note p, .warning p { - margin-top: 0.0em + margin: 0; } -.note p, .warning p + +div.warning h3.title, +div.note h3.title { - margin-bottom: 0.0em + display: none; } p + div.section { - margin-top: 2.5em; + margin-top: 1em; } div.refnamediv, @@ -252,7 +372,7 @@ div.refsect2, div.toc, div.section { - margin-bottom: 2.5em; + margin-bottom: 1em; } /* blob links */ @@ -265,11 +385,22 @@ h2 .extralinks, h3 .extralinks font-weight: normal; } +.lineart +{ + color: #d3d7cf; + font-weight: normal; +} + .annotation { /* tango:aluminium 5 */ color: #555753; - font-size: 80%; + font-weight: normal; +} + +.structfield +{ + font-style: normal; font-weight: normal; } @@ -292,6 +423,7 @@ h2 .extralinks, h3 .extralinks .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; + border: solid 1px rgba(114, 159, 207, 0.2); padding: 0px; } @@ -301,19 +433,27 @@ h2 .extralinks, h3 .extralinks padding: 0.5em; } .listing_lines { + /* this just adds visual clutter and + takes precious room from small screens */ + display: none; +} +.listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; + background: rgba(114, 159, 207, 0.2); /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; + background: rgba(114, 159, 207, 0.1); } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; + background: none; } .listing_lines pre, .listing_code pre { margin: 0px; diff --git a/docs/plugin-loaders-overview.xml b/docs/plugin-loaders-overview.xml new file mode 100644 index 0000000..5381042 --- /dev/null +++ b/docs/plugin-loaders-overview.xml @@ -0,0 +1,115 @@ + + + + + Overview of GSignond's authentication plugin subsystem + 3 + GSignond + + + + Introduction + + For security and flexibility reasons, authentication sessions in GSSO are performed + by authentication plugins that run in separate processes and communicate with + the GSSO daemon using D-Bus IPC. This page describes that IPC, and the + options that plugin writers have for implementing additional plugins. + + + + + GLib plugins + + The standard, most simple way to write plugins is by using GLib to + implement GSignondPlugin interface, + package the code as a shared library, and install the library into + gsso's standard location for GLib plugins. This approach is described + in detail in GSignondPlugin chapter. + + + + + Plugin loaders + + If using GLib to implement authentication plugins is undesirable or + impossible, you can provide a binary that implements a GSSO plugin + loader, which should be installed in + pkg-config gsignond --variable=pluginloadersdir. + + + The GLib plugin loader that manages GLib-based plugins is a reference + implementation for such a loader. It is possible to fork and tweak its + code (as long as the IPC protocol, described below, is preserved), + or it's also possible to write such a loader from scratch. The source + code for the GLib plugin loader can be found + + here. + + + + + Plugin loaders' command line options + + The plugin loader binary should implement the following command line options: + + + --list-plugins command line option + must be supported. The plugin loader binary should then list + available plugin names, one name per line, for example: + + > gsignond-plugind --list-plugins + password + ssotest + digest + + NOTE: it is recommended that plugin names are either hardcoded + in the plugin loader, or determined from plugin filenames in + the filesystem. It's less secure to determine the names by + loading the plugins' code and calling into each plugin. + + + --load-plugin=name command line option + must also be supported. The plugin loader binary should then + load and prepare the plugin with the corresponding name (or + simply prepare the plugin that is provided within the plugin + loader itself), and export a d-bus object on standard input and + output streams that gsso daemon will communicate with. The next + session describes this in more detail. + + + + + + + Plugin loaders' D-Bus IPC + + When run with a --load-plugin command line + option, the plugin loader process is expected to export a D-Bus object + on path "/" that implements + + this interface. + + + The interface declarations map directly to the plugin API. See + GSignondPlugin interface for + the meaning of various methods, signals and properties. + + + The object is exported on a connection that is formed from standard + input and standard output streams. This is the most secure way + to communicate with the gsso daemon, because these streams are visible + only to the two ends of the connection - the plugin loader process + and the parent process (the gsso daemon). + + + NOTE: at the moment input and output should happen on two separate + streams, the standard input and the standard output respectively. + In the future, gsso will set both streams to the same + bidirectional channel, for compatibility with + + D-Bus' unixexec transport. + + + diff --git a/docs/tmpl/gsignond-access-control-manager.sgml b/docs/tmpl/gsignond-access-control-manager.sgml deleted file mode 100644 index bfa562a..0000000 --- a/docs/tmpl/gsignond-access-control-manager.sgml +++ /dev/null @@ -1,102 +0,0 @@ - -GSignondAccessControlManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent_class: -@security_context_of_peer: -@peer_is_allowed_to_use_identity: -@peer_is_owner_of_identity: -@acl_is_valid: -@security_context_of_keychain: - - - - - - -@self: -@peer_ctx: -@identity_acl: -@Returns: - - - - - - - -@self: -@peer_ctx: -@owner_ctx: -@identity_acl: -@Returns: - - - - - - - -@self: -@peer_ctx: -@owner_ctx: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@peer_ctx: -@peer_fd: -@peer_service: -@peer_app_ctx: - - diff --git a/docs/tmpl/gsignond-config-db.sgml b/docs/tmpl/gsignond-config-db.sgml deleted file mode 100644 index 7d280e2..0000000 --- a/docs/tmpl/gsignond-config-db.sgml +++ /dev/null @@ -1,45 +0,0 @@ - -gsignond-config-db - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/tmpl/gsignond-config-dbus.sgml b/docs/tmpl/gsignond-config-dbus.sgml deleted file mode 100644 index acadcf1..0000000 --- a/docs/tmpl/gsignond-config-dbus.sgml +++ /dev/null @@ -1,52 +0,0 @@ - -gsignond-config-dbus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/tmpl/gsignond-config-general.sgml b/docs/tmpl/gsignond-config-general.sgml deleted file mode 100644 index 0f4bc08..0000000 --- a/docs/tmpl/gsignond-config-general.sgml +++ /dev/null @@ -1,80 +0,0 @@ - -gsignond-config-general - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/tmpl/gsignond-config.sgml b/docs/tmpl/gsignond-config.sgml deleted file mode 100644 index 8699ceb..0000000 --- a/docs/tmpl/gsignond-config.sgml +++ /dev/null @@ -1,84 +0,0 @@ - -GSignondConfig - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@self: -@key: -@Returns: - - - - - - - -@self: -@key: -@Returns: - - - - - - - -@Returns: - - - - - - - -@self: -@key: -@value: - - - - - - - -@self: -@key: -@value: - - diff --git a/docs/tmpl/gsignond-credentials.sgml b/docs/tmpl/gsignond-credentials.sgml deleted file mode 100644 index ea69e95..0000000 --- a/docs/tmpl/gsignond-credentials.sgml +++ /dev/null @@ -1,123 +0,0 @@ - -GSignondCredentials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@one: -@two: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@Returns: - - - - - - - -@self: -@id: -@username: -@password: -@Returns: - - - - - - - -@self: -@id: -@Returns: - - - - - - - -@self: -@password: -@Returns: - - - - - - - -@self: -@username: -@Returns: - - diff --git a/docs/tmpl/gsignond-dictionary.sgml b/docs/tmpl/gsignond-dictionary.sgml deleted file mode 100644 index 14dc8b7..0000000 --- a/docs/tmpl/gsignond-dictionary.sgml +++ /dev/null @@ -1,245 +0,0 @@ - -gsignond-dictionary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@other: -@Returns: - - - - - - - -@dict: -@key: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@variant: -@Returns: - - - - - - - -@dict: -@Returns: - - - - - - - -@dict: -@key: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@key: -@value: -@Returns: - - - - - - - -@dict: -@Returns: - - - - - - - -@dict: - - diff --git a/docs/tmpl/gsignond-digest-plugin.sgml b/docs/tmpl/gsignond-digest-plugin.sgml deleted file mode 100644 index c8d0d76..0000000 --- a/docs/tmpl/gsignond-digest-plugin.sgml +++ /dev/null @@ -1,37 +0,0 @@ - -GSignondDigestPlugin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent_class: - diff --git a/docs/tmpl/gsignond-error.sgml b/docs/tmpl/gsignond-error.sgml deleted file mode 100644 index 2c5f232..0000000 --- a/docs/tmpl/gsignond-error.sgml +++ /dev/null @@ -1,114 +0,0 @@ - -gsignond-error - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@GSIGNOND_ERROR_NONE: -@GSIGNOND_ERROR_UNKNOWN: -@GSIGNOND_ERROR_INTERNAL_SERVER: -@GSIGNOND_ERROR_INTERNAL_COMMUNICATION: -@GSIGNOND_ERROR_PERMISSION_DENIED: -@GSIGNOND_ERROR_ENCRYPTION_FAILURE: -@GSIGNOND_ERROR_AUTH_SERVICE_ERR: -@GSIGNOND_ERROR_METHOD_NOT_KNOWN: -@GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE: -@GSIGNOND_ERROR_INVALID_QUERY: -@GSIGNOND_ERROR_IDENTITY_ERR: -@GSIGNOND_ERROR_METHOD_NOT_AVAILABLE: -@GSIGNOND_ERROR_IDENTITY_NOT_FOUND: -@GSIGNOND_ERROR_STORE_FAILED: -@GSIGNOND_ERROR_REMOVE_FAILED: -@GSIGNOND_ERROR_SIGN_OUT_FAILED: -@GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED: -@GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE: -@GSIGNOND_ERROR_REFERENCE_NOT_FOUND: -@GSIGNOND_ERROR_AUTH_SESSION_ERR: -@GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE: -@GSIGNOND_ERROR_MISSING_DATA: -@GSIGNOND_ERROR_INVALID_CREDENTIALS: -@GSIGNOND_ERROR_NOT_AUTHORIZED: -@GSIGNOND_ERROR_WRONG_STATE: -@GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED: -@GSIGNOND_ERROR_NO_CONNECTION: -@GSIGNOND_ERROR_NETWORK: -@GSIGNOND_ERROR_SSL: -@GSIGNOND_ERROR_RUNTIME: -@GSIGNOND_ERROR_SESSION_CANCELED: -@GSIGNOND_ERROR_TIMED_OUT: -@GSIGNOND_ERROR_USER_INTERACTION: -@GSIGNOND_ERROR_OPERATION_FAILED: -@GSIGNOND_ERROR_ENCRYPTION_FAILED: -@GSIGNOND_ERROR_TOS_NOT_ACCEPTED: -@GSIGNOND_ERROR_FORGOT_PASSWORD: -@GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED: -@GSIGNOND_ERROR_INCORRECT_DATE: -@GSIGNOND_ERROR_USER_ERR: - - - - - - -@var: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@error: -@Returns: - - - - - - - -@err: -@message: -@...: - - diff --git a/docs/tmpl/gsignond-extension-interface.sgml b/docs/tmpl/gsignond-extension-interface.sgml deleted file mode 100644 index 215d44f..0000000 --- a/docs/tmpl/gsignond-extension-interface.sgml +++ /dev/null @@ -1,90 +0,0 @@ - -GSignondExtension - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent_class: -@get_extension_name: -@get_extension_version: -@get_storage_manager: -@get_secret_storage: -@get_access_control_manager: - - - - - - -@self: -@config: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@config: -@Returns: - - - - - - - -@self: -@config: -@Returns: - - - - - - - -@self: -@Returns: - - diff --git a/docs/tmpl/gsignond-log.sgml b/docs/tmpl/gsignond-log.sgml deleted file mode 100644 index a31bbc6..0000000 --- a/docs/tmpl/gsignond-log.sgml +++ /dev/null @@ -1,67 +0,0 @@ - -gsignond-log - - - - - - - - - - - - - - - - - - - - - - - - - - - -@frmt: -@...: - - - - - - - -@frmt: -@...: - - - - - - - -@frmt: -@...: - - - - - - - - - - - - - - -@frmt: -@...: - - diff --git a/docs/tmpl/gsignond-password-plugin.sgml b/docs/tmpl/gsignond-password-plugin.sgml deleted file mode 100644 index edf3bd9..0000000 --- a/docs/tmpl/gsignond-password-plugin.sgml +++ /dev/null @@ -1,37 +0,0 @@ - -GSignondPasswordPlugin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent_class: - diff --git a/docs/tmpl/gsignond-plugin-interface.sgml b/docs/tmpl/gsignond-plugin-interface.sgml deleted file mode 100644 index 1cfbef6..0000000 --- a/docs/tmpl/gsignond-plugin-interface.sgml +++ /dev/null @@ -1,164 +0,0 @@ - -GSignondPlugin - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent: -@cancel: -@request_initial: -@request: -@user_action_finished: -@refresh: - - - - - - -@GSIGNOND_PLUGIN_STATE_NONE: -@GSIGNOND_PLUGIN_STATE_RESOLVING: -@GSIGNOND_PLUGIN_STATE_CONNECTING: -@GSIGNOND_PLUGIN_STATE_SENDING_DATA: -@GSIGNOND_PLUGIN_STATE_WAITING: -@GSIGNOND_PLUGIN_STATE_USER_PENDING: -@GSIGNOND_PLUGIN_STATE_REFRESHING: -@GSIGNOND_PLUGIN_STATE_PROCESS_PENDING: -@GSIGNOND_PLUGIN_STATE_STARTED: -@GSIGNOND_PLUGIN_STATE_CANCELING: -@GSIGNOND_PLUGIN_STATE_DONE: -@GSIGNOND_PLUGIN_STATE_HOLDING: - - - - - - -@self: - - - - - - - -@self: -@error: - - - - - - - -@self: -@ui_data: - - - - - - - -@self: -@ui_data: - - - - - - - -@self: -@session_data: - - - - - - - -@self: -@session_data: -@identity_method_cache: -@mechanism: - - - - - - - -@self: -@session_data: - - - - - - - -@self: -@session_data: - - - - - - - -@self: -@state: -@message: - - - - - - - -@self: -@identity_method_cache: - - - - - - - -@self: -@ui_data: - - - - - - - -@self: -@ui_data: - - diff --git a/docs/tmpl/gsignond-secret-storage.sgml b/docs/tmpl/gsignond-secret-storage.sgml deleted file mode 100644 index d33c891..0000000 --- a/docs/tmpl/gsignond-secret-storage.sgml +++ /dev/null @@ -1,173 +0,0 @@ - -GSignondSecretStorage - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent_class: -@open_db: -@close_db: -@clear_db: -@is_open_db: -@load_credentials: -@update_credentials: -@remove_credentials: -@check_credentials: -@load_data: -@update_data: -@remove_data: -@get_last_error: - - - - - - -@self: -@creds: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@id: -@Returns: - - - - - - - -@self: -@id: -@method: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@id: -@Returns: - - - - - - - -@self: -@id: -@method: -@Returns: - - - - - - - -@self: -@creds: -@Returns: - - - - - - - -@self: -@id: -@method: -@data: -@Returns: - - diff --git a/docs/tmpl/gsignond-security-context.sgml b/docs/tmpl/gsignond-security-context.sgml deleted file mode 100644 index 717b7d2..0000000 --- a/docs/tmpl/gsignond-security-context.sgml +++ /dev/null @@ -1,192 +0,0 @@ - -gsignond-security-context - - - - - - - - - - - - - - - - - - - - - - - - - - - -@sys_ctx: -@app_ctx: - - - - - - - - - - - - -@reference: -@test: -@Returns: - - - - - - - -@ctx1: -@ctx2: -@Returns: - - - - - - - -@src_ctx: -@Returns: - - - - - - - -@ctx: - - - - - - - -@variant: -@Returns: - - - - - - - -@ctx: -@Returns: - - - - - - - -@ctx: -@Returns: - - - - - - - -@src_list: -@Returns: - - - - - - - -@seclist: - - - - - - - -@variant: -@Returns: - - - - - - - -@list: -@Returns: - - - - - - - -@ctx1: -@ctx2: -@Returns: - - - - - - - -@Returns: - - - - - - - -@system_context: -@application_context: -@Returns: - - - - - - - -@ctx: -@application_context: - - - - - - - -@ctx: -@system_context: - - - - - - - -@ctx: -@Returns: - - diff --git a/docs/tmpl/gsignond-session-data.sgml b/docs/tmpl/gsignond-session-data.sgml deleted file mode 100644 index d37ccb7..0000000 --- a/docs/tmpl/gsignond-session-data.sgml +++ /dev/null @@ -1,206 +0,0 @@ - -gsignond-session-data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@GSIGNOND_UI_POLICY_DEFAULT: -@GSIGNOND_UI_POLICY_REQUEST_PASSWORD: -@GSIGNOND_UI_POLICY_NO_USER_INTERACTION: -@GSIGNOND_UI_POLICY_VALIDATION: - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@network_timeout: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@renew_token: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@ui_policy: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@window_id: -@Returns: - - - - - - - -@data: -@caption: - - - - - - - -@data: -@network_proxy: - - - - - - - -@data: -@network_timeout: - - - - - - - -@data: -@realm: - - - - - - - -@data: -@renew_token: - - - - - - - -@data: -@secret: - - - - - - - -@data: -@ui_policy: - - - - - - - -@data: -@username: - - - - - - - -@data: -@window_id: - - diff --git a/docs/tmpl/gsignond-signonui-data.sgml b/docs/tmpl/gsignond-signonui-data.sgml deleted file mode 100644 index 9c8f234..0000000 --- a/docs/tmpl/gsignond-signonui-data.sgml +++ /dev/null @@ -1,395 +0,0 @@ - -gsignond-signonui-data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@SIGNONUI_ERROR_NONE: -@SIGNONUI_ERROR_GENERAL: -@SIGNONUI_ERROR_NO_SIGNONUI: -@SIGNONUI_ERROR_BAD_PARAMETERS: -@SIGNONUI_ERROR_CANCELED: -@SIGNONUI_ERROR_NOT_AVAILABLE: -@SIGNONUI_ERROR_BAD_URL: -@SIGNONUI_ERROR_BAD_CAPTCHA: -@SIGNONUI_ERROR_BAD_CAPTCHA_URL: -@SIGNONUI_ERROR_REFRESH_FAILED: -@SIGNONUI_ERROR_FORBIDDEN: -@SIGNONUI_ERROR_FORGOT_PASSWORD: - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@confirm: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@error: -@Returns: - - - - - - - -@data: -@query_password: -@Returns: - - - - - - - -@data: -@query_username: -@Returns: - - - - - - - -@data: -@remember_password: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@Returns: - - - - - - - -@data: -@response: - - - - - - - -@data: -@url: - - - - - - - -@data: -@caption: - - - - - - - -@data: -@confirm: - - - - - - - -@data: -@url: - - - - - - - -@data: -@forgot: - - - - - - - -@data: -@url: - - - - - - - -@data: -@message: - - - - - - - -@data: -@url: - - - - - - - -@data: -@password: - - - - - - - -@data: -@error: - - - - - - - -@data: -@query: - - - - - - - -@data: -@query: - - - - - - - -@data: -@remember: - - - - - - - -@data: -@id: - - - - - - - -@data: -@reply: - - - - - - - -@data: -@title: - - - - - - - -@data: -@response: - - - - - - - -@data: -@username: - - diff --git a/docs/tmpl/gsignond-ssotest-plugin.sgml b/docs/tmpl/gsignond-ssotest-plugin.sgml deleted file mode 100644 index 814f309..0000000 --- a/docs/tmpl/gsignond-ssotest-plugin.sgml +++ /dev/null @@ -1,37 +0,0 @@ - -GSignondSsoTestPlugin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent_class: - diff --git a/docs/tmpl/gsignond-storage-manager.sgml b/docs/tmpl/gsignond-storage-manager.sgml deleted file mode 100644 index 0592e59..0000000 --- a/docs/tmpl/gsignond-storage-manager.sgml +++ /dev/null @@ -1,102 +0,0 @@ - -GSignondStorageManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@parent_class: -@initialize_storage: -@delete_storage: -@storage_is_initialized: -@mount_filesystem: -@unmount_filesystem: -@filesystem_is_mounted: - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - - - - - - -@self: -@Returns: - - diff --git a/docs/tmpl/gsignond-unused.sgml b/docs/tmpl/gsignond-unused.sgml deleted file mode 100644 index e69de29..0000000 diff --git a/docs/tmpl/gsignond-utils.sgml b/docs/tmpl/gsignond-utils.sgml deleted file mode 100644 index ef2226d..0000000 --- a/docs/tmpl/gsignond-utils.sgml +++ /dev/null @@ -1,50 +0,0 @@ - -gsignond-utils - - - - - - - - - - - - - - - - - - - - - - - - - - - -@Returns: - - - - - - - -@dirname: -@Returns: - - - - - - - -@filename: -@Returns: - - diff --git a/gsignond-uninstalled.pc.in b/gsignond-uninstalled.pc.in index c17bca5..ca71657 100644 --- a/gsignond-uninstalled.pc.in +++ b/gsignond-uninstalled.pc.in @@ -6,7 +6,8 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@abs_top_builddir@/include -pluginsdir=@libdir@/@PACKAGE@/plugins +gpluginsdir=@libdir@/@PACKAGE@/gplugins +pluginloadersdir = @libdir@/@PACKAGE@/pluginloaders extensionsdir=@libdir@/@PACKAGE@/extensions Name: @PACKAGE_NAME@ diff --git a/gsignond.conf b/gsignond.conf.in similarity index 61% rename from gsignond.conf rename to gsignond.conf.in index dd56fe4..608f239 100644 --- a/gsignond.conf +++ b/gsignond.conf.in @@ -7,37 +7,19 @@ # [General] -# Directory for binary executables. -#BinDir = -# # Define extension / platform adaptation module to use. # 'default' is a dummy one with no encrypted storage, but with basic Unix # discretionary access control. #Extension = default # -# Extension directory where extension modules are located. -#ExtensionsDir = -# # Base path where user specific database directories will be located. -# Default: /var/db -#StoragePath = -# -# Location for authentication plugins. -#PluginDir = +@BASE_STORAGE_DIR@ # # Timeout for unloading cached plugin instances. #PluginTimeout = 0 - -# -# Database related settings. -# -[Storage] - -# File name for the metadata database. (excluding path) -#MetadataDBFilename = metadata.db # -# File name for the credential database. (excluding path) -#SecretDBFilename = secret.db +# System security context of the keychain UI +@KEYCHAIN_SYSCTX@ # # D-Bus related settings. diff --git a/gsignond.pc.in b/gsignond.pc.in index ae81423..7e23968 100644 --- a/gsignond.pc.in +++ b/gsignond.pc.in @@ -3,7 +3,8 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ -pluginsdir=@libdir@/@PACKAGE@/plugins +gpluginsdir=@libdir@/@PACKAGE@/gplugins +pluginloadersdir = @libdir@/@PACKAGE@/pluginloaders extensionsdir=@libdir@/@PACKAGE@/extensions Name: @PACKAGE_NAME@ diff --git a/gtk-doc.make b/gtk-doc.make index ac30c4c..e791656 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -33,9 +33,9 @@ EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) -DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ +DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ - tmpl.stamp sgml.stamp html.stamp pdf.stamp + sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -49,9 +49,13 @@ REPORT_FILES = \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) +gtkdoc-check.test: Makefile + $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ + echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ + chmod +x $@ + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test -if ENABLE_GTK_DOC if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else @@ -63,9 +67,11 @@ else PDF_BUILD_STAMP= endif -all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -else -all-local: +all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +.PHONY: all-gtk-doc + +if ENABLE_GTK_DOC +all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @@ -83,16 +89,16 @@ setup-build.stamp: files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ - cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ - test -d $(abs_srcdir)/tmpl && \ - { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ - chmod -R u+w $(abs_builddir)/tmpl; } \ fi $(AM_V_at)touch setup-build.stamp + #### scan #### GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) @@ -103,7 +109,7 @@ GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) +scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @@ -129,35 +135,14 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true -#### templates #### - -GTK_DOC_V_TMPL=$(GTK_DOC_V_TMPL_$(V)) -GTK_DOC_V_TMPL_=$(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_TMPL_0=@echo " DOC Rebuilding template files"; - -tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - if test -w $(abs_srcdir) ; then \ - cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ - fi \ - fi - $(AM_V_at)touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -$(srcdir)/tmpl/*.sgml: - @true - #### xml #### GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0=@echo " DOC Building XML"; -sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - -$(GTK_DOC_V_XML)chmod -R u+w $(srcdir) && _source_dir='' ; \ +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) + $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ @@ -235,13 +220,15 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) clean-local: @rm -f *~ *.bak @rm -rf .libs + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ + rm -f $(DOC_MODULE).types; \ + fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ - rm -rf tmpl; \ fi maintainer-clean-local: @@ -280,18 +267,18 @@ uninstall-local: # # Require gtk-doc when making dist # -if ENABLE_GTK_DOC +if HAVE_GTK_DOC dist-check-gtkdoc: docs else dist-check-gtkdoc: - @echo "*** gtk-doc must be installed and enabled in order to make dist" + @echo "*** gtk-doc is needed to run 'make dist'. ***" + @echo "*** gtk-doc was not found when 'configure' ran. ***" + @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif -dist-hook: dist-check-gtkdoc dist-hook-local - @mkdir $(distdir)/tmpl +dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/html - @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ diff --git a/include/gsignond/gsignond-config-db.h b/include/gsignond/gsignond-config-db.h deleted file mode 100644 index 555a711..0000000 --- a/include/gsignond/gsignond-config-db.h +++ /dev/null @@ -1,63 +0,0 @@ -/* vi: set et sw=4 ts=4 cino=t0,(0: */ -/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of gsignond - * - * Copyright (C) 2012 Intel Corporation. - * - * Contact: Amarnath Valluri - * - * 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.1 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., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -#ifndef __GSIGNOND_CONFIG_DB_H_ -#define __GSIGNOND_CONFIG_DB_H_ - -/** - * SECTION:gsignond-config-db - * @title: Database configuration - * @short_description: gSSO database configuration keys - * @include: gsignond/gsignond-config.h - * - * Database configuration keys are defined below. See #GSignondConfig for how to use them. - */ - -/** - * GSIGNOND_CONFIG_DB_SSO: - * - * A prefix for database keys. Should be used only when defining new keys. - */ -#define GSIGNOND_CONFIG_DB_SSO "Storage" -/** - * GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME: - * - * The filename of the credentials database. - * - * Default value: "secret.db". - */ -#define GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME GSIGNOND_CONFIG_DB_SSO \ - "/SecretDBFilename" -/** - * GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME: - * - * The filename of the metadata database. - * - * Default value: "metadata.db". - */ -#define GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME GSIGNOND_CONFIG_DB_SSO \ - "/MetadataDBFilename" - -#endif /* __GSIGNOND_DB_CONFIG_H_ */ diff --git a/include/gsignond/gsignond-config-general.h b/include/gsignond/gsignond-config-general.h index 7538c6a..4945f5c 100644 --- a/include/gsignond/gsignond-config-general.h +++ b/include/gsignond/gsignond-config-general.h @@ -41,6 +41,7 @@ * A prefix for general keys. Should be used only when defining new keys. */ #define GSIGNOND_CONFIG_GENERAL "General" + /** * GSIGNOND_CONFIG_GENERAL_STORAGE_PATH: * @@ -52,38 +53,6 @@ #define GSIGNOND_CONFIG_GENERAL_STORAGE_PATH GSIGNOND_CONFIG_GENERAL \ "/StoragePath" /** - * GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR: - * - * The path where gSSO is looking for available extension modules. - * - * Default value: $(pkglibdir)/extensions, can be overriden in debug - * builds by setting SSO_EXTENSIONS_DIR environment variable. - */ -#define GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR GSIGNOND_CONFIG_GENERAL \ - "/ExtensionsDir" -/** - * GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR: - * - * The path where gSSO is looking for available plugins. - * - * Default value: $(pkglibdir)/plugins, can be overriden in debug - * builds by setting SSO_PLUGINS_DIR environment variable. - */ -#define GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR GSIGNOND_CONFIG_GENERAL \ - "/PluginsDir" -/** - * GSIGNOND_CONFIG_GENERAL_BIN_DIR: - * - * The path where gSSO is looking for the gsignond-plugind binary when it needs - * to start a plugin process. Can be used for finding other supplementary binaries in - * the future. - * - * Default value: $(bindir), can be overriden in debug - * builds by setting SSO_BIN_DIR environment variable. - */ -#define GSIGNOND_CONFIG_GENERAL_BIN_DIR GSIGNOND_CONFIG_GENERAL \ - "/BinDir" -/** * GSIGNOND_CONFIG_GENERAL_EXTENSION: * * The name of the gSSO extension to use. If not specified, the default @@ -99,6 +68,9 @@ * * Path provided by #GSignondStorageManager for storing user-specific * information, including secret and metadata databases. + * + * This is a run-time value and any value read from configuration file + * is overwritten. * * Value provided by the default implementation: * #GSIGNOND_CONFIG_GENERAL_STORAGE_PATH + "/gsignond." + g_get_user_name(). @@ -117,4 +89,16 @@ #define GSIGNOND_CONFIG_PLUGIN_TIMEOUT GSIGNOND_CONFIG_GENERAL \ "/PluginTimeout" +/** + * GSIGNOND_CONFIG_GENERAL_KEYCHAIN_SYSCTX: + * + * System security context of the keychain UI process + * (see #GSignondAccessControlManager). + * + * Default value can be defined through configure --enable-keychain flag (see + * Building gsignond). + */ +#define GSIGNOND_CONFIG_GENERAL_KEYCHAIN_SYSCTX GSIGNOND_CONFIG_GENERAL \ + "/KeychainSystemContext" + #endif /* __GSIGNOND_GENERAL_CONFIG_H_ */ diff --git a/include/gsignond/gsignond-config.h b/include/gsignond/gsignond-config.h index edcdaa4..6fc97cc 100644 --- a/include/gsignond/gsignond-config.h +++ b/include/gsignond/gsignond-config.h @@ -30,7 +30,6 @@ #include #include "gsignond-config-general.h" -#include "gsignond-config-db.h" #include "gsignond-config-dbus.h" G_BEGIN_DECLS diff --git a/include/gsignond/gsignond-dictionary.h b/include/gsignond/gsignond-dictionary.h index d34944f..9175d7a 100644 --- a/include/gsignond/gsignond-dictionary.h +++ b/include/gsignond/gsignond-dictionary.h @@ -59,6 +59,9 @@ gsignond_dictionary_new_from_variant (GVariant *variant); GVariant * gsignond_dictionary_to_variant (GSignondDictionary *dict); +GVariantBuilder * +gsignond_dictionary_to_variant_builder (GSignondDictionary *dict); + GVariant * gsignond_dictionary_get (GSignondDictionary *dict, const gchar *key); @@ -116,6 +119,9 @@ gsignond_dictionary_set_string (GSignondDictionary *dict, const gchar *key, gboolean gsignond_dictionary_remove (GSignondDictionary *dict, const gchar *key); +gboolean +gsignond_dictionary_contains (GSignondDictionary *dict, const gchar *key); + G_END_DECLS #endif /* __GSIGNOND_DICTIONARY_H__ */ diff --git a/include/gsignond/gsignond-identity-info.h b/include/gsignond/gsignond-identity-info.h deleted file mode 100644 index be6d318..0000000 --- a/include/gsignond/gsignond-identity-info.h +++ /dev/null @@ -1,187 +0,0 @@ -/* vi: set et sw=4 ts=4 cino=t0,(0: */ -/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of gsignond - * - * Copyright (C) 2012-2013 Intel Corporation. - * - * Contact: Imran Zaman - * - * 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.1 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., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -#ifndef __GSIGNOND_IDENTITY_INFO_H__ -#define __GSIGNOND_IDENTITY_INFO_H__ - -#include -#include -#include -#include - -G_BEGIN_DECLS - -#define GSIGNOND_TYPE_IDENTITY_INFO (GSIGNOND_TYPE_DICTIONARY) - -#define GSIGNOND_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - GSIGNOND_TYPE_IDENTITY_INFO, \ - GSignondIdentityInfo)) -#define GSIGNOND_IS_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ - GSIGNOND_TYPE_IDENTITY_INFO)) - -typedef GSignondDictionary GSignondIdentityInfo; -typedef GList GSignondIdentityInfoList; - -GSignondIdentityInfo * -gsignond_identity_info_new (void); - -GSignondIdentityInfo * -gsignond_identity_info_copy (GSignondIdentityInfo *info); - -void -gsignond_identity_info_ref (GSignondIdentityInfo *info); - -void -gsignond_identity_info_unref (GSignondIdentityInfo *info); - -guint32 -gsignond_identity_info_get_id (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_id ( - GSignondIdentityInfo *info, - guint32 id); - -gboolean -gsignond_identity_info_get_is_identity_new (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_identity_new (GSignondIdentityInfo *info); - -const gchar * -gsignond_identity_info_get_username (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_username ( - GSignondIdentityInfo *info, - const gchar *username); - -void -gsignond_identity_info_remove_username (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_get_is_username_secret (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_username_secret ( - GSignondIdentityInfo *info, - gboolean username_secret); - -const gchar * -gsignond_identity_info_get_secret (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_secret ( - GSignondIdentityInfo *info, - const gchar *secret); - -void -gsignond_identity_info_remove_secret (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_get_store_secret (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_store_secret ( - GSignondIdentityInfo *info, - gboolean store_secret); - -const gchar * -gsignond_identity_info_get_caption (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_caption ( - GSignondIdentityInfo *info, - const gchar *caption); - -GSequence * -gsignond_identity_info_get_realms (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_realms ( - GSignondIdentityInfo *info, - GSequence *realms); - -GHashTable * -gsignond_identity_info_get_methods (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_methods ( - GSignondIdentityInfo *info, - GHashTable *methods); - -GSequence * -gsignond_identity_info_get_mechanisms ( - GSignondIdentityInfo *info, - const gchar *method); - -gboolean -gsignond_identity_info_remove_method ( - GSignondIdentityInfo *info, - const gchar *method); - -GSignondSecurityContextList * -gsignond_identity_info_get_access_control_list (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_access_control_list ( - GSignondIdentityInfo *info, - const GSignondSecurityContextList *acl); - -GSignondSecurityContext * -gsignond_identity_info_get_owner (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_owner ( - GSignondIdentityInfo *info, - const GSignondSecurityContext *owner); - -gboolean -gsignond_identity_info_get_validated (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_validated ( - GSignondIdentityInfo *info, - gboolean validated); - -guint32 -gsignond_identity_info_get_identity_type (GSignondIdentityInfo *info); - -gboolean -gsignond_identity_info_set_identity_type ( - GSignondIdentityInfo *info, - guint32 type); - -gboolean -gsignond_identity_info_compare ( - GSignondIdentityInfo *info, - GSignondIdentityInfo *other); - -void -gsignond_identity_info_list_free (GSignondIdentityInfoList *list); - -G_END_DECLS - -#endif /* __GSIGNOND_IDENTITY_INFO_H__ */ diff --git a/include/gsignond/gsignond-session-data.h b/include/gsignond/gsignond-session-data.h index 4ca4865..adf4b66 100644 --- a/include/gsignond/gsignond-session-data.h +++ b/include/gsignond/gsignond-session-data.h @@ -71,6 +71,12 @@ void gsignond_session_data_set_realm (GSignondSessionData *data, const gchar *realm); +GSequence * +gsignond_session_data_get_allowed_realms (GSignondSessionData *data); + +void +gsignond_session_data_set_allowed_realms (GSignondSessionData *data, + GSequence *realms); const gchar * gsignond_session_data_get_caption (GSignondSessionData *data); diff --git a/include/gsignond/gsignond-signonui.h b/include/gsignond/gsignond-signonui.h deleted file mode 100644 index 72c5393..0000000 --- a/include/gsignond/gsignond-signonui.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _GSIGNOND_SIGNONUI_H_ -#define _GSIGNOND_SIGNONUI_H_ - -/** - * @GSignondSignonuiError: - * @SIGNONUI_ERROR_NONE: No errors - * @SIGNONUI_ERROR_GENERAL: Generic error during interaction - * @SIGNONUI_ERROR_NO_SIGNONUI: Cannot send request to signon-ui - * @SIGNONUI_ERROR_BAD_PARAMETERS:Signon-Ui cannot create dialog based on the given UiSessionData - * @SIGNONUI_ERROR_CANCELED: User canceled action. Plugin should not retry automatically after this - * @SIGNONUI_ERROR_NOT_AVAILABLE: Requested ui is not available. For example browser cannot be started - * @SIGNONUI_ERROR_BAD_URL: Given url was not valid - * @SIGNONUI_ERROR_BAD_CAPTCHA: Given captcha image was not valid - * @SIGNONUI_ERROR_BAD_CAPTCHA_URL: Given url for capctha loading was not valid - * @SIGNONUI_ERROR_REFRESH_FAILED: Refresh failed - * @SIGNONUI_ERROR_FORBIDDEN: Showing ui forbidden by ui policy - * @SIGNONUI_ERROR_FORGOT_PASSWORD: User pressed forgot password - */ -typedef enum { - SIGNONUI_ERROR_NONE = 0, - SIGNONUI_ERROR_GENERAL, - SIGNONUI_ERROR_NO_SIGNONUI, - SIGNONUI_ERROR_BAD_PARAMETERS, - SIGNONUI_ERROR_CANCELED, - SIGNONUI_ERROR_NOT_AVAILABLE, - SIGNONUI_ERROR_BAD_URL, - SIGNONUI_ERROR_BAD_CAPTCHA, - SIGNONUI_ERROR_BAD_CAPTCHA_URL, - SIGNONUI_ERROR_REFRESH_FAILED, - SIGNONUI_ERROR_FORBIDDEN, - SIGNONUI_ERROR_FORGOT_PASSWORD -} GSignondSignonuiError; - -#endif //_GSIGNOND_SIGNONUI_H_ diff --git a/include/gsignond/gsignond-utils.h b/include/gsignond/gsignond-utils.h index 66c0202..cc35837 100644 --- a/include/gsignond/gsignond-utils.h +++ b/include/gsignond/gsignond-utils.h @@ -39,6 +39,24 @@ gsignond_wipe_directory (const gchar *dirname); gchar * gsignond_generate_nonce (); +GVariant * +gsignond_sequence_to_variant (GSequence *seq); + +GSequence * +gsignond_variant_to_sequence (GVariant *var); + +gchar ** +gsignond_sequence_to_array (GSequence *seq); + +GSequence * +gsignond_array_to_sequence (gchar **items); + +GSequence * +gsignond_copy_array_to_sequence (const gchar **items); + +gboolean +gsignond_is_host_in_domain(const gchar *host, const gchar *domain); + G_END_DECLS #endif /* _SGINOND_UTILS_H_ */ diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 index ac2eccb..3675543 100644 --- a/m4/gtk-doc.m4 +++ b/m4/gtk-doc.m4 @@ -1,6 +1,6 @@ dnl -*- mode: autoconf -*- -# serial 1 +# serial 2 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) @@ -10,8 +10,24 @@ AC_DEFUN([GTK_DOC_CHECK], AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) + AC_MSG_CHECKING([for gtk-doc]) + PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) + AC_MSG_RESULT($have_gtk_doc) + + if test "$have_gtk_doc" = "no"; then + AC_MSG_WARN([ + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found.]) + fi + dnl check for tools we added during development - AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that + dnl may not be writable by the user. Currently, automake requires that the + dnl test name must end in '.test'. + dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638 + AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test]) + AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) @@ -28,22 +44,22 @@ AC_DEFUN([GTK_DOC_CHECK], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) - if test x$enable_gtk_doc = xyes; then - ifelse([$1],[], - [PKG_CHECK_EXISTS([gtk-doc],, - AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], - [PKG_CHECK_EXISTS([gtk-doc >= $1],, - AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) - dnl don't check for glib if we build glib - if test "x$PACKAGE_NAME" != "xglib"; then - dnl don't fail if someone does not have glib - PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) - fi - fi - AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + AC_MSG_ERROR([ + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '[$]0'.]) + fi + + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) + fi + dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], @@ -63,6 +79,7 @@ AC_DEFUN([GTK_DOC_CHECK], fi AC_SUBST([AM_DEFAULT_VERBOSITY]) + AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes]) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) diff --git a/packaging/gsignond.changes b/packaging/gsignond.changes index 0fc9fd8..ca4ba25 100644 --- a/packaging/gsignond.changes +++ b/packaging/gsignond.changes @@ -1,3 +1,18 @@ +* Fri Mar 07 2014 Jussi Laako +- Release 1.0.1 + +* Thu Mar 06 2014 Imran Zaman +- Release 1.0.0 +- Assorted fixes and cleanups, updated version +- docs: add documentation for multple plugin loaders +- Update .gitignore +- plugins: simplify process killing +- plugind: export the plugin object on d-bus after connecting all the signals and setting properties +- Other memory leak and bug fixes + +* Fri Feb 28 2014 Jussi Laako +- Release 0.0.4 + * Thu Aug 22 2013 Amarnath Valluri - Release 0.0.3 - Bug fixes in UI interaction diff --git a/packaging/gsignond.manifest b/packaging/gsignond.manifest new file mode 100644 index 0000000..75b0fa5 --- /dev/null +++ b/packaging/gsignond.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/gsignond.spec b/packaging/gsignond.spec index 8ee6300..6c87b52 100644 --- a/packaging/gsignond.spec +++ b/packaging/gsignond.spec @@ -6,11 +6,13 @@ Name: gsignond Summary: GLib based Single Sign-On daemon -Version: 0.0.3 +Version: 1.0.1 Release: 1 Group: System/Daemons License: LGPL-2.1+ Source: %{name}-%{version}.tar.gz +URL: https://01.org/gsso +Source1001: %{name}.manifest Provides: gsignon %if %{dbus_type} != "p2p" Requires: dbus-1 @@ -50,12 +52,6 @@ Requires: %{name} = %{version}-%{release} %prep %setup -q -n %{name}-%{version} -if [ -f = "gtk-doc.make" ] -then -rm gtk-doc.make -fi -touch gtk-doc.make -autoreconf -f -i %build @@ -71,12 +67,13 @@ make %{?_smp_mflags} %install rm -rf %{buildroot} %make_install +cp -a %{SOURCE1001} %{buildroot}%{_datadir}/%{name}.manifest %post /sbin/ldconfig chmod u+s %{_bindir}/%{name} -groupadd -f -r gsignond +getent group gsignond > /dev/null || /usr/sbin/groupadd -r gsignond %postun -p /sbin/ldconfig @@ -84,12 +81,13 @@ groupadd -f -r gsignond %files %defattr(-,root,root,-) +%manifest %{_datadir}/%{name}.manifest %doc AUTHORS COPYING.LIB INSTALL NEWS README %{_bindir}/%{name} -%{_bindir}/%{name}-plugind %{_libdir}/lib%{name}-*.so.* %{_libdir}/%{name}/extensions/*.so* -%{_libdir}/%{name}/plugins/*.so* +%{_libdir}/%{name}/gplugins/*.so* +%{_libdir}/%{name}/pluginloaders/%{name}-plugind %if %{dbus_type} != "p2p" %{_datadir}/dbus-1/services/*SingleSignOn*.service %endif diff --git a/src/Makefile.am b/src/Makefile.am index 3800c38..b5202ec 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS=common daemon extensions plugins +SUBDIRS=common daemon gplugind extensions plugins diff --git a/src/Makefile.in b/src/Makefile.in index 270afdc..c00a8c9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,23 +15,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -79,11 +62,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -126,6 +104,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -152,6 +131,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -164,6 +144,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -256,7 +237,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = common daemon extensions plugins +SUBDIRS = common daemon gplugind extensions plugins all: all-recursive .SUFFIXES: @@ -464,10 +445,13 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/src/common/Makefile.am b/src/common/Makefile.am index b89d47e..baf7098 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -32,9 +32,7 @@ libgsignond_common_la_CPPFLAGS = \ -I$(top_srcdir)/include \ -I. \ $(GSIGNOND_CFLAGS) \ - -DGSIGNOND_PLUGINS_DIR='"$(pluginsdir)"' \ - -DGSIGNOND_EXTENSIONS_DIR='"$(extensionsdir)"' \ - -DGSIGNOND_BIN_DIR='"$(bindir)"' \ + -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \ -DGSIGNOND_SYSCONF_DIR='"$(sysconfdir)"' \ $(NULL) @@ -62,8 +60,6 @@ libgsignond_common_la_SOURCES = \ gsignond-dictionary.c \ gsignond-session-data.c \ gsignond-signonui-data.c \ - gsignond-plugin-loader.h \ - gsignond-plugin-loader.c \ gsignond-utils.c \ gsignond-pipe-stream.h \ gsignond-pipe-stream.c \ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index ddf1481..d26d2c7 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -112,7 +95,6 @@ am_libgsignond_common_la_OBJECTS = \ libgsignond_common_la-gsignond-dictionary.lo \ libgsignond_common_la-gsignond-session-data.lo \ libgsignond_common_la-gsignond-signonui-data.lo \ - libgsignond_common_la-gsignond-plugin-loader.lo \ libgsignond_common_la-gsignond-utils.lo \ libgsignond_common_la-gsignond-pipe-stream.lo \ libgsignond_common_la-gsignond-disposable.lo $(am__objects_2) \ @@ -160,11 +142,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -207,6 +184,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -233,6 +211,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -245,6 +224,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -338,7 +318,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ extensionsdir = $(pkglibdir)/extensions -pluginsdir = $(pkglibdir)/plugins +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins SUBDIRS = db NULL = lib_LTLIBRARIES = libgsignond-common.la @@ -354,9 +335,7 @@ libgsignond_common_la_CPPFLAGS = \ -I$(top_srcdir)/include \ -I. \ $(GSIGNOND_CFLAGS) \ - -DGSIGNOND_PLUGINS_DIR='"$(pluginsdir)"' \ - -DGSIGNOND_EXTENSIONS_DIR='"$(extensionsdir)"' \ - -DGSIGNOND_BIN_DIR='"$(bindir)"' \ + -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \ -DGSIGNOND_SYSCONF_DIR='"$(sysconfdir)"' \ $(NULL) @@ -384,8 +363,6 @@ libgsignond_common_la_SOURCES = \ gsignond-dictionary.c \ gsignond-session-data.c \ gsignond-signonui-data.c \ - gsignond-plugin-loader.h \ - gsignond-plugin-loader.c \ gsignond-utils.c \ gsignond-pipe-stream.h \ gsignond-pipe-stream.c \ @@ -442,6 +419,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -449,8 +427,6 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -492,7 +468,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_common_la-gsignond-pipe-stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_common_la-gsignond-plugin-enum-types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_common_la-gsignond-plugin-interface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_common_la-gsignond-plugin-loader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_common_la-gsignond-security-context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_common_la-gsignond-session-data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_common_la-gsignond-signonui-data.Plo@am__quote@ @@ -607,13 +582,6 @@ libgsignond_common_la-gsignond-signonui-data.lo: gsignond-signonui-data.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_common_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_common_la-gsignond-signonui-data.lo `test -f 'gsignond-signonui-data.c' || echo '$(srcdir)/'`gsignond-signonui-data.c -libgsignond_common_la-gsignond-plugin-loader.lo: gsignond-plugin-loader.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_common_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_common_la-gsignond-plugin-loader.lo -MD -MP -MF $(DEPDIR)/libgsignond_common_la-gsignond-plugin-loader.Tpo -c -o libgsignond_common_la-gsignond-plugin-loader.lo `test -f 'gsignond-plugin-loader.c' || echo '$(srcdir)/'`gsignond-plugin-loader.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_common_la-gsignond-plugin-loader.Tpo $(DEPDIR)/libgsignond_common_la-gsignond-plugin-loader.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-plugin-loader.c' object='libgsignond_common_la-gsignond-plugin-loader.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_common_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_common_la-gsignond-plugin-loader.lo `test -f 'gsignond-plugin-loader.c' || echo '$(srcdir)/'`gsignond-plugin-loader.c - libgsignond_common_la-gsignond-utils.lo: gsignond-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_common_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_common_la-gsignond-utils.lo -MD -MP -MF $(DEPDIR)/libgsignond_common_la-gsignond-utils.Tpo -c -o libgsignond_common_la-gsignond-utils.lo `test -f 'gsignond-utils.c' || echo '$(srcdir)/'`gsignond-utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_common_la-gsignond-utils.Tpo $(DEPDIR)/libgsignond_common_la-gsignond-utils.Plo @@ -815,10 +783,13 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/src/common/db/Makefile.in b/src/common/db/Makefile.in index 6faf597..8aa00fa 100644 --- a/src/common/db/Makefile.in +++ b/src/common/db/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -107,11 +90,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgsignond_common_db_la_SOURCES) DIST_SOURCES = $(libgsignond_common_db_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -123,6 +101,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -149,6 +128,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -161,6 +141,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ diff --git a/src/common/db/gsignond-secret-storage.c b/src/common/db/gsignond-secret-storage.c index 97e021d..42a8f57 100644 --- a/src/common/db/gsignond-secret-storage.c +++ b/src/common/db/gsignond-secret-storage.c @@ -29,6 +29,8 @@ #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-secret-storage.h" +#define GSIGNOND_SECRET_DB_FILENAME "secret.db" + /** * SECTION:gsignond-secret-storage * @short_description: provides access to the database that stores user credentials and identity/method cache @@ -129,7 +131,6 @@ static gboolean _open_db (GSignondSecretStorage *self) { const gchar *dir = NULL; - const gchar *filename = NULL; gchar *db_filename = NULL; gboolean ret = FALSE; @@ -142,13 +143,7 @@ _open_db (GSignondSecretStorage *self) ERR ("No directory specified in config object for secret db..."); return FALSE; } - filename = gsignond_config_get_string (self->config, - GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME); - if (!filename) { - ERR ("Database filename not specified"); - return FALSE; - } - db_filename = g_build_filename (dir, filename, NULL); + db_filename = g_build_filename (dir, GSIGNOND_SECRET_DB_FILENAME, NULL); if (!db_filename) { ERR ("Invalid db filename..."); return FALSE; @@ -376,7 +371,7 @@ gsignond_secret_storage_init (GSignondSecretStorage *self) * * Opens (and initializes) the database. The implementation should take * care of creating the DB, if it doesn't exist, and it should use - * #GSIGNOND_CONFIG_GENERAL_SECURE_DIR and #GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME + * #GSIGNOND_CONFIG_GENERAL_SECURE_DIR * to determine database location in the filesystem. * * The default implementation is using SQLite for the storage. diff --git a/src/common/gsignond-access-control-manager.c b/src/common/gsignond-access-control-manager.c index ef5d8f8..b583151 100644 --- a/src/common/gsignond-access-control-manager.c +++ b/src/common/gsignond-access-control-manager.c @@ -277,18 +277,26 @@ _acl_is_valid (GSignondAccessControlManager *self, GSignondSecurityContext * _security_context_of_keychain (GSignondAccessControlManager *self) { - const gchar *keychain_sysctx = NULL; + g_return_val_if_fail (self != NULL, NULL); - (void) self; + const gchar *keychain_sysctx; -# if defined(ENABLE_DEBUG) - keychain_sysctx = g_getenv ("SSO_KEYCHAIN_SYSCTX"); -# elif defined(KEYCHAIN_SYSCTX) - keychain_sysctx = KEYCHAIN_SYSCTX; -# endif + keychain_sysctx = gsignond_config_get_string ( + self->config, + GSIGNOND_CONFIG_GENERAL_KEYCHAIN_SYSCTX); if (!keychain_sysctx) +# ifdef KEYCHAIN_SYSCTX + keychain_sysctx = KEYCHAIN_SYSCTX; +# else keychain_sysctx = ""; - return gsignond_security_context_new_from_values (keychain_sysctx, ""); +# endif +# ifdef ENABLE_DEBUG + const gchar *keychain_env = g_getenv ("SSO_KEYCHAIN_SYSCTX"); + if (keychain_env) + keychain_sysctx = keychain_env; +# endif + + return gsignond_security_context_new_from_values (keychain_sysctx, NULL); } /** @@ -444,7 +452,13 @@ gsignond_access_control_manager_acl_is_valid ( * has a special management access to all stored identities and is able to * perform deletion of all identities from storage. * - * The default implementation returns an empty context. If gSSO was compiled + * The default implementation returns a context either set in #GSignondConfig, + * or if not set, a value specified through a configure --enable-keychain + * option (see + * Building gsignond), or if that is not + * set either then an empty string "" is returned. + * + * If gSSO was compiled * with --enable-debug and SSO_KEYCHAIN_SYSCTX environment variable is set, then * the value of that variable is used to set the returned system context instead. * diff --git a/src/common/gsignond-config.c b/src/common/gsignond-config.c index 855777d..c40e160 100644 --- a/src/common/gsignond-config.c +++ b/src/common/gsignond-config.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2012 Intel Corporation. + * Copyright (C) 2012-2013 Intel Corporation. * * Contact: Jussi Laako * Amarnath Valluri @@ -32,7 +32,6 @@ #include "gsignond/gsignond-config.h" #include "gsignond/gsignond-config-general.h" -#include "gsignond/gsignond-config-db.h" #include "gsignond/gsignond-config-dbus.h" #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-dictionary.h" @@ -45,32 +44,28 @@ * #GSignondConfig holds configuration information as a set of keys and values * (integer or strings). The key names are defined in * general config keys, - * database config keys, and - * DBus config keys. + * and DBus config keys. * - * The configuration is discovered from these sources, in decreasing order of - * priority: - * - environment variables, if gSSO has been compiled with --enable-debug switch. - * See the specific keys documentation for the variable names. - * - gSSO configuration file. See below for where the file is searched for. - * - default values. See the documentation for specific keys for those. + * The configuration is retrieved from the gSSO configuration file. See below + * for where the file is searched for. * * Where the configuration file is searched for * * If gSSO has been compiled with --enable-debug, then these locations are used, * in decreasing order of priority: * - GSIGNOND_CONFIG environment variable - * - g_get_user_config_dir() + "gsignond/gsignond.conf" - * - each of g_get_system_config_dirs() + "gsignond/gsignond.conf" + * - g_get_user_config_dir() + "gsignond.conf" + * - path specified in --sysconfdir configure option ($(sysconfdir)) + * - each of g_get_system_config_dirs() + "gsignond.conf" * * Otherwise, the config file location is determined at compilation time as - * $(sysconfdir) + "gsignond/gsignond.conf" + * $(sysconfdir) + "gsignond.conf" * * Example configuration file * * See example configuration file here: - * - * http://code.google.com/p/accounts-sso/source/browse/gsignond.conf?repo=gsignond + * + * http://code.google.com/p/accounts-sso/source/browse/gsignond.conf.in?repo=gsignond */ /** @@ -85,9 +80,6 @@ */ -#define GSIGNOND_DB_METADATA_DEFAULT_DB_FILENAME "metadata.db" -#define GSIGNOND_DB_SECRET_DEFAULT_DB_FILENAME "secret.db" - struct _GSignondConfigPrivate { gchar *config_file_path; @@ -98,23 +90,24 @@ struct _GSignondConfigPrivate G_DEFINE_TYPE (GSignondConfig, gsignond_config, G_TYPE_OBJECT); - -static void -_set_storage_path (GSignondConfig *self, const gchar *value) +static gchar * +_check_config_file (const gchar *path) { - gchar *storage_path = g_build_filename (value, - "gsignond.general", - NULL); - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_STORAGE_PATH, - storage_path); - g_free (storage_path); + gchar *fn; + + fn = g_build_filename (path, + "gsignond.conf", + NULL); + DBG ("check config at %s", fn); + if (g_access (fn, R_OK) == 0) + return fn; + g_free (fn); + return NULL; } static gboolean _load_config (GSignondConfig *self) { - gchar *def_config; GError *err = NULL; gchar **groups = NULL; gsize n_groups = 0; @@ -125,41 +118,37 @@ _load_config (GSignondConfig *self) const gchar * const *sysconfdirs; if (!self->priv->config_file_path) { - def_config = g_strdup (g_getenv ("GSIGNOND_CONFIG")); - if (!def_config) - def_config = g_build_filename (g_get_user_config_dir(), - "gsignond/gsignond.conf", - NULL); - if (g_access (def_config, R_OK) == 0) { - self->priv->config_file_path = def_config; - } else { - g_free (def_config); - sysconfdirs = g_get_system_config_dirs (); - while (*sysconfdirs != NULL) { - def_config = g_build_filename (*sysconfdirs, - "gsignond/gsignond.conf", - NULL); - if (g_access (def_config, R_OK) == 0) { - self->priv->config_file_path = def_config; - break; - } - g_free (def_config); - sysconfdirs++; + const gchar *cfg_env = g_getenv ("GSIGNOND_CONFIG"); + if (cfg_env) + self->priv->config_file_path = _check_config_file (cfg_env); + } + if (!self->priv->config_file_path) { + gchar *user_cfg = g_strdup_printf ("%s/%s", + g_get_user_config_dir (), + "gsignond"); + self->priv->config_file_path = _check_config_file (user_cfg); + g_free (user_cfg); + } + if (!self->priv->config_file_path) { + self->priv->config_file_path = + _check_config_file (GSIGNOND_SYSCONF_DIR); + } + if (!self->priv->config_file_path) { + sysconfdirs = g_get_system_config_dirs (); + while (*sysconfdirs != NULL) { + gchar *sys_cfg = _check_config_file (*sysconfdirs); + if (sys_cfg) { + self->priv->config_file_path = sys_cfg; + break; } + sysconfdirs++; } } # else /* ENABLE_DEBUG */ # ifndef GSIGNOND_SYSCONF_DIR # error "System configuration directory not defined!" # endif - def_config = g_build_filename (GSIGNOND_SYSCONF_DIR, - "gsignond/gsignond.conf", - NULL); - if (g_access (def_config, R_OK) == 0) { - self->priv->config_file_path = def_config; - } else { - g_free (def_config); - } + self->priv->config_file_path = _check_config_file (GSIGNOND_SYSCONF_DIR); # endif /* ENABLE_DEBUG */ if (self->priv->config_file_path) { @@ -203,12 +192,7 @@ _load_config (GSignondConfig *self) } INFO ("found config : '%s/%s' - '%s'", groups[i], keys[j], value); - - /* construct a full storage path for wipe safety */ - if (g_strcmp0 (key, GSIGNOND_CONFIG_GENERAL_STORAGE_PATH) == 0) - _set_storage_path (self, value); - else - gsignond_config_set_string (self, key, value); + gsignond_config_set_string (self, key, value); g_free (key); g_free (value); @@ -224,67 +208,6 @@ _load_config (GSignondConfig *self) return TRUE; } -#ifdef ENABLE_DEBUG -static void -_load_environment (GSignondConfig *self) -{ - const gchar *e_val = 0; - guint timeout = 0; - - e_val = g_getenv ("SSO_DAEMON_TIMEOUT"); - if (e_val && (timeout = atoi(e_val))) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_DBUS_DAEMON_TIMEOUT, - e_val); - - e_val = g_getenv ("SSO_IDENTITY_TIMEOUT"); - if (e_val && (timeout = atoi(e_val))) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_DBUS_IDENTITY_TIMEOUT, - e_val); - - e_val = g_getenv ("SSO_AUTH_SESSION_TIMEOUT"); - if (e_val && (timeout = atoi(e_val))) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_DBUS_AUTH_SESSION_TIMEOUT, - e_val); - - e_val = g_getenv ("SSO_PLUGIN_TIMEOUT"); - if (e_val && (timeout = atoi(e_val))) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_PLUGIN_TIMEOUT, - e_val); - - e_val = g_getenv ("SSO_PLUGINS_DIR"); - if (e_val) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR, - e_val); - - e_val = g_getenv ("SSO_EXTENSIONS_DIR"); - if (e_val) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR, - e_val); - - e_val = g_getenv ("SSO_BIN_DIR"); - if (e_val) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_BIN_DIR, - e_val); - - e_val = g_getenv ("SSO_EXTENSION"); - if (e_val) - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_EXTENSION, - e_val); - - e_val = g_getenv ("SSO_STORAGE_PATH"); - if (e_val) - _set_storage_path (self, e_val); -} -#endif /* ENABLE_DEBUG */ - /** * gsignond_config_get_integer: * @self: an instance of #GSignondConfig @@ -408,32 +331,8 @@ gsignond_config_init (GSignondConfig *self) self->priv->config_file_path = NULL; self->priv->config_table = gsignond_dictionary_new(); - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR, - (GSIGNOND_PLUGINS_DIR)); - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR, - (GSIGNOND_EXTENSIONS_DIR)); - gsignond_config_set_string (self, - (GSIGNOND_CONFIG_GENERAL_BIN_DIR), - (GSIGNOND_BIN_DIR)); - - gsignond_config_set_string (self, - GSIGNOND_CONFIG_GENERAL_STORAGE_PATH, - "/var/db"); - - gsignond_config_set_string (self, - GSIGNOND_CONFIG_DB_SECRET_DB_FILENAME, - GSIGNOND_DB_SECRET_DEFAULT_DB_FILENAME); - gsignond_config_set_string (self, - GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME, - GSIGNOND_DB_METADATA_DEFAULT_DB_FILENAME); - if (!_load_config (self)) WARN ("load configuration failed, using default settings"); -# ifdef ENABLE_DEBUG - _load_environment (self); -# endif } static void diff --git a/src/common/gsignond-dictionary.c b/src/common/gsignond-dictionary.c index 8ec88c3..40d68d4 100644 --- a/src/common/gsignond-dictionary.c +++ b/src/common/gsignond-dictionary.c @@ -85,6 +85,39 @@ gsignond_dictionary_new_from_variant (GVariant *variant) } /** + * gsignond_dictionary_to_variant_builder: + * @dict: instance of #GSignondDictionary + * + * Converts the #GSignondDictionary to a #GVariantBuilder of type + * G_VARIANT_TYPE_VARDICT. + * + * Caller should use g_variant_builder_unref() on the return value when it is + * no longer needed. + * + * Returns: (transfer full): #GVariantBuilder if successful, NULL otherwise. + */ +GVariantBuilder * +gsignond_dictionary_to_variant_builder (GSignondDictionary *dict) +{ + GVariantBuilder *builder; + GHashTableIter iter; + const gchar *key = NULL; + GVariant *value = NULL; + + g_return_val_if_fail (dict != NULL, NULL); + + builder = g_variant_builder_new (G_VARIANT_TYPE_VARDICT); + + g_hash_table_iter_init (&iter, dict); + while (g_hash_table_iter_next (&iter, (gpointer)&key, (gpointer)&value)) + { + g_variant_builder_add (builder, "{sv}", key, value); + } + + return builder; +} + +/** * gsignond_dictionary_to_variant: * @dict: instance of #GSignondDictionary * @@ -96,25 +129,18 @@ gsignond_dictionary_new_from_variant (GVariant *variant) GVariant * gsignond_dictionary_to_variant (GSignondDictionary *dict) { - GVariantBuilder builder; - GHashTableIter iter; + GVariantBuilder *builder = NULL; GVariant *vdict = NULL; - const gchar *key = NULL; - GVariant *value = NULL; g_return_val_if_fail (dict != NULL, NULL); - g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); - g_hash_table_iter_init (&iter, dict); - while (g_hash_table_iter_next (&iter, - (gpointer)&key, - (gpointer)&value)) - { - g_variant_builder_add (&builder, "{sv}", - key, - value); - } - vdict = g_variant_builder_end (&builder); + builder = gsignond_dictionary_to_variant_builder (dict); + if (!builder) return NULL; + + vdict = g_variant_builder_end (builder); + + g_variant_builder_unref (builder); + return vdict; } @@ -515,3 +541,23 @@ gsignond_dictionary_copy (GSignondDictionary *other) return dict; } + +/** + * gsignond_dictionary_contains: + * @dict: instance of #GSignondDictionary + * @key: (transfer none): key to check + * + * Checks if the @dict contains @key. + * + * Returns: TRUE if found, FALSE otherwise. + */ +gboolean +gsignond_dictionary_contains (GSignondDictionary *dict, + const gchar *key) +{ + g_return_val_if_fail (dict != NULL, FALSE); + g_return_val_if_fail (key != NULL, FALSE); + + return g_hash_table_contains (dict, key); +} + diff --git a/src/common/gsignond-identity-info-internal.h b/src/common/gsignond-identity-info-internal.h index 60ce7a1..92af966 100644 --- a/src/common/gsignond-identity-info-internal.h +++ b/src/common/gsignond-identity-info-internal.h @@ -50,6 +50,55 @@ G_BEGIN_DECLS #define GSIGNOND_IDENTITY_INFO_VALIDATED "Validated" #define GSIGNOND_IDENTITY_INFO_USERNAME_IS_SECRET "UserNameSecret" +#define GSIGNOND_IDENTITY_INFO_EDIT_FLAGS "EditFlags" + +typedef enum { + IDENTITY_INFO_PROP_NONE = 0x0000, + + /* Secret fields */ + IDENTITY_INFO_PROP_USERNAME = 0x0001, + IDENTITY_INFO_PROP_SECRET = 0x0002, + + IDENTITY_INFO_PROP_ID = 0x0004, + IDENTITY_INFO_PROP_TYPE = 0x0008, + IDENTITY_INFO_PROP_CAPTION = 0x0010, + IDENTITY_INFO_PROP_STORE_SECRET = 0x0020, + IDENTITY_INFO_PROP_USERNAME_IS_SECRET = 0x0040, + IDENTITY_INFO_PROP_OWNER = 0x0080, + IDENTITY_INFO_PROP_ACL = 0x0100, + IDENTITY_INFO_PROP_METHODS = 0x0200, + IDENTITY_INFO_PROP_REALMS = 0x0400, + IDENTITY_INFO_PROP_REF_COUNT = 0x0800, + IDENTITY_INFO_PROP_VALIDATED = 0x1000, + + IDENTITY_INFO_PROP_MAX = 0x2000, + IDENTITY_INFO_PROP_ALL = 0x1ffff + +} GSignondIdentityInfoPropFlags; + +GSignondIdentityInfoPropFlags +gsignond_identity_info_get_edit_flags (GSignondIdentityInfo *info); + +gboolean +gsignond_identity_info_set_edit_flags (GSignondIdentityInfo *info, + GSignondIdentityInfoPropFlags flags); + +gboolean +gsignond_identity_info_reset_edit_flags (GSignondIdentityInfo *info, + GSignondIdentityInfoPropFlags flags); + +gboolean +gsignond_identity_info_unset_edit_flags (GSignondIdentityInfo *info, + GSignondIdentityInfoPropFlags flags); + +GSignondIdentityInfoPropFlags +gsignond_identity_info_selective_copy (GSignondIdentityInfo *dest, + const GSignondIdentityInfo *src, + GSignondIdentityInfoPropFlags flags); + +void +gsignond_identity_info_remove_owner (GSignondIdentityInfo *info); + G_END_DECLS #endif /* __GSIGNOND_IDENTITY_INFO_INTERNAL_H__ */ diff --git a/src/common/gsignond-identity-info.c b/src/common/gsignond-identity-info.c index 02af6c3..a27aadb 100644 --- a/src/common/gsignond-identity-info.c +++ b/src/common/gsignond-identity-info.c @@ -25,7 +25,21 @@ #include "gsignond-identity-info.h" #include "gsignond-identity-info-internal.h" +#include "gsignond/gsignond-utils.h" +G_DEFINE_BOXED_TYPE(GSignondIdentityInfo, + gsignond_identity_info, + gsignond_identity_info_ref, + gsignond_identity_info_unref) + +struct _GSignondIdentityInfo +{ + volatile gint ref_count; + gchar *username; + gchar *secret; + GSignondIdentityInfoPropFlags edit_flags; + GSignondDictionary *map; +}; static gboolean _gsignond_identity_info_seq_cmp ( @@ -69,96 +83,6 @@ _gsignond_identity_info_seq_cmp ( return equal; } -static gint -_compare_strings ( - const gchar* a, - const gchar* b, - gpointer data) -{ - (void)data; - return g_strcmp0 (a,b); -} - -static GVariant * -_gsignond_identity_info_sequence_to_variant (GSequence *seq) - -{ - GSequenceIter * iter = NULL; - GVariant *var = NULL; - GVariantBuilder builder; - - if (!seq) return NULL; - - g_variant_builder_init (&builder, G_VARIANT_TYPE_STRING_ARRAY); - iter = g_sequence_get_begin_iter (seq); - while (!g_sequence_iter_is_end (iter)) { - const gchar * d = g_sequence_get (iter); - g_variant_builder_add (&builder, "s", d); - iter = g_sequence_iter_next (iter); - } - var = g_variant_builder_end (&builder); - return var; -} - -static GSequence * -_gsignond_identity_info_variant_to_sequence (GVariant *var) - -{ - GVariantIter iter; - GSequence *seq = NULL; - gchar *item = NULL; - - if (!var) return NULL; - - seq = g_sequence_new ((GDestroyNotify)g_free); - g_variant_iter_init (&iter, var); - while (g_variant_iter_next (&iter, "s", &item)) { - g_sequence_insert_sorted (seq, - item, - (GCompareDataFunc) _compare_strings, - NULL); - } - return seq; -} - -static gchar ** -_gsignond_identity_info_sequence_to_array (GSequence *seq) -{ - gchar **items, **temp; - GSequenceIter *iter; - - if (!seq) return NULL; - - items = g_malloc0 ((g_sequence_get_length (seq) + 1) * sizeof (gchar *)); - temp = items; - for (iter = g_sequence_get_begin_iter (seq); - iter != g_sequence_get_end_iter (seq); - iter = g_sequence_iter_next (iter)) { - *temp = g_sequence_get (iter); - temp++; - } - return items; -} - -static GSequence * -_gsignond_identity_info_array_to_sequence (gchar **items) - -{ - GSequence *seq = NULL; - - if (!items) return NULL; - - seq = g_sequence_new ((GDestroyNotify) g_free); - while (*items) { - g_sequence_insert_sorted (seq, - *items, - (GCompareDataFunc) _compare_strings, - NULL); - items++; - } - return seq; -} - static gboolean _gsignond_identity_info_sec_context_list_cmp ( GSignondSecurityContextList *one, @@ -226,6 +150,114 @@ _gsignond_identity_info_methods_cmp ( return equal; } +GSignondIdentityInfoPropFlags +gsignond_identity_info_get_edit_flags ( + GSignondIdentityInfo *info) +{ + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO(info), + IDENTITY_INFO_PROP_NONE); + + return info->edit_flags; +} + +gboolean +gsignond_identity_info_set_edit_flags ( + GSignondIdentityInfo *info, + GSignondIdentityInfoPropFlags flag) +{ + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO(info), FALSE); + + info->edit_flags |= flag; + + return TRUE; +} + +gboolean +gsignond_identity_info_reset_edit_flags ( + GSignondIdentityInfo *info, + GSignondIdentityInfoPropFlags flags) +{ + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO(info), FALSE); + + info->edit_flags = flags; + + return TRUE; +} + +gboolean +gsignond_identity_info_unset_edit_flags ( + GSignondIdentityInfo *info, + GSignondIdentityInfoPropFlags unset_flags) +{ + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO(info), FALSE); + + info->edit_flags &= ~unset_flags; + + return TRUE; +} + +GSignondIdentityInfoPropFlags +gsignond_identity_info_selective_copy (GSignondIdentityInfo *dest, + const GSignondIdentityInfo *src, + GSignondIdentityInfoPropFlags flags) +{ + GSignondIdentityInfoPropFlags tmp_flag; + guint i; + g_return_val_if_fail (src, IDENTITY_INFO_PROP_NONE); + g_return_val_if_fail (dest, IDENTITY_INFO_PROP_NONE); + g_return_val_if_fail (flags != IDENTITY_INFO_PROP_NONE, flags); + + /* This table should match to GSignondIdentityInfoPropFlags order */ + const gchar *keys[] = { + GSIGNOND_IDENTITY_INFO_ID, + GSIGNOND_IDENTITY_INFO_TYPE, + GSIGNOND_IDENTITY_INFO_CAPTION, + GSIGNOND_IDENTITY_INFO_STORESECRET, + GSIGNOND_IDENTITY_INFO_USERNAME_IS_SECRET, + GSIGNOND_IDENTITY_INFO_OWNER, + GSIGNOND_IDENTITY_INFO_ACL, + GSIGNOND_IDENTITY_INFO_AUTHMETHODS, + GSIGNOND_IDENTITY_INFO_REALMS, + GSIGNOND_IDENTITY_INFO_REFCOUNT, + GSIGNOND_IDENTITY_INFO_VALIDATED + }; + + for (i= 0, tmp_flag = IDENTITY_INFO_PROP_ID; + tmp_flag < IDENTITY_INFO_PROP_MAX; + tmp_flag <<= 1, i++) { + if ((flags & tmp_flag) && + gsignond_dictionary_contains (src->map, keys[i])) { + gsignond_dictionary_set (dest->map, keys[i], + g_variant_ref (gsignond_dictionary_get (src->map, keys[i]))); + } + else { + flags &= ~tmp_flag; + } + } + + if (flags & IDENTITY_INFO_PROP_USERNAME) { + g_free (dest->username); + dest->username = g_strdup (src->username); + } + + if (flags & IDENTITY_INFO_PROP_SECRET) { + g_free (dest->secret); + dest->secret = g_strdup (src->secret); + } + + dest->edit_flags |= flags; + + return flags; +} + +void +gsignond_identity_info_remove_owner (GSignondIdentityInfo *info) +{ + g_return_if_fail (info && GSIGNOND_IS_IDENTITY_INFO(info)); + + gsignond_dictionary_remove (info->map, GSIGNOND_IDENTITY_INFO_OWNER); +} + /** * gsignond_identity_info_new: * @@ -237,10 +269,86 @@ _gsignond_identity_info_methods_cmp ( GSignondIdentityInfo * gsignond_identity_info_new (void) { - GSignondIdentityInfo *info; + return gsignond_identity_info_new_from_variant (NULL); +} + +/** + * gsignond_identity_info_new_from_variant: + * + * Creates new instance of GSignondIdentityInfo. + * + * Returns: (transfer full) #GSignondIdentityInfo object if successful, + * NULL otherwise. + */ +GSignondIdentityInfo * +gsignond_identity_info_new_from_variant (GVariant *variant_map) +{ + gboolean uname_is_secret = FALSE; + GSignondIdentityInfo *info = g_slice_new0 (GSignondIdentityInfo); + if (!info) return NULL; + + info->ref_count = 1; + info->edit_flags = IDENTITY_INFO_PROP_NONE; + info->username = info->secret = NULL; + + if (!variant_map) { + info->map = gsignond_dictionary_new (); + + gsignond_dictionary_set (info->map, GSIGNOND_IDENTITY_INFO_ID, + g_variant_new_uint32 (GSIGNOND_IDENTITY_INFO_NEW_IDENTITY)); - info = gsignond_dictionary_new (); - gsignond_identity_info_set_id (info, GSIGNOND_IDENTITY_INFO_NEW_IDENTITY); + return info; + } + + info->map = gsignond_dictionary_new_from_variant (variant_map); + if (!info->map) return info; + + /* update edit flags */ + if (gsignond_dictionary_contains (info->map, GSIGNOND_IDENTITY_INFO_ID)) + info->edit_flags |= IDENTITY_INFO_PROP_ID; + if (gsignond_dictionary_contains (info->map, GSIGNOND_IDENTITY_INFO_TYPE)) + info->edit_flags |= IDENTITY_INFO_PROP_TYPE; + if (gsignond_dictionary_contains (info->map, + GSIGNOND_IDENTITY_INFO_USERNAME_IS_SECRET)) { + info->edit_flags |= IDENTITY_INFO_PROP_USERNAME_IS_SECRET; + gsignond_dictionary_get_boolean (info->map, + GSIGNOND_IDENTITY_INFO_USERNAME_IS_SECRET, &uname_is_secret); + } + if (gsignond_dictionary_contains (info->map, + GSIGNOND_IDENTITY_INFO_USERNAME)) { + info->edit_flags |= IDENTITY_INFO_PROP_USERNAME; + info->username = g_strdup (gsignond_dictionary_get_string (info->map, + GSIGNOND_IDENTITY_INFO_USERNAME)); + gsignond_dictionary_remove (info->map, GSIGNOND_IDENTITY_INFO_USERNAME); + } + if (gsignond_dictionary_contains (info->map, + GSIGNOND_IDENTITY_INFO_SECRET)) { + info->edit_flags |= IDENTITY_INFO_PROP_SECRET; + info->secret = g_strdup (gsignond_dictionary_get_string (info->map, + GSIGNOND_IDENTITY_INFO_SECRET)); + gsignond_dictionary_remove (info->map, GSIGNOND_IDENTITY_INFO_SECRET); + } + if (gsignond_dictionary_contains (info->map, + GSIGNOND_IDENTITY_INFO_STORESECRET)) + info->edit_flags |= IDENTITY_INFO_PROP_STORE_SECRET; + if (gsignond_dictionary_contains (info->map, + GSIGNOND_IDENTITY_INFO_CAPTION)) + info->edit_flags |= IDENTITY_INFO_PROP_CAPTION; + if (gsignond_dictionary_contains (info->map, + GSIGNOND_IDENTITY_INFO_AUTHMETHODS)) + info->edit_flags |= IDENTITY_INFO_PROP_METHODS; + if (gsignond_dictionary_contains (info->map, GSIGNOND_IDENTITY_INFO_REALMS)) + info->edit_flags |= IDENTITY_INFO_PROP_REALMS; + if (gsignond_dictionary_contains (info->map, GSIGNOND_IDENTITY_INFO_ACL)) + info->edit_flags |= IDENTITY_INFO_PROP_ACL; + if (gsignond_dictionary_contains (info->map, GSIGNOND_IDENTITY_INFO_OWNER)) + info->edit_flags |= IDENTITY_INFO_PROP_OWNER; + if (gsignond_dictionary_contains (info->map, + GSIGNOND_IDENTITY_INFO_REFCOUNT)) + info->edit_flags |= IDENTITY_INFO_PROP_REF_COUNT; + if (gsignond_dictionary_contains (info->map, + GSIGNOND_IDENTITY_INFO_VALIDATED)) + info->edit_flags |= IDENTITY_INFO_PROP_VALIDATED; return info; } @@ -256,10 +364,19 @@ gsignond_identity_info_new (void) GSignondIdentityInfo * gsignond_identity_info_copy (GSignondIdentityInfo *info) { - if (!info) - return NULL; + GSignondIdentityInfo *new_info = NULL; + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); + + new_info = g_slice_new0 (GSignondIdentityInfo); + if (!new_info) return NULL; + + new_info->ref_count = 1; + new_info->edit_flags = info->edit_flags; + new_info->username = g_strdup (info->username); + new_info->secret = g_strdup (info->secret); + new_info->map = gsignond_dictionary_copy (info->map); - return gsignond_dictionary_copy (info); + return new_info; } /** @@ -267,13 +384,17 @@ gsignond_identity_info_copy (GSignondIdentityInfo *info) * @info: instance of #GSignondIdentityInfo * * Increment reference count of the info structure. + * + * Returns: (transfer none) returns the same copy of the info. */ -void +GSignondIdentityInfo * gsignond_identity_info_ref (GSignondIdentityInfo *info) { - g_return_if_fail (info != NULL); + g_return_val_if_fail (info != NULL, info); - gsignond_dictionary_ref (info); + g_atomic_int_inc (&info->ref_count); + + return info; } /** @@ -285,10 +406,14 @@ gsignond_identity_info_ref (GSignondIdentityInfo *info) void gsignond_identity_info_unref (GSignondIdentityInfo *info) { - if (!info) - return; + g_return_if_fail (info != NULL); - gsignond_dictionary_unref (info); + if (g_atomic_int_dec_and_test (&info->ref_count)) { + gsignond_dictionary_unref (info->map); + g_free(info->username); + g_free(info->secret); + g_slice_free (GSignondIdentityInfo, info); + } } /** @@ -302,14 +427,14 @@ gsignond_identity_info_unref (GSignondIdentityInfo *info) guint32 gsignond_identity_info_get_id (GSignondIdentityInfo *info) { - g_assert (info != NULL); - - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_ID); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), + GSIGNOND_IDENTITY_INFO_NEW_IDENTITY); - g_return_val_if_fail (var != NULL, -1); + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_ID); - return g_variant_get_uint32 (var); + return var ? g_variant_get_uint32 (var) + : GSIGNOND_IDENTITY_INFO_NEW_IDENTITY; } /** @@ -327,12 +452,17 @@ gsignond_identity_info_set_id ( GSignondIdentityInfo *info, guint32 id) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); + + if (gsignond_identity_info_get_id (info) == id) + return TRUE; return gsignond_dictionary_set ( - info, + info->map, GSIGNOND_IDENTITY_INFO_ID, - g_variant_new_uint32 (id)); + g_variant_new_uint32 (id)) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_ID); } /** @@ -346,7 +476,7 @@ gsignond_identity_info_set_id ( gboolean gsignond_identity_info_get_is_identity_new (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); return GSIGNOND_IDENTITY_INFO_NEW_IDENTITY == gsignond_identity_info_get_id (info); @@ -364,8 +494,8 @@ gboolean gsignond_identity_info_set_identity_new ( GSignondIdentityInfo *info) { - g_assert (info != NULL); - + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); + return gsignond_identity_info_set_id ( info, GSIGNOND_IDENTITY_INFO_NEW_IDENTITY); @@ -382,14 +512,9 @@ gsignond_identity_info_set_identity_new ( const gchar * gsignond_identity_info_get_username (GSignondIdentityInfo *info) { - g_assert (info != NULL); - - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_USERNAME); - if (var != NULL) { - return g_variant_get_string (var, NULL); - } - return NULL; + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); + + return (const gchar *)info->username; } /** @@ -407,30 +532,16 @@ gsignond_identity_info_set_username ( GSignondIdentityInfo *info, const gchar *username) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - if (!username) { - return gsignond_dictionary_remove (info, - GSIGNOND_IDENTITY_INFO_USERNAME); - } - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_USERNAME, - g_variant_new_string (username)); -} + const gchar *current_name = gsignond_identity_info_get_username(info); + if (g_strcmp0 (username, current_name) == 0) return TRUE; -/** - * gsignond_identity_info_remove_username: - * @info: instance of #GSignondIdentityInfo - * - * Removes username from the info. - */ -void -gsignond_identity_info_remove_username (GSignondIdentityInfo *info) -{ - g_assert (info != NULL); - - gsignond_dictionary_remove (info, GSIGNOND_IDENTITY_INFO_USERNAME); + g_free (info->username); + info->username = g_strdup (username); + + return gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_USERNAME); } /** @@ -444,15 +555,11 @@ gsignond_identity_info_remove_username (GSignondIdentityInfo *info) gboolean gsignond_identity_info_get_is_username_secret (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, + GVariant *var = gsignond_dictionary_get (info->map, GSIGNOND_IDENTITY_INFO_USERNAME_IS_SECRET); - if (var != NULL) { - return g_variant_get_boolean (var); - } - return FALSE; + return var ? g_variant_get_boolean (var) : FALSE; } /** @@ -470,12 +577,19 @@ gsignond_identity_info_set_username_secret ( GSignondIdentityInfo *info, gboolean username_secret) { - g_assert (info != NULL); + gboolean res = FALSE; + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - return gsignond_dictionary_set ( - info, + if (gsignond_identity_info_get_is_username_secret(info) == username_secret) + return TRUE; + + res = gsignond_dictionary_set (info->map, GSIGNOND_IDENTITY_INFO_USERNAME_IS_SECRET, - g_variant_new_boolean(username_secret)); + g_variant_new_boolean(username_secret)) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_USERNAME_IS_SECRET); + + return res; } /** @@ -489,14 +603,9 @@ gsignond_identity_info_set_username_secret ( const gchar * gsignond_identity_info_get_secret (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_SECRET); - if (var != NULL) { - return g_variant_get_string (var, NULL); - } - return NULL; + return info->secret; } /** @@ -514,30 +623,19 @@ gsignond_identity_info_set_secret ( GSignondIdentityInfo *info, const gchar *secret) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - if (!secret) { - return gsignond_dictionary_remove (info, - GSIGNOND_IDENTITY_INFO_SECRET); - } - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_SECRET, - g_variant_new_string (secret)); -} + const gchar *current_secret = + gsignond_identity_info_get_secret (info); -/** - * gsignond_identity_info_remove_secret: - * @info: instance of #GSignondIdentityInfo - * - * Removes secret from the info. - */ -void -gsignond_identity_info_remove_secret (GSignondIdentityInfo *info) -{ - g_assert (info != NULL); + if (g_strcmp0 (current_secret, secret) == 0) return TRUE; + + if (info->secret) g_free (info->secret); + + info->secret = g_strdup (secret); - gsignond_dictionary_remove (info, GSIGNOND_IDENTITY_INFO_SECRET); + return gsignond_identity_info_set_edit_flags ( + info, IDENTITY_INFO_PROP_SECRET); } /** @@ -551,14 +649,11 @@ gsignond_identity_info_remove_secret (GSignondIdentityInfo *info) gboolean gsignond_identity_info_get_store_secret (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_STORESECRET); - if (var != NULL) { - return g_variant_get_boolean (var); - } - return FALSE; + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_STORESECRET); + return var ? g_variant_get_boolean (var) : FALSE; } /** @@ -576,12 +671,16 @@ gsignond_identity_info_set_store_secret ( GSignondIdentityInfo *info, gboolean store_secret) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_STORESECRET, - g_variant_new_boolean(store_secret)); + if (gsignond_identity_info_get_store_secret (info) == store_secret) + return TRUE; + + return gsignond_dictionary_set (info->map, + GSIGNOND_IDENTITY_INFO_STORESECRET, + g_variant_new_boolean(store_secret)) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_STORE_SECRET); } /** @@ -595,14 +694,11 @@ gsignond_identity_info_set_store_secret ( const gchar * gsignond_identity_info_get_caption (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_CAPTION); - if (var != NULL) { - return g_variant_get_string (var, NULL); - } - return NULL; + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_CAPTION); + return var ? g_variant_get_string (var, NULL) : NULL; } /** @@ -620,16 +716,24 @@ gsignond_identity_info_set_caption ( GSignondIdentityInfo *info, const gchar *caption) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); + const gchar *current_caption = + gsignond_identity_info_get_caption (info); + + if (g_strcmp0 (current_caption, caption) == 0) + return TRUE; if (!caption) { - return gsignond_dictionary_remove (info, - GSIGNOND_IDENTITY_INFO_CAPTION); + return gsignond_dictionary_remove (info->map, + GSIGNOND_IDENTITY_INFO_CAPTION) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_CAPTION); } - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_CAPTION, - g_variant_new_string (caption)); + return gsignond_dictionary_set (info->map, + GSIGNOND_IDENTITY_INFO_CAPTION, + g_variant_new_string (caption)) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_CAPTION); } /** @@ -644,14 +748,11 @@ gsignond_identity_info_set_caption ( GSequence * gsignond_identity_info_get_realms (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_REALMS); - if (var != NULL) { - return _gsignond_identity_info_variant_to_sequence (var); - } - return NULL; + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_REALMS); + return var ? gsignond_variant_to_sequence (var) : NULL; } /** @@ -669,13 +770,24 @@ gsignond_identity_info_set_realms ( GSignondIdentityInfo *info, GSequence *realms) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); g_return_val_if_fail (realms != NULL, FALSE); - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_REALMS, - _gsignond_identity_info_sequence_to_variant (realms)); + GVariant *current_realms = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_REALMS); + GVariant *var_realms = gsignond_sequence_to_variant (realms); + + if (current_realms != NULL && + g_variant_equal (current_realms, var_realms) == TRUE) { + g_variant_unref (var_realms); + return TRUE; + } + + return gsignond_dictionary_set (info->map, + GSIGNOND_IDENTITY_INFO_REALMS, + var_realms) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_REALMS); } /** @@ -691,11 +803,11 @@ gsignond_identity_info_set_realms ( GHashTable * gsignond_identity_info_get_methods (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); - GVariant *var = NULL; GHashTable *methods = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_AUTHMETHODS); + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_AUTHMETHODS); if (var != NULL) { GVariantIter iter; gchar *vmethod; @@ -710,10 +822,9 @@ gsignond_identity_info_get_methods (GSignondIdentityInfo *info) g_variant_iter_init (&iter, var); while (g_variant_iter_next (&iter, "{s^as}", &vmethod, &vmechanisms)) { - /* ownership of all content is transferred */ - seq = _gsignond_identity_info_array_to_sequence (vmechanisms); + /* ownership is transferred */ + seq = gsignond_array_to_sequence (vmechanisms); g_hash_table_insert (methods, vmethod, seq); - g_free (vmechanisms); } } return methods; @@ -735,10 +846,11 @@ gsignond_identity_info_set_methods ( GSignondIdentityInfo *info, GHashTable *methods) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); gchar **items = NULL; GVariantBuilder builder; + GVariant *current_mehtods, *var_methods; GHashTableIter iter; const gchar *method; @@ -753,14 +865,26 @@ gsignond_identity_info_set_methods ( (gpointer)&method, (gpointer)&mechanisms)) { - items = _gsignond_identity_info_sequence_to_array (mechanisms); + items = gsignond_sequence_to_array (mechanisms); g_variant_builder_add (&builder, "{s^as}", method, items); g_free (items); } - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_AUTHMETHODS, - g_variant_builder_end (&builder)); + + var_methods = g_variant_builder_end (&builder); + current_mehtods = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_AUTHMETHODS); + + if (current_mehtods != NULL && + g_variant_equal (current_mehtods, var_methods) == TRUE) { + g_variant_unref (var_methods); + return TRUE; + } + + return gsignond_dictionary_set (info->map, + GSIGNOND_IDENTITY_INFO_AUTHMETHODS, + var_methods) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_METHODS); } /** @@ -780,14 +904,15 @@ gsignond_identity_info_get_mechanisms ( GSignondIdentityInfo *info, const gchar *method) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); GVariant *var = NULL; GSequence *mechanisms = NULL; g_return_val_if_fail (method != NULL, NULL); - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_AUTHMETHODS); + var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_AUTHMETHODS); if (var != NULL) { GVariantIter iter; gchar *vmethod; @@ -796,12 +921,10 @@ gsignond_identity_info_get_mechanisms ( g_variant_iter_init (&iter, var); while (g_variant_iter_next (&iter, "{s^as}", &vmethod, &vmechanisms)) { - /* ownership of content is transferred */ + /* ownership is transferred */ if (vmethod != NULL && g_strcmp0 (vmethod, method) == 0) { - mechanisms = _gsignond_identity_info_array_to_sequence ( - vmechanisms); + mechanisms = gsignond_array_to_sequence (vmechanisms); g_free (vmethod); - g_free (vmechanisms); break; } g_free (vmethod); vmethod = NULL; @@ -824,7 +947,7 @@ gsignond_identity_info_remove_method ( GSignondIdentityInfo *info, const gchar *method) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); GHashTable *methods = NULL; gboolean ret = FALSE; @@ -852,14 +975,11 @@ gsignond_identity_info_remove_method ( GSignondSecurityContextList * gsignond_identity_info_get_access_control_list (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_ACL); - if (var != NULL) { - return gsignond_security_context_list_from_variant (var); - } - return NULL; + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_ACL); + return var ? gsignond_security_context_list_from_variant (var) : NULL; } /** @@ -877,13 +997,26 @@ gsignond_identity_info_set_access_control_list ( GSignondIdentityInfo *info, const GSignondSecurityContextList *acl) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); + + GVariant *current_acl = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_ACL); + GVariant *var_acl = NULL; + + if (!current_acl && !acl) return TRUE; + + var_acl = gsignond_security_context_list_to_variant (acl); + if (current_acl != NULL && + g_variant_equal (current_acl, var_acl) == TRUE) { + g_variant_unref (var_acl); + return TRUE; + } g_return_val_if_fail (acl != NULL, FALSE); - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_ACL, - gsignond_security_context_list_to_variant (acl)); + return gsignond_dictionary_set (info->map, + GSIGNOND_IDENTITY_INFO_ACL, var_acl) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_ACL); } /** @@ -899,21 +1032,18 @@ gsignond_identity_info_set_access_control_list ( GSignondSecurityContext * gsignond_identity_info_get_owner (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_OWNER); - if (var != NULL) { - return gsignond_security_context_from_variant (var); - } - return NULL; + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_OWNER); + return var ? gsignond_security_context_from_variant (var) : NULL; } /** * gsignond_identity_info_set_owner: * @info: instance of #GSignondIdentityInfo * - * @owners: (transfer none): owner to be set + * @owner: (transfer none): owner to be set * * Sets the owner of the info. * @@ -922,15 +1052,23 @@ gsignond_identity_info_get_owner (GSignondIdentityInfo *info) gboolean gsignond_identity_info_set_owner ( GSignondIdentityInfo *info, - const GSignondSecurityContext *owners) + const GSignondSecurityContext *owner) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - g_return_val_if_fail (owners != NULL, FALSE); - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_OWNER, - gsignond_security_context_to_variant (owners)); + g_return_val_if_fail (owner != NULL, FALSE); + GSignondSecurityContext *current_owner = + gsignond_identity_info_get_owner (info); + + if (current_owner != NULL && + gsignond_security_context_compare (current_owner, owner) == 0) + return TRUE; + + return (gsignond_dictionary_set (info->map, + GSIGNOND_IDENTITY_INFO_OWNER, + gsignond_security_context_to_variant (owner)) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_OWNER)); } /** @@ -944,14 +1082,11 @@ gsignond_identity_info_set_owner ( gboolean gsignond_identity_info_get_validated (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_VALIDATED); - if (var != NULL) { - return g_variant_get_boolean (var); - } - return FALSE; + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_VALIDATED); + return var ? g_variant_get_boolean (var) : FALSE; } /** @@ -969,12 +1104,16 @@ gsignond_identity_info_set_validated ( GSignondIdentityInfo *info, gboolean validated) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_VALIDATED, - g_variant_new_boolean (validated)); + if (gsignond_identity_info_get_validated (info) == validated) + return TRUE; + + return gsignond_dictionary_set (info->map, + GSIGNOND_IDENTITY_INFO_VALIDATED, + g_variant_new_boolean (validated)) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_VALIDATED); } /** @@ -988,14 +1127,11 @@ gsignond_identity_info_set_validated ( guint32 gsignond_identity_info_get_identity_type (GSignondIdentityInfo *info) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), 0); - GVariant *var = NULL; - var = gsignond_dictionary_get (info, GSIGNOND_IDENTITY_INFO_TYPE); - if (var != NULL) { - return g_variant_get_int32 (var); - } - return -1; + GVariant *var = gsignond_dictionary_get (info->map, + GSIGNOND_IDENTITY_INFO_TYPE); + return var ? g_variant_get_int32 (var) : 0; } /** @@ -1013,12 +1149,16 @@ gsignond_identity_info_set_identity_type ( GSignondIdentityInfo *info, guint32 type) { - g_assert (info != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); - return gsignond_dictionary_set ( - info, - GSIGNOND_IDENTITY_INFO_TYPE, - g_variant_new_int32 (type)); + if (gsignond_identity_info_get_identity_type (info) == type) + return TRUE; + + return gsignond_dictionary_set (info->map, + GSIGNOND_IDENTITY_INFO_TYPE, + g_variant_new_int32 (type)) && + gsignond_identity_info_set_edit_flags (info, + IDENTITY_INFO_PROP_TYPE); } /** @@ -1036,7 +1176,8 @@ gsignond_identity_info_compare ( GSignondIdentityInfo *info, GSignondIdentityInfo *other) { - g_assert (info != NULL && other != NULL); + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), FALSE); + g_return_val_if_fail (other && GSIGNOND_IS_IDENTITY_INFO (other), FALSE); GSequence *info_realms = NULL, *other_realms = NULL; GHashTable *info_methods = NULL, *other_methods = NULL; @@ -1132,10 +1273,45 @@ gsignond_identity_info_compare ( return TRUE; } +/** + * gsignond_identity_info_to_variant: + * @info: instance of #GSignondIdentityInfo + * + * Converts the #GSignondIndentityInfo to a #GVariant. + * + * Returns: (transfer full): #GVariant object if successful, NULL otherwise. + */ +GVariant * +gsignond_identity_info_to_variant (GSignondIdentityInfo *info) +{ + gboolean username_is_secret ; + + g_return_val_if_fail (info && GSIGNOND_IS_IDENTITY_INFO (info), NULL); + + username_is_secret = gsignond_identity_info_get_is_username_secret (info); + + if (username_is_secret) + return gsignond_dictionary_to_variant (info->map); + else { + GVariant *vdict = NULL; + GVariantBuilder *builder = + gsignond_dictionary_to_variant_builder (info->map); + if (!builder) return NULL; + + g_variant_builder_add (builder, "{sv}", GSIGNOND_IDENTITY_INFO_USERNAME, + g_variant_new_string (info->username ? info->username : "")); + + vdict = g_variant_builder_end (builder); + + g_variant_builder_unref (builder); + + return vdict; + } +} + void gsignond_identity_info_list_free (GSignondIdentityInfoList *list) { g_return_if_fail (list != NULL); g_list_free_full (list, (GDestroyNotify)gsignond_identity_info_unref); } - diff --git a/src/common/gsignond-identity-info.h b/src/common/gsignond-identity-info.h index be6d318..d882e16 100644 --- a/src/common/gsignond-identity-info.h +++ b/src/common/gsignond-identity-info.h @@ -33,24 +33,34 @@ G_BEGIN_DECLS -#define GSIGNOND_TYPE_IDENTITY_INFO (GSIGNOND_TYPE_DICTIONARY) - -#define GSIGNOND_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ +#define GSIGNOND_TYPE_IDENTITY_INFO (gsignond_identity_info_get_type()) +#define GSIGNOND_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ GSIGNOND_TYPE_IDENTITY_INFO, \ GSignondIdentityInfo)) -#define GSIGNOND_IS_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ - GSIGNOND_TYPE_IDENTITY_INFO)) +/*#define GSIGNOND_IS_IDENTITY_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + GSIGNOND_TYPE_IDENTITY_INFO))*/ + +#define GSIGNOND_IS_IDENTITY_INFO(obj) (obj) -typedef GSignondDictionary GSignondIdentityInfo; +typedef struct _GSignondIdentityInfo GSignondIdentityInfo; typedef GList GSignondIdentityInfoList; +GType gsignond_identity_info_get_type (void) G_GNUC_CONST; + + GSignondIdentityInfo * gsignond_identity_info_new (void); GSignondIdentityInfo * +gsignond_identity_info_new_from_variant (GVariant *variatn_mp); + +GVariant * +gsignond_identity_info_to_variant (GSignondIdentityInfo *info); + +GSignondIdentityInfo * gsignond_identity_info_copy (GSignondIdentityInfo *info); -void +GSignondIdentityInfo * gsignond_identity_info_ref (GSignondIdentityInfo *info); void @@ -78,9 +88,6 @@ gsignond_identity_info_set_username ( GSignondIdentityInfo *info, const gchar *username); -void -gsignond_identity_info_remove_username (GSignondIdentityInfo *info); - gboolean gsignond_identity_info_get_is_username_secret (GSignondIdentityInfo *info); @@ -97,9 +104,6 @@ gsignond_identity_info_set_secret ( GSignondIdentityInfo *info, const gchar *secret); -void -gsignond_identity_info_remove_secret (GSignondIdentityInfo *info); - gboolean gsignond_identity_info_get_store_secret (GSignondIdentityInfo *info); @@ -179,6 +183,9 @@ gsignond_identity_info_compare ( GSignondIdentityInfo *info, GSignondIdentityInfo *other); +GVariant * +gsignond_identity_info_to_variant (GSignondIdentityInfo *info); + void gsignond_identity_info_list_free (GSignondIdentityInfoList *list); diff --git a/src/common/gsignond-plugin-interface.c b/src/common/gsignond-plugin-interface.c index be98631..a0db247 100644 --- a/src/common/gsignond-plugin-interface.c +++ b/src/common/gsignond-plugin-interface.c @@ -29,10 +29,10 @@ /** * SECTION:gsignond-plugin-interface - * @short_description: an interface for implementing authentication plugins + * @short_description: an interface for implementing GLib-based authentication plugins * @include: gsignond/gsignond-plugin-interface.h * - * #GSignondPlugin is an interface for implementing authentication plugins. + * #GSignondPlugin is an interface for implementing GLib-based authentication plugins. * * When creating a plugin, write the #GObject boilerplate code as usual, but * diff --git a/src/common/gsignond-session-data.c b/src/common/gsignond-session-data.c index a8583f3..6e0b49f 100644 --- a/src/common/gsignond-session-data.c +++ b/src/common/gsignond-session-data.c @@ -23,7 +23,8 @@ * 02110-1301 USA */ -#include +#include "gsignond/gsignond-session-data.h" +#include "gsignond/gsignond-utils.h" /** @@ -132,6 +133,36 @@ gsignond_session_data_get_realm (GSignondSessionData *data) } /** + * gsignond_session_data_set_allowed_realms: + * @data: a #GSignondDictionary structure + * @realms: a #GSequence if allowed realms + * + * A setter for a list of realms allowed for the identity use. + */ +void +gsignond_session_data_set_allowed_realms (GSignondSessionData *data, + GSequence *realms) +{ + gsignond_dictionary_set (data, "AllowedRealms", + gsignond_sequence_to_variant (realms)); +} + +/** + * gsignond_session_data_get_allowed_realms: + * @data: a #GSignondDictionary structure + * + * A getter for a list of realms allowed for the identity use. + * + * Returns: (transfer full): #GSequence of allowed realms + */ +GSequence * +gsignond_session_data_get_allowed_realms (GSignondSessionData *data) +{ + return gsignond_variant_to_sequence (gsignond_dictionary_get (data, + "AllowedRealms")); +} + +/** * gsignond_session_data_set_realm: * @data: a #GSignondDictionary structure * @realm: a realm to set diff --git a/src/common/gsignond-storage-manager.c b/src/common/gsignond-storage-manager.c index 7df6c27..7483527 100644 --- a/src/common/gsignond-storage-manager.c +++ b/src/common/gsignond-storage-manager.c @@ -28,6 +28,8 @@ #include +#include "config.h" + #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-storage-manager.h" #include "gsignond/gsignond-utils.h" @@ -81,14 +83,16 @@ _set_config (GSignondStorageManager *self, GSignondConfig *config) const gchar *storage_path = gsignond_config_get_string ( self->config, GSIGNOND_CONFIG_GENERAL_STORAGE_PATH); - if (storage_path) - self->location = g_build_filename (storage_path, - user_dir, - NULL); - else - self->location = g_build_filename ("/var/db", - user_dir, - NULL); + if (!storage_path) { + storage_path = BASE_STORAGE_DIR; + DBG ("storage path not configured, using default location"); + } +# ifdef ENABLE_DEBUG + const gchar *env_val = g_getenv("SSO_STORAGE_PATH"); + if (env_val) + storage_path = env_val; +# endif + self->location = g_build_filename (storage_path, user_dir, NULL); g_free (user_dir); DBG ("secure dir %s", self->location); } @@ -285,7 +289,7 @@ gsignond_storage_manager_init (GSignondStorageManager *self) * @self: object instance. * * Initialize encryption storage. This means making sure that the - * necessary directories exist and are accessible. + * necessary directories under #GSIGNOND_CONFIG_GENERAL_STORAGE_PATH exist and are accessible. * * Returns: success? */ @@ -332,7 +336,8 @@ gsignond_storage_manager_storage_is_initialized (GSignondStorageManager *self) * @self: object instance. * * Mounts an encrypted storage and returns the filesystem path of the storage - * mount point. This path will be used to access the secret database via + * mount point. This path will be set in #GSignondConfig as + * #GSIGNOND_CONFIG_GENERAL_SECURE_DIR and used to access the secret database via * #GSignondSecretStorage. * * The default implemenation does nothing, and immediately returns the path for the diff --git a/src/common/gsignond-utils.c b/src/common/gsignond-utils.c index df84032..83466fd 100644 --- a/src/common/gsignond-utils.c +++ b/src/common/gsignond-utils.c @@ -264,3 +264,184 @@ nonce_exit: return nonce; } +static gint +_compare_strings ( + const gchar* a, + const gchar* b, + gpointer data) +{ + (void)data; + return g_strcmp0 (a,b); +} + +/** + * gsignond_sequence_to_variant: + * @seq: Sequence of strings to convert + * + * Convert a string sequence to a variant. + * + * Returns: (transfer full): #GVariant of type "as". + */ +GVariant * +gsignond_sequence_to_variant (GSequence *seq) +{ + GSequenceIter * iter = NULL; + GVariant *var = NULL; + GVariantBuilder builder; + + if (!seq) return NULL; + + g_variant_builder_init (&builder, G_VARIANT_TYPE_STRING_ARRAY); + iter = g_sequence_get_begin_iter (seq); + while (!g_sequence_iter_is_end (iter)) { + const gchar * d = g_sequence_get (iter); + g_variant_builder_add (&builder, "s", d); + iter = g_sequence_iter_next (iter); + } + var = g_variant_builder_end (&builder); + return var; +} + +/** + * gsignond_variant_to_sequence: + * @var: Variant of "as" to convert + * + * Convert variant containing string array to sequence. + * + * Returns: (transfer full): #GSequence of strings + */ +GSequence * +gsignond_variant_to_sequence (GVariant *var) +{ + GVariantIter iter; + GSequence *seq = NULL; + gchar *item = NULL; + + if (!var) return NULL; + + seq = g_sequence_new ((GDestroyNotify)g_free); + g_variant_iter_init (&iter, var); + while (g_variant_iter_next (&iter, "s", &item)) { + g_sequence_insert_sorted (seq, + item, + (GCompareDataFunc) _compare_strings, + NULL); + } + return seq; +} + +/** + * gsignond_sequence_to_array: + * @seq: Sequence of strings to convert + * + * Convert sequence of strings to null-terminated string array. + * + * Returns: (transfer full): Null-terminated array of strings + */ +gchar ** +gsignond_sequence_to_array (GSequence *seq) +{ + gchar **items, **temp; + GSequenceIter *iter; + + if (!seq) return NULL; + + items = g_malloc0 ((g_sequence_get_length (seq) + 1) * sizeof (gchar *)); + temp = items; + for (iter = g_sequence_get_begin_iter (seq); + iter != g_sequence_get_end_iter (seq); + iter = g_sequence_iter_next (iter)) { + *temp = g_sequence_get (iter); + temp++; + } + return items; +} + +/** + * gsignond_array_to_sequence: + * @items: (transfer full): Null-terminated array of strings to convert + * + * Convert null-terminated array of strings to a sequence. + * + * Returns: (transfer full): #GSequence of strings + */ +GSequence * +gsignond_array_to_sequence (gchar **items) +{ + gchar **item_iter = items; + GSequence *seq = NULL; + + if (!items) return NULL; + + seq = g_sequence_new ((GDestroyNotify) g_free); + while (*item_iter) { + g_sequence_insert_sorted (seq, + *item_iter, + (GCompareDataFunc) _compare_strings, + NULL); + item_iter++; + } + g_free (items); + return seq; +} + +/** + * gsignond_copy_array_to_sequence: + * @items: Null-terminated array of strings to copy + * + * Copy null-terminated array of strings to a sequence. + * + * Returns: (transfer full): #GSequence of strings + */ +GSequence * +gsignond_copy_array_to_sequence (const gchar **items) +{ + GSequence *seq = NULL; + + if (!items) return NULL; + + seq = g_sequence_new ((GDestroyNotify) g_free); + while (*items) { + g_sequence_insert_sorted (seq, + g_strdup (*items), + (GCompareDataFunc) _compare_strings, + NULL); + items++; + } + return seq; +} + +/** + * gsignond_is_host_in_domain: + * @domain: a domain name + * @host: a host name + * + * Checks if @host belongs to @domain. + * + * Returns: the result + */ +gboolean +gsignond_is_host_in_domain(const gchar *host, const gchar *domain) +{ + gchar** domain_parts = g_strsplit(domain, ".", 0); + gchar** host_parts = g_strsplit(host, ".", 0); + gchar** truncated_host_parts = host_parts; + + guint domain_parts_n = g_strv_length(domain_parts); + guint host_parts_n = g_strv_length(host_parts); + + gint extra_host_parts_n = host_parts_n - domain_parts_n; + + while (extra_host_parts_n > 0) { + truncated_host_parts++; + extra_host_parts_n--; + } + gchar* truncated_host = g_strjoinv(".", truncated_host_parts); + gint result = g_strcmp0(domain, truncated_host); + + g_free(truncated_host); + g_strfreev(host_parts); + g_strfreev(domain_parts); + + return result == 0 ? TRUE : FALSE; +} \ No newline at end of file diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index 2feb112..d88f169 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -1,3 +1,4 @@ +include $(top_srcdir)/common.mk SUBDIRS = db dbus plugins NULL= @@ -25,7 +26,6 @@ gsignond_includedir = $(includedir)/gsignond gsignond_pubhdr = ../../include/gsignond gsignond_include_HEADERS = \ $(gsignond_pubhdr)/gsignond-access-control-manager.h \ - $(gsignond_pubhdr)/gsignond-config-db.h \ $(gsignond_pubhdr)/gsignond-config-dbus.h \ $(gsignond_pubhdr)/gsignond-config-general.h \ $(gsignond_pubhdr)/gsignond-config.h \ @@ -64,6 +64,7 @@ gsignond_CFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/include/ \ -I$(top_srcdir)/src/ \ + -DGSIGNOND_EXTENSIONS_DIR='"$(extensionsdir)"' \ $(GSIGNOND_CFLAGS) \ $(NULL) diff --git a/src/daemon/Makefile.in b/src/daemon/Makefile.in index 36c7c95..2829e84 100644 --- a/src/daemon/Makefile.in +++ b/src/daemon/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,23 +17,6 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,10 +35,10 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +DIST_COMMON = $(gsignond_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/common.mk bin_PROGRAMS = gsignond$(EXEEXT) subdir = src/daemon -DIST_COMMON = $(gsignond_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -129,11 +112,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -204,6 +182,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -230,6 +209,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -242,6 +222,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -334,6 +315,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +extensionsdir = $(pkglibdir)/extensions +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins SUBDIRS = db dbus plugins NULL = BUILT_SOURCES = \ @@ -345,7 +329,6 @@ gsignond_includedir = $(includedir)/gsignond gsignond_pubhdr = ../../include/gsignond gsignond_include_HEADERS = \ $(gsignond_pubhdr)/gsignond-access-control-manager.h \ - $(gsignond_pubhdr)/gsignond-config-db.h \ $(gsignond_pubhdr)/gsignond-config-dbus.h \ $(gsignond_pubhdr)/gsignond-config-general.h \ $(gsignond_pubhdr)/gsignond-config.h \ @@ -384,6 +367,7 @@ gsignond_CFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/include/ \ -I$(top_srcdir)/src/ \ + -DGSIGNOND_EXTENSIONS_DIR='"$(extensionsdir)"' \ $(GSIGNOND_CFLAGS) \ $(NULL) @@ -405,7 +389,7 @@ all: $(BUILT_SOURCES) .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -426,6 +410,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/common.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -437,11 +422,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -613,11 +595,8 @@ clean-libtool: -rm -rf .libs _libs install-gsignond_includeHEADERS: $(gsignond_include_HEADERS) @$(NORMAL_INSTALL) + test -z "$(gsignond_includedir)" || $(MKDIR_P) "$(DESTDIR)$(gsignond_includedir)" @list='$(gsignond_include_HEADERS)'; test -n "$(gsignond_includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(gsignond_includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(gsignond_includedir)" || exit 1; \ - fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -800,10 +779,13 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/src/daemon/db/Makefile.in b/src/daemon/db/Makefile.in index 7bf4f14..091fc58 100644 --- a/src/daemon/db/Makefile.in +++ b/src/daemon/db/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -105,11 +88,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgsignond_db_la_SOURCES) DIST_SOURCES = $(libgsignond_db_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -121,6 +99,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -147,6 +126,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -159,6 +139,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ diff --git a/src/daemon/db/gsignond-db-credentials-database.c b/src/daemon/db/gsignond-db-credentials-database.c index 33e0c6c..7189cad 100644 --- a/src/daemon/db/gsignond-db-credentials-database.c +++ b/src/daemon/db/gsignond-db-credentials-database.c @@ -27,6 +27,7 @@ #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-credentials.h" #include "common/db/gsignond-db-error.h" +#include "common/gsignond-identity-info-internal.h" #include "gsignond-db-credentials-database.h" #define GSIGNOND_DB_CREDENTIALS_DATABASE_GET_PRIVATE(obj) \ @@ -294,7 +295,10 @@ gsignond_db_credentials_database_load_identity ( identity = gsignond_db_metadata_database_get_identity ( self->priv->metadata_db, identity_id); - if (identity && query_secret && + if (!identity) + return identity; + + if (query_secret && !gsignond_identity_info_get_is_identity_new (identity) && gsignond_db_credentials_database_is_open_secret_storage (self)) { @@ -315,6 +319,8 @@ gsignond_db_credentials_database_load_identity ( } } } + /* Reseting the edit state to NONE as its newly loaded identity */ + gsignond_identity_info_reset_edit_flags (identity, IDENTITY_INFO_PROP_NONE); return identity; } @@ -367,8 +373,12 @@ gsignond_db_credentials_database_update_identity ( id = gsignond_db_metadata_database_update_identity (self->priv->metadata_db, identity); - if (id != 0 && - gsignond_db_credentials_database_is_open_secret_storage (self)) { + if (!id) return 0; + + /* Reseting the edit state to NONE as all the changes are stored in db. */ + gsignond_identity_info_reset_edit_flags (identity, IDENTITY_INFO_PROP_NONE); + + if (gsignond_db_credentials_database_is_open_secret_storage (self)) { GSignondCredentials *creds = NULL; gboolean un_sec, pwd_sec; const gchar *tmp_str = NULL; diff --git a/src/daemon/db/gsignond-db-metadata-database.c b/src/daemon/db/gsignond-db-metadata-database.c index 8b76b3a..5c08c5e 100644 --- a/src/daemon/db/gsignond-db-metadata-database.c +++ b/src/daemon/db/gsignond-db-metadata-database.c @@ -31,8 +31,11 @@ #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-config.h" #include "common/db/gsignond-db-error.h" +#include "common/gsignond-identity-info-internal.h" #include "gsignond-db-metadata-database.h" +#define GSIGNOND_METADATA_DB_FILENAME "metadata.db" + #define RETURN_IF_NOT_OPEN(obj, retval) \ if (gsignond_db_sql_database_is_open (obj) == FALSE) { \ GError* last_error = gsignond_db_create_error( \ @@ -904,18 +907,14 @@ _gsignond_db_metadata_database_clear ( gboolean gsignond_db_metadata_database_open (GSignondDbMetadataDatabase *self) { - const gchar *filename = NULL; - g_return_val_if_fail (GSIGNOND_DB_IS_METADATA_DATABASE (self), FALSE); if (gsignond_db_sql_database_is_open (GSIGNOND_DB_SQL_DATABASE (self))) return TRUE; - filename = gsignond_config_get_string (self->config, - GSIGNOND_CONFIG_DB_METADATA_DB_FILENAME); - return _gsignond_db_metadata_database_open ( - GSIGNOND_DB_SQL_DATABASE (self), filename, + GSIGNOND_DB_SQL_DATABASE (self), + GSIGNOND_METADATA_DB_FILENAME, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE); } @@ -1063,11 +1062,23 @@ gsignond_db_metadata_database_update_identity ( GHashTableIter method_iter; const gchar *method = NULL; GSequence *mechanisms = NULL; + GSignondIdentityInfoPropFlags edit_flags; + gboolean was_new_identity; g_return_val_if_fail (GSIGNOND_DB_IS_METADATA_DATABASE (self), 0); g_return_val_if_fail (identity != NULL, 0); RETURN_IF_NOT_OPEN (GSIGNOND_DB_SQL_DATABASE (self), id); + edit_flags = gsignond_identity_info_get_edit_flags (identity); + + DBG ("Identity EDIT FLAGS : %x", edit_flags); + if (edit_flags == IDENTITY_INFO_PROP_NONE) { + DBG("No Changes found to update"); + return gsignond_identity_info_get_id (identity); + } + + was_new_identity = gsignond_identity_info_get_is_identity_new (identity); + sql = GSIGNOND_DB_SQL_DATABASE (self); if (!gsignond_db_sql_database_start_transaction (sql)) { return 0; @@ -1081,50 +1092,78 @@ gsignond_db_metadata_database_update_identity ( return 0; } - if (!gsignond_identity_info_get_is_identity_new (identity)) { - DBG ("Remove old acl and owner list as identity is not new"); - /* remove acl */ - _gsignond_db_metadata_database_exec (self, - "DELETE FROM ACL WHERE identity_id = %u;", id); - - /* remove owner */ - _gsignond_db_metadata_database_exec (self, - "DELETE FROM OWNER WHERE identity_id = %u;", id); - } - - /* methods */ - methods = gsignond_identity_info_get_methods (identity); - if (!_gsignond_db_metadata_database_insert_methods (self, identity, - methods)) { - DBG ("Update methods failed"); + /* realms */ + if (edit_flags & IDENTITY_INFO_PROP_REALMS) { + realms = gsignond_identity_info_get_realms (identity); + if (!_gsignond_db_metadata_database_update_realms (self, + identity, id, realms)) { + DBG ("Update realms failed"); + gsignond_db_sql_database_rollback_transaction (sql); + goto finished; + } } - /* realms */ - realms = gsignond_identity_info_get_realms (identity); - if (!_gsignond_db_metadata_database_update_realms (self, - identity, id, realms)) { - DBG ("Update realms failed"); + /* owner */ + owner = gsignond_identity_info_get_owner (identity); + if (!owner) { + WARN("Missing mandatory owner field"); gsignond_db_sql_database_rollback_transaction (sql); goto finished; } + if (edit_flags & IDENTITY_INFO_PROP_OWNER) { + if (!was_new_identity) { + /* remove owner */ + _gsignond_db_metadata_database_exec (self, + "DELETE FROM OWNER WHERE identity_id = %u;", id); + } + if (!_gsignond_db_metadata_database_update_owner (self, identity, owner)){ + DBG ("Update owner failed"); + gsignond_db_sql_database_rollback_transaction (sql); + goto finished; + } + + /* insert owner */ + _gsignond_db_metadata_database_exec (self, + "INSERT OR REPLACE INTO OWNER " + "(identity_id, secctx_id) " + "VALUES ( %u, " + "( SELECT id FROM SECCTX WHERE sysctx = %Q AND appctx = %Q ));", + id, owner->sys_ctx, owner->app_ctx); + } + /* acl */ acl = gsignond_identity_info_get_access_control_list (identity); - if (!_gsignond_db_metadata_database_update_acl (self, identity, acl)) { - DBG ("Update acl failed"); + if (!acl) { + WARN("Missing mandatory ACL field"); gsignond_db_sql_database_rollback_transaction (sql); goto finished; } - - /* owner */ - owner = gsignond_identity_info_get_owner (identity); - if (!_gsignond_db_metadata_database_update_owner (self, identity, owner)){ - DBG ("Update owner failed"); - gsignond_db_sql_database_rollback_transaction (sql); - goto finished; + if (edit_flags & IDENTITY_INFO_PROP_ACL) { + if (!was_new_identity) { + /* remove acl */ + _gsignond_db_metadata_database_exec (self, + "DELETE FROM ACL WHERE identity_id = %u;", id); + } + if (!_gsignond_db_metadata_database_update_acl (self, identity, acl)) { + DBG ("Update acl failed"); + gsignond_db_sql_database_rollback_transaction (sql); + goto finished; + } } + /* methods */ + methods = gsignond_identity_info_get_methods (identity); + if (edit_flags & IDENTITY_INFO_PROP_METHODS) { + if (!_gsignond_db_metadata_database_insert_methods (self, identity, + methods)) { + DBG ("Update methods failed"); + } + } + if ((edit_flags & IDENTITY_INFO_PROP_ACL || + edit_flags & IDENTITY_INFO_PROP_METHODS) && + methods) { /* ACL insert, this will do basically identity level ACL */ g_hash_table_iter_init (&method_iter, methods); while (g_hash_table_iter_next (&method_iter, (gpointer)&method, @@ -1199,14 +1238,7 @@ gsignond_db_metadata_database_update_identity ( id, ctx->sys_ctx, ctx->app_ctx); } } - - /* insert owner */ - _gsignond_db_metadata_database_exec (self, - "INSERT OR REPLACE INTO OWNER " - "(identity_id, secctx_id) " - "VALUES ( %u, " - "( SELECT id FROM SECCTX WHERE sysctx = %Q AND appctx = %Q ));", - id, owner->sys_ctx, owner->app_ctx); + } if (gsignond_db_sql_database_commit_transaction (sql)) { DBG ("Identity updated"); @@ -1262,7 +1294,7 @@ gsignond_db_metadata_database_get_identity ( identity); sqlite3_free (query); if (G_UNLIKELY (rows <= 0)) { - DBG ("Fetch IDENTITY failed"); + DBG ("Fetch IDENTITY '%d' failed", identity_id); gsignond_identity_info_unref (identity); return NULL; } diff --git a/src/daemon/dbus/Makefile.am b/src/daemon/dbus/Makefile.am index bfc2982..d5976db 100644 --- a/src/daemon/dbus/Makefile.am +++ b/src/daemon/dbus/Makefile.am @@ -16,7 +16,7 @@ DBUS_BUILT_DOCS = \ gsignond-dbus-auth-service-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.AuthService.xml \ gsignond-dbus-auth-session-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.AuthSession.xml \ gsignond-dbus-identity-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.Identity.xml \ - gsignond-dbus-remote-plugin-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml \ + gsignond-dbus-remote-plugin-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1.xml \ $(NULL) DBUS_INTERFACE_PREFIX="com.google.code.AccountsSSO.gSingleSignOn." @@ -63,7 +63,7 @@ libgsignond_dbus_glue_la_LIBADD = \ $(GSIGNOND_LIBS) \ $(NULL) -libgsignond_dbus_glue_la_SOURCES = $(DBUS_BUILT_SOURCES) +nodist_libgsignond_dbus_glue_la_SOURCES = $(DBUS_BUILT_SOURCES) noinst_LTLIBRARIES += libgsignond-dbus.la @@ -81,7 +81,6 @@ libgsignond_dbus_la_LIBADD = \ $(NULL) libgsignond_dbus_la_SOURCES = \ - $(DBUS_BUILT_SOURCES) \ gsignond-dbus.h \ gsignond-dbus-server.c \ gsignond-dbus-server.h \ @@ -95,6 +94,10 @@ libgsignond_dbus_la_SOURCES = \ gsignond-dbus-signonui-adapter.h \ $(NULL) +nodist_libgsignond_dbus_la_SOURCES = \ + $(DBUS_BUILT_SOURCES) \ + $(NULL) + dbusservicedir = $(DBUS_SERVICES_DIR) dbusservice_DATA = \ $(SERVICES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.service @@ -109,6 +112,6 @@ dbusinterfaces_DATA = \ EXTRA_DIST = interfaces -clean-local : - rm -f *~ $(DBUS_BUILT_SOURCES) $(DBUS_BUILT_DOCS) +#clean-local : +# rm -f *~ $(DBUS_BUILT_SOURCES) $(DBUS_BUILT_DOCS) diff --git a/src/daemon/dbus/Makefile.in b/src/daemon/dbus/Makefile.in index 8a7ea13..e70888f 100644 --- a/src/daemon/dbus/Makefile.in +++ b/src/daemon/dbus/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,23 +17,6 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -77,27 +60,29 @@ am__objects_2 = \ libgsignond_dbus_glue_la-gsignond-dbus-identity-gen.lo \ libgsignond_dbus_glue_la-gsignond-dbus-remote-plugin-gen.lo \ $(am__objects_1) -am_libgsignond_dbus_glue_la_OBJECTS = $(am__objects_2) +nodist_libgsignond_dbus_glue_la_OBJECTS = $(am__objects_2) libgsignond_dbus_glue_la_OBJECTS = \ - $(am_libgsignond_dbus_glue_la_OBJECTS) + $(nodist_libgsignond_dbus_glue_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libgsignond_dbus_la_DEPENDENCIES = libgsignond-dbus-glue.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__objects_3 = libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo \ - libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo \ - libgsignond_dbus_la-gsignond-dbus-identity-gen.lo \ - libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo \ - $(am__objects_1) -am_libgsignond_dbus_la_OBJECTS = $(am__objects_3) \ +am_libgsignond_dbus_la_OBJECTS = \ libgsignond_dbus_la-gsignond-dbus-server.lo \ libgsignond_dbus_la-gsignond-dbus-auth-service-adapter.lo \ libgsignond_dbus_la-gsignond-dbus-auth-session-adapter.lo \ libgsignond_dbus_la-gsignond-dbus-identity-adapter.lo \ libgsignond_dbus_la-gsignond-dbus-signonui-adapter.lo \ $(am__objects_1) -libgsignond_dbus_la_OBJECTS = $(am_libgsignond_dbus_la_OBJECTS) +am__objects_3 = libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo \ + libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo \ + libgsignond_dbus_la-gsignond-dbus-identity-gen.lo \ + libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo \ + $(am__objects_1) +nodist_libgsignond_dbus_la_OBJECTS = $(am__objects_3) $(am__objects_1) +libgsignond_dbus_la_OBJECTS = $(am_libgsignond_dbus_la_OBJECTS) \ + $(nodist_libgsignond_dbus_la_OBJECTS) DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -124,15 +109,10 @@ am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libgsignond_dbus_glue_la_SOURCES) \ - $(libgsignond_dbus_la_SOURCES) -DIST_SOURCES = $(libgsignond_dbus_glue_la_SOURCES) \ - $(libgsignond_dbus_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac +SOURCES = $(nodist_libgsignond_dbus_glue_la_SOURCES) \ + $(libgsignond_dbus_la_SOURCES) \ + $(nodist_libgsignond_dbus_la_SOURCES) +DIST_SOURCES = $(libgsignond_dbus_la_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -175,6 +155,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -201,6 +182,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -213,6 +195,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -323,7 +306,7 @@ DBUS_BUILT_DOCS = \ gsignond-dbus-auth-service-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.AuthService.xml \ gsignond-dbus-auth-session-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.AuthSession.xml \ gsignond-dbus-identity-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.Identity.xml \ - gsignond-dbus-remote-plugin-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml \ + gsignond-dbus-remote-plugin-doc-gen-com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1.xml \ $(NULL) DBUS_INTERFACE_PREFIX = "com.google.code.AccountsSSO.gSingleSignOn." @@ -337,7 +320,7 @@ libgsignond_dbus_glue_la_LIBADD = \ $(GSIGNOND_LIBS) \ $(NULL) -libgsignond_dbus_glue_la_SOURCES = $(DBUS_BUILT_SOURCES) +nodist_libgsignond_dbus_glue_la_SOURCES = $(DBUS_BUILT_SOURCES) libgsignond_dbus_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/include \ @@ -352,7 +335,6 @@ libgsignond_dbus_la_LIBADD = \ $(NULL) libgsignond_dbus_la_SOURCES = \ - $(DBUS_BUILT_SOURCES) \ gsignond-dbus.h \ gsignond-dbus-server.c \ gsignond-dbus-server.h \ @@ -366,6 +348,10 @@ libgsignond_dbus_la_SOURCES = \ gsignond-dbus-signonui-adapter.h \ $(NULL) +nodist_libgsignond_dbus_la_SOURCES = \ + $(DBUS_BUILT_SOURCES) \ + $(NULL) + dbusservicedir = $(DBUS_SERVICES_DIR) dbusservice_DATA = \ $(SERVICES_DIR)/com.google.code.AccountsSSO.gSingleSignOn.service @@ -500,34 +486,6 @@ libgsignond_dbus_glue_la-gsignond-dbus-remote-plugin-gen.lo: gsignond-dbus-remot @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_glue_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_glue_la-gsignond-dbus-remote-plugin-gen.lo `test -f 'gsignond-dbus-remote-plugin-gen.c' || echo '$(srcdir)/'`gsignond-dbus-remote-plugin-gen.c -libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo: gsignond-dbus-auth-service-gen.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-service-gen.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo `test -f 'gsignond-dbus-auth-service-gen.c' || echo '$(srcdir)/'`gsignond-dbus-auth-service-gen.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-service-gen.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-service-gen.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-dbus-auth-service-gen.c' object='libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo `test -f 'gsignond-dbus-auth-service-gen.c' || echo '$(srcdir)/'`gsignond-dbus-auth-service-gen.c - -libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo: gsignond-dbus-auth-session-gen.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-session-gen.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo `test -f 'gsignond-dbus-auth-session-gen.c' || echo '$(srcdir)/'`gsignond-dbus-auth-session-gen.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-session-gen.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-session-gen.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-dbus-auth-session-gen.c' object='libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo `test -f 'gsignond-dbus-auth-session-gen.c' || echo '$(srcdir)/'`gsignond-dbus-auth-session-gen.c - -libgsignond_dbus_la-gsignond-dbus-identity-gen.lo: gsignond-dbus-identity-gen.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-identity-gen.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-identity-gen.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-identity-gen.lo `test -f 'gsignond-dbus-identity-gen.c' || echo '$(srcdir)/'`gsignond-dbus-identity-gen.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-identity-gen.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-identity-gen.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-dbus-identity-gen.c' object='libgsignond_dbus_la-gsignond-dbus-identity-gen.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-identity-gen.lo `test -f 'gsignond-dbus-identity-gen.c' || echo '$(srcdir)/'`gsignond-dbus-identity-gen.c - -libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo: gsignond-dbus-remote-plugin-gen.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo `test -f 'gsignond-dbus-remote-plugin-gen.c' || echo '$(srcdir)/'`gsignond-dbus-remote-plugin-gen.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-dbus-remote-plugin-gen.c' object='libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo `test -f 'gsignond-dbus-remote-plugin-gen.c' || echo '$(srcdir)/'`gsignond-dbus-remote-plugin-gen.c - libgsignond_dbus_la-gsignond-dbus-server.lo: gsignond-dbus-server.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-server.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-server.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-server.lo `test -f 'gsignond-dbus-server.c' || echo '$(srcdir)/'`gsignond-dbus-server.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-server.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-server.Plo @@ -563,6 +521,34 @@ libgsignond_dbus_la-gsignond-dbus-signonui-adapter.lo: gsignond-dbus-signonui-ad @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-signonui-adapter.lo `test -f 'gsignond-dbus-signonui-adapter.c' || echo '$(srcdir)/'`gsignond-dbus-signonui-adapter.c +libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo: gsignond-dbus-auth-service-gen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-service-gen.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo `test -f 'gsignond-dbus-auth-service-gen.c' || echo '$(srcdir)/'`gsignond-dbus-auth-service-gen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-service-gen.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-service-gen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-dbus-auth-service-gen.c' object='libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-auth-service-gen.lo `test -f 'gsignond-dbus-auth-service-gen.c' || echo '$(srcdir)/'`gsignond-dbus-auth-service-gen.c + +libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo: gsignond-dbus-auth-session-gen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-session-gen.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo `test -f 'gsignond-dbus-auth-session-gen.c' || echo '$(srcdir)/'`gsignond-dbus-auth-session-gen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-session-gen.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-auth-session-gen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-dbus-auth-session-gen.c' object='libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-auth-session-gen.lo `test -f 'gsignond-dbus-auth-session-gen.c' || echo '$(srcdir)/'`gsignond-dbus-auth-session-gen.c + +libgsignond_dbus_la-gsignond-dbus-identity-gen.lo: gsignond-dbus-identity-gen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-identity-gen.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-identity-gen.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-identity-gen.lo `test -f 'gsignond-dbus-identity-gen.c' || echo '$(srcdir)/'`gsignond-dbus-identity-gen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-identity-gen.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-identity-gen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-dbus-identity-gen.c' object='libgsignond_dbus_la-gsignond-dbus-identity-gen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-identity-gen.lo `test -f 'gsignond-dbus-identity-gen.c' || echo '$(srcdir)/'`gsignond-dbus-identity-gen.c + +libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo: gsignond-dbus-remote-plugin-gen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo -MD -MP -MF $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.Tpo -c -o libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo `test -f 'gsignond-dbus-remote-plugin-gen.c' || echo '$(srcdir)/'`gsignond-dbus-remote-plugin-gen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.Tpo $(DEPDIR)/libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-dbus-remote-plugin-gen.c' object='libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_dbus_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_dbus_la-gsignond-dbus-remote-plugin-gen.lo `test -f 'gsignond-dbus-remote-plugin-gen.c' || echo '$(srcdir)/'`gsignond-dbus-remote-plugin-gen.c + mostlyclean-libtool: -rm -f *.lo @@ -570,11 +556,8 @@ clean-libtool: -rm -rf .libs _libs install-dbusinterfacesDATA: $(dbusinterfaces_DATA) @$(NORMAL_INSTALL) + test -z "$(dbusinterfacesdir)" || $(MKDIR_P) "$(DESTDIR)$(dbusinterfacesdir)" @list='$(dbusinterfaces_DATA)'; test -n "$(dbusinterfacesdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(dbusinterfacesdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dbusinterfacesdir)" || exit 1; \ - fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -591,11 +574,8 @@ uninstall-dbusinterfacesDATA: dir='$(DESTDIR)$(dbusinterfacesdir)'; $(am__uninstall_files_from_dir) install-dbusserviceDATA: $(dbusservice_DATA) @$(NORMAL_INSTALL) + test -z "$(dbusservicedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" @list='$(dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(dbusservicedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" || exit 1; \ - fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -612,11 +592,8 @@ uninstall-dbusserviceDATA: dir='$(DESTDIR)$(dbusservicedir)'; $(am__uninstall_files_from_dir) install-nodist_dbusserviceDATA: $(nodist_dbusservice_DATA) @$(NORMAL_INSTALL) + test -z "$(dbusservicedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" @list='$(nodist_dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(dbusservicedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" || exit 1; \ - fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -753,8 +730,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-local \ - clean-noinstLTLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -827,14 +804,13 @@ uninstall-am: uninstall-dbusinterfacesDATA uninstall-dbusserviceDATA \ .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-local clean-noinstLTLIBRARIES ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dbusinterfacesDATA \ - install-dbusserviceDATA install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dbusinterfacesDATA install-dbusserviceDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ install-nodist_dbusserviceDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ @@ -875,8 +851,8 @@ gsignond-dbus-remote-plugin-gen.c gsignond-dbus-remote-plugin-gen.h : $(INTERFAC --generate-docbook gsignond-dbus-remote-plugin-doc-gen \ $< -clean-local : - rm -f *~ $(DBUS_BUILT_SOURCES) $(DBUS_BUILT_DOCS) +#clean-local : +# rm -f *~ $(DBUS_BUILT_SOURCES) $(DBUS_BUILT_DOCS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/daemon/dbus/gsignond-dbus-auth-service-adapter.c b/src/daemon/dbus/gsignond-dbus-auth-service-adapter.c index 3c6f162..d99172f 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-service-adapter.c +++ b/src/daemon/dbus/gsignond-dbus-auth-service-adapter.c @@ -398,7 +398,7 @@ _handle_get_identity (GSignondDbusAuthServiceAdapter *self, info = gsignond_identity_get_identity_info (identity); gsignond_dbus_auth_service_complete_get_identity (self->priv->dbus_auth_service, invocation, gsignond_dbus_identity_adapter_get_object_path (dbus_identity), - gsignond_dictionary_to_variant (info)); + gsignond_identity_info_to_variant(info)); } else { g_dbus_method_invocation_return_gerror (invocation, error); @@ -469,7 +469,7 @@ _append_identity_info (gpointer data, gpointer user_data) { GVariantBuilder *builder = (GVariantBuilder *)user_data; - g_variant_builder_add (builder, "@a{sv}", gsignond_dictionary_to_variant ((GSignondIdentityInfo*)data)); + g_variant_builder_add (builder, "@a{sv}", gsignond_identity_info_to_variant ((GSignondIdentityInfo*)data)); } static gboolean diff --git a/src/daemon/dbus/gsignond-dbus-auth-service-gen.c b/src/daemon/dbus/gsignond-dbus-auth-service-gen.c index 1ca2490..bfc141d 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-service-gen.c +++ b/src/daemon/dbus/gsignond-dbus-auth-service-gen.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.32.4. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -167,8 +167,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_regis { { -1, - (gchar *) "applicationContext", - (gchar *) "s", + "applicationContext", + "s", NULL }, FALSE @@ -184,8 +184,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_regis { { -1, - (gchar *) "objectPath", - (gchar *) "o", + "objectPath", + "o", NULL }, FALSE @@ -201,7 +201,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_re { { -1, - (gchar *) "registerNewIdentity", + "registerNewIdentity", (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_register_new_identity_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_register_new_identity_OUT_ARG_pointers, NULL @@ -214,8 +214,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_get_i { { -1, - (gchar *) "id", - (gchar *) "u", + "id", + "u", NULL }, FALSE @@ -225,8 +225,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_get_i { { -1, - (gchar *) "applicationContext", - (gchar *) "s", + "applicationContext", + "s", NULL }, FALSE @@ -243,8 +243,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_get_i { { -1, - (gchar *) "objectPath", - (gchar *) "o", + "objectPath", + "o", NULL }, FALSE @@ -254,8 +254,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_get_i { { -1, - (gchar *) "identityData", - (gchar *) "a{sv}", + "identityData", + "a{sv}", NULL }, FALSE @@ -272,7 +272,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_ge { { -1, - (gchar *) "getIdentity", + "getIdentity", (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_get_identity_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_get_identity_OUT_ARG_pointers, NULL @@ -285,8 +285,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - (gchar *) "authMethods", - (gchar *) "as", + "authMethods", + "as", NULL }, FALSE @@ -302,7 +302,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_qu { { -1, - (gchar *) "queryMethods", + "queryMethods", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_methods_OUT_ARG_pointers, NULL @@ -315,8 +315,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - (gchar *) "method", - (gchar *) "s", + "method", + "s", NULL }, FALSE @@ -332,8 +332,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - (gchar *) "mechanisms", - (gchar *) "as", + "mechanisms", + "as", NULL }, FALSE @@ -349,7 +349,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_qu { { -1, - (gchar *) "queryMechanisms", + "queryMechanisms", (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_mechanisms_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_mechanisms_OUT_ARG_pointers, NULL @@ -362,8 +362,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - (gchar *) "filter", - (gchar *) "a{sv}", + "filter", + "a{sv}", NULL }, FALSE @@ -373,8 +373,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - (gchar *) "applicationContext", - (gchar *) "s", + "applicationContext", + "s", NULL }, FALSE @@ -391,8 +391,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_query { { -1, - (gchar *) "identities", - (gchar *) "aa{sv}", + "identities", + "aa{sv}", NULL }, FALSE @@ -408,7 +408,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_qu { { -1, - (gchar *) "queryIdentities", + "queryIdentities", (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_identities_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_query_identities_OUT_ARG_pointers, NULL @@ -421,8 +421,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_clear { { -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", + "unnamed_arg0", + "b", NULL }, FALSE @@ -438,7 +438,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_cl { { -1, - (gchar *) "clear", + "clear", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_clear_OUT_ARG_pointers, NULL @@ -451,8 +451,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_backu { { -1, - (gchar *) "unnamed_arg0", - (gchar *) "y", + "unnamed_arg0", + "y", NULL }, FALSE @@ -468,7 +468,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_ba { { -1, - (gchar *) "backupStarts", + "backupStarts", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_backup_starts_OUT_ARG_pointers, NULL @@ -481,8 +481,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_backu { { -1, - (gchar *) "unnamed_arg0", - (gchar *) "y", + "unnamed_arg0", + "y", NULL }, FALSE @@ -498,7 +498,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_ba { { -1, - (gchar *) "backupFinished", + "backupFinished", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_backup_finished_OUT_ARG_pointers, NULL @@ -511,8 +511,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_resto { { -1, - (gchar *) "unnamed_arg0", - (gchar *) "y", + "unnamed_arg0", + "y", NULL }, FALSE @@ -528,7 +528,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_re { { -1, - (gchar *) "restoreStarts", + "restoreStarts", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_restore_starts_OUT_ARG_pointers, NULL @@ -541,8 +541,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_service_method_info_resto { { -1, - (gchar *) "unnamed_arg0", - (gchar *) "y", + "unnamed_arg0", + "y", NULL }, FALSE @@ -558,7 +558,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_service_method_info_re { { -1, - (gchar *) "restoreFinished", + "restoreFinished", NULL, (GDBusArgInfo **) &_gsignond_dbus_auth_service_method_info_restore_finished_OUT_ARG_pointers, NULL @@ -586,7 +586,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_service_interface_i { { -1, - (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.AuthService", + "com.google.code.AccountsSSO.gSingleSignOn.AuthService", (GDBusMethodInfo **) &_gsignond_dbus_auth_service_method_info_pointers, NULL, NULL, @@ -606,7 +606,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_service_interface_i GDBusInterfaceInfo * gsignond_dbus_auth_service_interface_info (void) { - return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct; + return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info; } /** @@ -2182,7 +2182,7 @@ gsignond_dbus_auth_service_proxy_g_signal (GDBusProxy *proxy, guint num_params; guint n; guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, signal_name); + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); @@ -2224,7 +2224,7 @@ gsignond_dbus_auth_service_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, key); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2232,7 +2232,7 @@ gsignond_dbus_auth_service_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, invalidated_properties[n]); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2554,7 +2554,7 @@ _gsignond_dbus_auth_service_skeleton_handle_get_property ( _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -2588,7 +2588,7 @@ _gsignond_dbus_auth_service_skeleton_handle_set_property ( _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info.parent_struct, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_service_interface_info, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) diff --git a/src/daemon/dbus/gsignond-dbus-auth-service-gen.h b/src/daemon/dbus/gsignond-dbus-auth-service-gen.h index 60f63bd..d4c6486 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-service-gen.h +++ b/src/daemon/dbus/gsignond-dbus-auth-service-gen.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.32.4. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/daemon/dbus/gsignond-dbus-auth-session-adapter.c b/src/daemon/dbus/gsignond-dbus-auth-session-adapter.c index 53c24e5..084a4bf 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-session-adapter.c +++ b/src/daemon/dbus/gsignond-dbus-auth-session-adapter.c @@ -478,7 +478,7 @@ GSignondDbusAuthSessionAdapter * gsignond_dbus_auth_session_adapter_new (GSignondAuthSession *session, const gchar *app_context, guint timeout) { GError *error = NULL; - GDBusConnection *connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); + GDBusConnection *connection = g_bus_get_sync (GSIGNOND_BUS_TYPE, NULL, &error); if (error) { ERR ("Error getting session bus :%s", error->message); g_error_free (error); diff --git a/src/daemon/dbus/gsignond-dbus-auth-session-gen.c b/src/daemon/dbus/gsignond-dbus-auth-session-gen.c index 76ac813..5beff1c 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-session-gen.c +++ b/src/daemon/dbus/gsignond-dbus-auth-session-gen.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.32.4. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -167,8 +167,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_query { { -1, - (gchar *) "wantedMechanisms", - (gchar *) "as", + "wantedMechanisms", + "as", NULL }, FALSE @@ -184,8 +184,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_query { { -1, - (gchar *) "unnamed_arg1", - (gchar *) "as", + "unnamed_arg1", + "as", NULL }, FALSE @@ -201,7 +201,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_qu { { -1, - (gchar *) "queryAvailableMechanisms", + "queryAvailableMechanisms", (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_query_available_mechanisms_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_query_available_mechanisms_OUT_ARG_pointers, NULL @@ -214,8 +214,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_proce { { -1, - (gchar *) "sessionDataVa", - (gchar *) "a{sv}", + "sessionDataVa", + "a{sv}", NULL }, FALSE @@ -225,8 +225,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_proce { { -1, - (gchar *) "mechanism", - (gchar *) "s", + "mechanism", + "s", NULL }, FALSE @@ -243,8 +243,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_proce { { -1, - (gchar *) "unnamed_arg2", - (gchar *) "a{sv}", + "unnamed_arg2", + "a{sv}", NULL }, FALSE @@ -260,7 +260,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_pr { { -1, - (gchar *) "process", + "process", (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_process_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_process_OUT_ARG_pointers, NULL @@ -272,8 +272,8 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_pr static const GDBusAnnotationInfo _gsignond_dbus_auth_session_method_cancel_annotation_info_0 = { -1, - (gchar *) "org.freedesktop.DBus.Method.NoReply", - (gchar *) "true", + "org.freedesktop.DBus.Method.NoReply", + "true", NULL }; @@ -287,7 +287,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_ca { { -1, - (gchar *) "cancel", + "cancel", NULL, NULL, (GDBusAnnotationInfo **) &_gsignond_dbus_auth_session_method_cancel_annotation_info_pointers @@ -308,8 +308,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_signal_info_state { { -1, - (gchar *) "state", - (gchar *) "i", + "state", + "i", NULL }, FALSE @@ -319,8 +319,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_signal_info_state { { -1, - (gchar *) "message", - (gchar *) "s", + "message", + "s", NULL }, FALSE @@ -337,7 +337,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_auth_session_signal_info_st { { -1, - (gchar *) "stateChanged", + "stateChanged", (GDBusArgInfo **) &_gsignond_dbus_auth_session_signal_info_state_changed_ARG_pointers, NULL }, @@ -348,7 +348,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_auth_session_signal_info_un { { -1, - (gchar *) "unregistered", + "unregistered", NULL, NULL }, @@ -366,7 +366,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_session_interface_i { { -1, - (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.AuthSession", + "com.google.code.AccountsSSO.gSingleSignOn.AuthSession", (GDBusMethodInfo **) &_gsignond_dbus_auth_session_method_info_pointers, (GDBusSignalInfo **) &_gsignond_dbus_auth_session_signal_info_pointers, NULL, @@ -386,7 +386,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_session_interface_i GDBusInterfaceInfo * gsignond_dbus_auth_session_interface_info (void) { - return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct; + return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info; } /** @@ -1000,7 +1000,7 @@ gsignond_dbus_auth_session_proxy_g_signal (GDBusProxy *proxy, guint num_params; guint n; guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, signal_name); + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); @@ -1042,7 +1042,7 @@ gsignond_dbus_auth_session_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, key); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -1050,7 +1050,7 @@ gsignond_dbus_auth_session_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, invalidated_properties[n]); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -1372,7 +1372,7 @@ _gsignond_dbus_auth_session_skeleton_handle_get_property ( _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -1406,7 +1406,7 @@ _gsignond_dbus_auth_session_skeleton_handle_set_property ( _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info.parent_struct, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) diff --git a/src/daemon/dbus/gsignond-dbus-auth-session-gen.h b/src/daemon/dbus/gsignond-dbus-auth-session-gen.h index f1e2405..df5ce8c 100644 --- a/src/daemon/dbus/gsignond-dbus-auth-session-gen.h +++ b/src/daemon/dbus/gsignond-dbus-auth-session-gen.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.32.4. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/daemon/dbus/gsignond-dbus-identity-adapter.c b/src/daemon/dbus/gsignond-dbus-identity-adapter.c index 7de4ef6..53804bf 100644 --- a/src/daemon/dbus/gsignond-dbus-identity-adapter.c +++ b/src/daemon/dbus/gsignond-dbus-identity-adapter.c @@ -837,7 +837,7 @@ GSignondDbusIdentityAdapter * gsignond_dbus_identity_adapter_new (GSignondIdentity *identity, const gchar *app_context, guint timeout) { GError *error = NULL; - GDBusConnection *connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); + GDBusConnection *connection = g_bus_get_sync (GSIGNOND_BUS_TYPE, NULL, &error); if (error) { ERR("failed to connect to session bus : %s", error->message); diff --git a/src/daemon/dbus/gsignond-dbus-identity-gen.c b/src/daemon/dbus/gsignond-dbus-identity-gen.c index b8399cc..7c633f6 100644 --- a/src/daemon/dbus/gsignond-dbus-identity-gen.c +++ b/src/daemon/dbus/gsignond-dbus-identity-gen.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.32.4. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -167,8 +167,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_request_c { { -1, - (gchar *) "message", - (gchar *) "s", + "message", + "s", NULL }, FALSE @@ -184,8 +184,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_request_c { { -1, - (gchar *) "unnamed_arg1", - (gchar *) "u", + "unnamed_arg1", + "u", NULL }, FALSE @@ -201,7 +201,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_reques { { -1, - (gchar *) "requestCredentialsUpdate", + "requestCredentialsUpdate", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_request_credentials_update_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_request_credentials_update_OUT_ARG_pointers, NULL @@ -214,8 +214,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_get_info_ { { -1, - (gchar *) "identityInfo", - (gchar *) "a{sv}", + "identityInfo", + "a{sv}", NULL }, FALSE @@ -231,7 +231,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_get_in { { -1, - (gchar *) "getInfo", + "getInfo", NULL, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_get_info_OUT_ARG_pointers, NULL @@ -244,8 +244,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_get_auth_ { { -1, - (gchar *) "method", - (gchar *) "s", + "method", + "s", NULL }, FALSE @@ -261,8 +261,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_get_auth_ { { -1, - (gchar *) "objectPath", - (gchar *) "o", + "objectPath", + "o", NULL }, FALSE @@ -278,7 +278,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_get_au { { -1, - (gchar *) "getAuthSession", + "getAuthSession", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_get_auth_session_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_get_auth_session_OUT_ARG_pointers, NULL @@ -291,8 +291,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_verify_us { { -1, - (gchar *) "params", - (gchar *) "a{sv}", + "params", + "a{sv}", NULL }, FALSE @@ -308,8 +308,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_verify_us { { -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", + "unnamed_arg1", + "b", NULL }, FALSE @@ -325,7 +325,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_verify { { -1, - (gchar *) "verifyUser", + "verifyUser", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_verify_user_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_verify_user_OUT_ARG_pointers, NULL @@ -338,8 +338,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_verify_se { { -1, - (gchar *) "secret", - (gchar *) "s", + "secret", + "s", NULL }, FALSE @@ -355,8 +355,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_verify_se { { -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", + "unnamed_arg1", + "b", NULL }, FALSE @@ -372,7 +372,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_verify { { -1, - (gchar *) "verifySecret", + "verifySecret", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_verify_secret_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_verify_secret_OUT_ARG_pointers, NULL @@ -385,7 +385,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_remove { { -1, - (gchar *) "remove", + "remove", NULL, NULL, NULL @@ -398,8 +398,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_sign_out_ { { -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", + "unnamed_arg0", + "b", NULL }, FALSE @@ -415,7 +415,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_sign_o { { -1, - (gchar *) "signOut", + "signOut", NULL, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_sign_out_OUT_ARG_pointers, NULL @@ -428,8 +428,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_store_IN_ { { -1, - (gchar *) "unnamed_arg0", - (gchar *) "a{sv}", + "unnamed_arg0", + "a{sv}", NULL }, FALSE @@ -445,8 +445,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_store_OUT { { -1, - (gchar *) "unnamed_arg1", - (gchar *) "u", + "unnamed_arg1", + "u", NULL }, FALSE @@ -462,7 +462,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_store { { -1, - (gchar *) "store", + "store", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_store_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_store_OUT_ARG_pointers, NULL @@ -475,8 +475,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_add_refer { { -1, - (gchar *) "reference", - (gchar *) "s", + "reference", + "s", NULL }, FALSE @@ -492,8 +492,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_add_refer { { -1, - (gchar *) "unnamed_arg1", - (gchar *) "i", + "unnamed_arg1", + "i", NULL }, FALSE @@ -509,7 +509,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_add_re { { -1, - (gchar *) "addReference", + "addReference", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_add_reference_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_add_reference_OUT_ARG_pointers, NULL @@ -522,8 +522,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_remove_re { { -1, - (gchar *) "reference", - (gchar *) "s", + "reference", + "s", NULL }, FALSE @@ -539,8 +539,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_method_info_remove_re { { -1, - (gchar *) "unnamed_arg1", - (gchar *) "i", + "unnamed_arg1", + "i", NULL }, FALSE @@ -556,7 +556,7 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_identity_method_info_remove { { -1, - (gchar *) "removeReference", + "removeReference", (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_remove_reference_IN_ARG_pointers, (GDBusArgInfo **) &_gsignond_dbus_identity_method_info_remove_reference_OUT_ARG_pointers, NULL @@ -584,7 +584,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_identity_signal_info_unregi { { -1, - (gchar *) "unregistered", + "unregistered", NULL, NULL }, @@ -595,8 +595,8 @@ static const _ExtendedGDBusArgInfo _gsignond_dbus_identity_signal_info_info_upda { { -1, - (gchar *) "unnamed_arg0", - (gchar *) "i", + "unnamed_arg0", + "i", NULL }, FALSE @@ -612,7 +612,7 @@ static const _ExtendedGDBusSignalInfo _gsignond_dbus_identity_signal_info_info_u { { -1, - (gchar *) "infoUpdated", + "infoUpdated", (GDBusArgInfo **) &_gsignond_dbus_identity_signal_info_info_updated_ARG_pointers, NULL }, @@ -630,7 +630,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_identity_interface_info { { -1, - (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.Identity", + "com.google.code.AccountsSSO.gSingleSignOn.Identity", (GDBusMethodInfo **) &_gsignond_dbus_identity_method_info_pointers, (GDBusSignalInfo **) &_gsignond_dbus_identity_signal_info_pointers, NULL, @@ -650,7 +650,7 @@ static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_identity_interface_info GDBusInterfaceInfo * gsignond_dbus_identity_interface_info (void) { - return (GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct; + return (GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info; } /** @@ -2283,7 +2283,7 @@ gsignond_dbus_identity_proxy_g_signal (GDBusProxy *proxy, guint num_params; guint n; guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, signal_name); + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); @@ -2325,7 +2325,7 @@ gsignond_dbus_identity_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, key); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2333,7 +2333,7 @@ gsignond_dbus_identity_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, invalidated_properties[n]); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -2655,7 +2655,7 @@ _gsignond_dbus_identity_skeleton_handle_get_property ( _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -2689,7 +2689,7 @@ _gsignond_dbus_identity_skeleton_handle_set_property ( _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info.parent_struct, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_identity_interface_info, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) diff --git a/src/daemon/dbus/gsignond-dbus-identity-gen.h b/src/daemon/dbus/gsignond-dbus-identity-gen.h index 8745c2a..138476e 100644 --- a/src/daemon/dbus/gsignond-dbus-identity-gen.h +++ b/src/daemon/dbus/gsignond-dbus-identity-gen.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.32.4. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c b/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c index b0c19e9..209f339 100644 --- a/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c +++ b/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.32.4. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -149,25 +149,25 @@ _g_value_equal (const GValue *a, const GValue *b) } /* ------------------------------------------------------------------------ - * Code for interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin + * Code for interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 * ------------------------------------------------------------------------ */ /** - * SECTION:GSignondDbusRemotePlugin - * @title: GSignondDbusRemotePlugin - * @short_description: Generated C code for the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin D-Bus interface + * SECTION:GSignondDbusRemotePluginV1 + * @title: GSignondDbusRemotePluginV1 + * @short_description: Generated C code for the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 D-Bus interface * - * This section contains code for working with the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin D-Bus interface in C. + * This section contains code for working with the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 D-Bus interface in C. */ -/* ---- Introspection data for com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin ---- */ +/* ---- Introspection data for com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 ---- */ -static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_cancel = +static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_cancel = { { -1, - (gchar *) "cancel", + "cancel", NULL, NULL, NULL @@ -176,53 +176,53 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_c FALSE }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_sessionData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_sessionData = { { -1, - (gchar *) "sessionData", - (gchar *) "a{sv}", + "sessionData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_identityMethodCache = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_identityMethodCache = { { -1, - (gchar *) "identityMethodCache", - (gchar *) "a{sv}", + "identityMethodCache", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_mechanism = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_mechanism = { { -1, - (gchar *) "mechanism", - (gchar *) "s", + "mechanism", + "s", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_sessionData, - &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_identityMethodCache, - &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_mechanism, + &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_sessionData, + &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_identityMethodCache, + &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_mechanism, NULL }; -static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_request_initial = +static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial = { { -1, - (gchar *) "requestInitial", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_pointers, + "requestInitial", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_pointers, NULL, NULL }, @@ -230,29 +230,29 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_r FALSE }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_IN_ARG_sessionData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_sessionData = { { -1, - (gchar *) "sessionData", - (gchar *) "a{sv}", + "sessionData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_request_IN_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_method_info_request_IN_ARG_sessionData, + &_gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_sessionData, NULL }; -static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_request = +static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_request = { { -1, - (gchar *) "request", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_request_IN_ARG_pointers, + "request", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_pointers, NULL, NULL }, @@ -260,29 +260,29 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_r FALSE }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_uiData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_uiData = { { -1, - (gchar *) "uiData", - (gchar *) "a{sv}", + "uiData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_uiData, + &_gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_uiData, NULL }; -static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_user_action_finished = +static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_user_action_finished = { { -1, - (gchar *) "userActionFinished", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_pointers, + "userActionFinished", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_pointers, NULL, NULL }, @@ -290,29 +290,29 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_u FALSE }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_uiData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_uiData = { { -1, - (gchar *) "uiData", - (gchar *) "a{sv}", + "uiData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_uiData, + &_gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_uiData, NULL }; -static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_refresh = +static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_refresh = { { -1, - (gchar *) "refresh", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_pointers, + "refresh", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_pointers, NULL, NULL }, @@ -320,369 +320,362 @@ static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_r FALSE }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_type = +static const _ExtendedGDBusMethodInfo * const _gsignond_dbus_remote_plugin_v1_method_info_pointers[] = { - { - -1, - (gchar *) "type", - (gchar *) "s", - NULL - }, - FALSE + &_gsignond_dbus_remote_plugin_v1_method_info_cancel, + &_gsignond_dbus_remote_plugin_v1_method_info_request_initial, + &_gsignond_dbus_remote_plugin_v1_method_info_request, + &_gsignond_dbus_remote_plugin_v1_method_info_user_action_finished, + &_gsignond_dbus_remote_plugin_v1_method_info_refresh, + NULL }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_mechanisms = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_sessionData = { { -1, - (gchar *) "mechanisms", - (gchar *) "as", + "sessionData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_type, - &_gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_mechanisms, + &_gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_sessionData, NULL }; -static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_get_info = +static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_response = { { -1, - (gchar *) "getInfo", - NULL, - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_pointers, + "response", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_pointers, NULL }, - "handle-get-info", - FALSE -}; - -static const _ExtendedGDBusMethodInfo * const _gsignond_dbus_remote_plugin_method_info_pointers[] = -{ - &_gsignond_dbus_remote_plugin_method_info_cancel, - &_gsignond_dbus_remote_plugin_method_info_request_initial, - &_gsignond_dbus_remote_plugin_method_info_request, - &_gsignond_dbus_remote_plugin_method_info_user_action_finished, - &_gsignond_dbus_remote_plugin_method_info_refresh, - &_gsignond_dbus_remote_plugin_method_info_get_info, - NULL + "response" }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_response_ARG_sessionData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_sessionData = { { -1, - (gchar *) "sessionData", - (gchar *) "a{sv}", + "sessionData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_response_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_signal_info_response_ARG_sessionData, + &_gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_sessionData, NULL }; -static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_response = +static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_final = { { -1, - (gchar *) "response", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_response_ARG_pointers, + "responseFinal", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_pointers, NULL }, - "response" + "response-final" }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_response_final_ARG_sessionData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_sessionData = { { -1, - (gchar *) "sessionData", - (gchar *) "a{sv}", + "sessionData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_response_final_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_signal_info_response_final_ARG_sessionData, + &_gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_sessionData, NULL }; -static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_response_final = +static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_store = { { -1, - (gchar *) "responseFinal", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_response_final_ARG_pointers, + "store", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_pointers, NULL }, - "response-final" + "store" }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_store_ARG_sessionData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_error = { { -1, - (gchar *) "sessionData", - (gchar *) "a{sv}", + "error", + "(uis)", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_store_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_signal_info_store_ARG_sessionData, + &_gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_error, NULL }; -static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_store = +static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_error = { { -1, - (gchar *) "store", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_store_ARG_pointers, + "error", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_pointers, NULL }, - "store" + "error" }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_error_ARG_error = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_uiData = { { -1, - (gchar *) "error", - (gchar *) "(uis)", + "uiData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_error_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_signal_info_error_ARG_error, + &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_uiData, NULL }; -static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_error = +static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required = { { -1, - (gchar *) "error", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_error_ARG_pointers, + "userActionRequired", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_pointers, NULL }, - "error" + "user-action-required" }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_uiData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_uiData = { { -1, - (gchar *) "uiData", - (gchar *) "a{sv}", + "uiData", + "a{sv}", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_pointers[] = +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_pointers[] = { - &_gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_uiData, + &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_uiData, NULL }; -static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_user_action_required = +static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_refreshed = { { -1, - (gchar *) "userActionRequired", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_pointers, + "refreshed", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_pointers, NULL }, - "user-action-required" + "refreshed" }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_uiData = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_state = { { -1, - (gchar *) "uiData", - (gchar *) "a{sv}", + "state", + "i", NULL }, FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_pointers[] = -{ - &_gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_uiData, - NULL -}; - -static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_refreshed = +static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_message = { { -1, - (gchar *) "refreshed", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_pointers, + "message", + "s", NULL }, - "refreshed" + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_pointers[] = +{ + &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_state, + &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_message, + NULL }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_state = +static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed = { { -1, - (gchar *) "state", - (gchar *) "i", + "statusChanged", + (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_pointers, NULL }, - FALSE + "status-changed" +}; + +static const _ExtendedGDBusSignalInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_pointers[] = +{ + &_gsignond_dbus_remote_plugin_v1_signal_info_response, + &_gsignond_dbus_remote_plugin_v1_signal_info_response_final, + &_gsignond_dbus_remote_plugin_v1_signal_info_store, + &_gsignond_dbus_remote_plugin_v1_signal_info_error, + &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required, + &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed, + &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed, + NULL }; -static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_message = +static const _ExtendedGDBusPropertyInfo _gsignond_dbus_remote_plugin_v1_property_info_method = { { -1, - (gchar *) "message", - (gchar *) "s", + "method", + "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL }, + "method", FALSE }; -static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_pointers[] = -{ - &_gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_state, - &_gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_message, - NULL -}; - -static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_status_changed = +static const _ExtendedGDBusPropertyInfo _gsignond_dbus_remote_plugin_v1_property_info_mechanisms = { { -1, - (gchar *) "statusChanged", - (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_pointers, + "mechanisms", + "as", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL }, - "status-changed" + "mechanisms", + FALSE }; -static const _ExtendedGDBusSignalInfo * const _gsignond_dbus_remote_plugin_signal_info_pointers[] = +static const _ExtendedGDBusPropertyInfo * const _gsignond_dbus_remote_plugin_v1_property_info_pointers[] = { - &_gsignond_dbus_remote_plugin_signal_info_response, - &_gsignond_dbus_remote_plugin_signal_info_response_final, - &_gsignond_dbus_remote_plugin_signal_info_store, - &_gsignond_dbus_remote_plugin_signal_info_error, - &_gsignond_dbus_remote_plugin_signal_info_user_action_required, - &_gsignond_dbus_remote_plugin_signal_info_refreshed, - &_gsignond_dbus_remote_plugin_signal_info_status_changed, + &_gsignond_dbus_remote_plugin_v1_property_info_method, + &_gsignond_dbus_remote_plugin_v1_property_info_mechanisms, NULL }; -static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_remote_plugin_interface_info = +static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_remote_plugin_v1_interface_info = { { -1, - (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", - (GDBusMethodInfo **) &_gsignond_dbus_remote_plugin_method_info_pointers, - (GDBusSignalInfo **) &_gsignond_dbus_remote_plugin_signal_info_pointers, - NULL, + "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", + (GDBusMethodInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_pointers, + (GDBusSignalInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_pointers, + (GDBusPropertyInfo **) &_gsignond_dbus_remote_plugin_v1_property_info_pointers, NULL }, - "remote-plugin", + "remote-plugin-v1", }; /** - * gsignond_dbus_remote_plugin_interface_info: + * gsignond_dbus_remote_plugin_v1_interface_info: * - * Gets a machine-readable description of the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin D-Bus interface. + * Gets a machine-readable description of the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 D-Bus interface. * * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. */ GDBusInterfaceInfo * -gsignond_dbus_remote_plugin_interface_info (void) +gsignond_dbus_remote_plugin_v1_interface_info (void) { - return (GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct; + return (GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info; } /** - * gsignond_dbus_remote_plugin_override_properties: + * gsignond_dbus_remote_plugin_v1_override_properties: * @klass: The class structure for a #GObject-derived class. * @property_id_begin: The property id to assign to the first overridden property. * - * Overrides all #GObject properties in the #GSignondDbusRemotePlugin interface for a concrete class. + * Overrides all #GObject properties in the #GSignondDbusRemotePluginV1 interface for a concrete class. * The properties are overridden in the order they are defined. * * Returns: The last property id. */ guint -gsignond_dbus_remote_plugin_override_properties (GObjectClass *klass, guint property_id_begin) +gsignond_dbus_remote_plugin_v1_override_properties (GObjectClass *klass, guint property_id_begin) { + g_object_class_override_property (klass, property_id_begin++, "method"); + g_object_class_override_property (klass, property_id_begin++, "mechanisms"); return property_id_begin - 1; } /** - * GSignondDbusRemotePlugin: + * GSignondDbusRemotePluginV1: * - * Abstract interface type for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin. + * Abstract interface type for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1. */ /** - * GSignondDbusRemotePluginIface: + * GSignondDbusRemotePluginV1Iface: * @parent_iface: The parent interface. - * @handle_cancel: Handler for the #GSignondDbusRemotePlugin::handle-cancel signal. - * @handle_get_info: Handler for the #GSignondDbusRemotePlugin::handle-get-info signal. - * @handle_refresh: Handler for the #GSignondDbusRemotePlugin::handle-refresh signal. - * @handle_request: Handler for the #GSignondDbusRemotePlugin::handle-request signal. - * @handle_request_initial: Handler for the #GSignondDbusRemotePlugin::handle-request-initial signal. - * @handle_user_action_finished: Handler for the #GSignondDbusRemotePlugin::handle-user-action-finished signal. - * @error: Handler for the #GSignondDbusRemotePlugin::error signal. - * @refreshed: Handler for the #GSignondDbusRemotePlugin::refreshed signal. - * @response: Handler for the #GSignondDbusRemotePlugin::response signal. - * @response_final: Handler for the #GSignondDbusRemotePlugin::response-final signal. - * @status_changed: Handler for the #GSignondDbusRemotePlugin::status-changed signal. - * @store: Handler for the #GSignondDbusRemotePlugin::store signal. - * @user_action_required: Handler for the #GSignondDbusRemotePlugin::user-action-required signal. - * - * Virtual table for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin. + * @handle_cancel: Handler for the #GSignondDbusRemotePluginV1::handle-cancel signal. + * @handle_refresh: Handler for the #GSignondDbusRemotePluginV1::handle-refresh signal. + * @handle_request: Handler for the #GSignondDbusRemotePluginV1::handle-request signal. + * @handle_request_initial: Handler for the #GSignondDbusRemotePluginV1::handle-request-initial signal. + * @handle_user_action_finished: Handler for the #GSignondDbusRemotePluginV1::handle-user-action-finished signal. + * @get_mechanisms: Getter for the #GSignondDbusRemotePluginV1:mechanisms property. + * @get_method: Getter for the #GSignondDbusRemotePluginV1:method property. + * @error: Handler for the #GSignondDbusRemotePluginV1::error signal. + * @refreshed: Handler for the #GSignondDbusRemotePluginV1::refreshed signal. + * @response: Handler for the #GSignondDbusRemotePluginV1::response signal. + * @response_final: Handler for the #GSignondDbusRemotePluginV1::response-final signal. + * @status_changed: Handler for the #GSignondDbusRemotePluginV1::status-changed signal. + * @store: Handler for the #GSignondDbusRemotePluginV1::store signal. + * @user_action_required: Handler for the #GSignondDbusRemotePluginV1::user-action-required signal. + * + * Virtual table for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1. */ static void -gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) +gsignond_dbus_remote_plugin_v1_default_init (GSignondDbusRemotePluginV1Iface *iface) { /* GObject signals for incoming D-Bus method calls: */ /** - * GSignondDbusRemotePlugin::handle-cancel: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::handle-cancel: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: A #GDBusMethodInvocation. * - * Signal emitted when a remote caller is invoking the cancel() D-Bus method. + * Signal emitted when a remote caller is invoking the cancel() D-Bus method. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_complete_cancel() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_cancel() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. * * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. */ g_signal_new ("handle-cancel", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_cancel), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_cancel), g_signal_accumulator_true_handled, NULL, g_cclosure_marshal_generic, @@ -691,23 +684,23 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) G_TYPE_DBUS_METHOD_INVOCATION); /** - * GSignondDbusRemotePlugin::handle-request-initial: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::handle-request-initial: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: A #GDBusMethodInvocation. * @arg_sessionData: Argument passed by remote caller. * @arg_identityMethodCache: Argument passed by remote caller. * @arg_mechanism: Argument passed by remote caller. * - * Signal emitted when a remote caller is invoking the requestInitial() D-Bus method. + * Signal emitted when a remote caller is invoking the requestInitial() D-Bus method. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_complete_request_initial() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_request_initial() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. * * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. */ g_signal_new ("handle-request-initial", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_request_initial), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_request_initial), g_signal_accumulator_true_handled, NULL, g_cclosure_marshal_generic, @@ -716,21 +709,21 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_STRING); /** - * GSignondDbusRemotePlugin::handle-request: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::handle-request: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: A #GDBusMethodInvocation. * @arg_sessionData: Argument passed by remote caller. * - * Signal emitted when a remote caller is invoking the request() D-Bus method. + * Signal emitted when a remote caller is invoking the request() D-Bus method. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_complete_request() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_request() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. * * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. */ g_signal_new ("handle-request", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_request), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_request), g_signal_accumulator_true_handled, NULL, g_cclosure_marshal_generic, @@ -739,21 +732,21 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT); /** - * GSignondDbusRemotePlugin::handle-user-action-finished: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::handle-user-action-finished: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: A #GDBusMethodInvocation. * @arg_uiData: Argument passed by remote caller. * - * Signal emitted when a remote caller is invoking the userActionFinished() D-Bus method. + * Signal emitted when a remote caller is invoking the userActionFinished() D-Bus method. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_complete_user_action_finished() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_user_action_finished() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. * * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. */ g_signal_new ("handle-user-action-finished", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_user_action_finished), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_user_action_finished), g_signal_accumulator_true_handled, NULL, g_cclosure_marshal_generic, @@ -762,21 +755,21 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT); /** - * GSignondDbusRemotePlugin::handle-refresh: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::handle-refresh: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: A #GDBusMethodInvocation. * @arg_uiData: Argument passed by remote caller. * - * Signal emitted when a remote caller is invoking the refresh() D-Bus method. + * Signal emitted when a remote caller is invoking the refresh() D-Bus method. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_complete_refresh() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_refresh() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. * * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. */ g_signal_new ("handle-refresh", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_refresh), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_refresh), g_signal_accumulator_true_handled, NULL, g_cclosure_marshal_generic, @@ -784,42 +777,20 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) 2, G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT); - /** - * GSignondDbusRemotePlugin::handle-get-info: - * @object: A #GSignondDbusRemotePlugin. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the getInfo() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_complete_get_info() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-get-info", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_get_info), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - /* GObject signals for received D-Bus signals: */ /** - * GSignondDbusRemotePlugin::response: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::response: + * @object: A #GSignondDbusRemotePluginV1. * @arg_sessionData: Argument. * - * On the client-side, this signal is emitted whenever the D-Bus signal "response" is received. + * On the client-side, this signal is emitted whenever the D-Bus signal "response" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ g_signal_new ("response", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, response), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, response), NULL, NULL, g_cclosure_marshal_generic, @@ -827,18 +798,18 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) 1, G_TYPE_VARIANT); /** - * GSignondDbusRemotePlugin::response-final: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::response-final: + * @object: A #GSignondDbusRemotePluginV1. * @arg_sessionData: Argument. * - * On the client-side, this signal is emitted whenever the D-Bus signal "responseFinal" is received. + * On the client-side, this signal is emitted whenever the D-Bus signal "responseFinal" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ g_signal_new ("response-final", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, response_final), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, response_final), NULL, NULL, g_cclosure_marshal_generic, @@ -846,18 +817,18 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) 1, G_TYPE_VARIANT); /** - * GSignondDbusRemotePlugin::store: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::store: + * @object: A #GSignondDbusRemotePluginV1. * @arg_sessionData: Argument. * - * On the client-side, this signal is emitted whenever the D-Bus signal "store" is received. + * On the client-side, this signal is emitted whenever the D-Bus signal "store" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ g_signal_new ("store", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, store), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, store), NULL, NULL, g_cclosure_marshal_generic, @@ -865,18 +836,18 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) 1, G_TYPE_VARIANT); /** - * GSignondDbusRemotePlugin::error: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::error: + * @object: A #GSignondDbusRemotePluginV1. * @arg_error: Argument. * - * On the client-side, this signal is emitted whenever the D-Bus signal "error" is received. + * On the client-side, this signal is emitted whenever the D-Bus signal "error" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ g_signal_new ("error", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, error), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, error), NULL, NULL, g_cclosure_marshal_generic, @@ -884,18 +855,18 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) 1, G_TYPE_VARIANT); /** - * GSignondDbusRemotePlugin::user-action-required: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::user-action-required: + * @object: A #GSignondDbusRemotePluginV1. * @arg_uiData: Argument. * - * On the client-side, this signal is emitted whenever the D-Bus signal "userActionRequired" is received. + * On the client-side, this signal is emitted whenever the D-Bus signal "userActionRequired" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ g_signal_new ("user-action-required", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, user_action_required), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, user_action_required), NULL, NULL, g_cclosure_marshal_generic, @@ -903,18 +874,18 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) 1, G_TYPE_VARIANT); /** - * GSignondDbusRemotePlugin::refreshed: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::refreshed: + * @object: A #GSignondDbusRemotePluginV1. * @arg_uiData: Argument. * - * On the client-side, this signal is emitted whenever the D-Bus signal "refreshed" is received. + * On the client-side, this signal is emitted whenever the D-Bus signal "refreshed" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ g_signal_new ("refreshed", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, refreshed), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, refreshed), NULL, NULL, g_cclosure_marshal_generic, @@ -922,131 +893,252 @@ gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface) 1, G_TYPE_VARIANT); /** - * GSignondDbusRemotePlugin::status-changed: - * @object: A #GSignondDbusRemotePlugin. + * GSignondDbusRemotePluginV1::status-changed: + * @object: A #GSignondDbusRemotePluginV1. * @arg_state: Argument. * @arg_message: Argument. * - * On the client-side, this signal is emitted whenever the D-Bus signal "statusChanged" is received. + * On the client-side, this signal is emitted whenever the D-Bus signal "statusChanged" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ g_signal_new ("status-changed", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, status_changed), + G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, status_changed), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_STRING); + /* GObject properties for D-Bus properties: */ + /** + * GSignondDbusRemotePluginV1:method: + * + * Represents the D-Bus property "method". + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("method", "method", "method", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GSignondDbusRemotePluginV1:mechanisms: + * + * Represents the D-Bus property "mechanisms". + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boxed ("mechanisms", "mechanisms", "mechanisms", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } -typedef GSignondDbusRemotePluginIface GSignondDbusRemotePluginInterface; -G_DEFINE_INTERFACE (GSignondDbusRemotePlugin, gsignond_dbus_remote_plugin, G_TYPE_OBJECT); +typedef GSignondDbusRemotePluginV1Iface GSignondDbusRemotePluginV1Interface; +G_DEFINE_INTERFACE (GSignondDbusRemotePluginV1, gsignond_dbus_remote_plugin_v1, G_TYPE_OBJECT); /** - * gsignond_dbus_remote_plugin_emit_response: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_get_method: (skip) + * @object: A #GSignondDbusRemotePluginV1. + * + * Gets the value of the "method" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use gsignond_dbus_remote_plugin_v1_dup_method() if on another thread. + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +gsignond_dbus_remote_plugin_v1_get_method (GSignondDbusRemotePluginV1 *object) +{ + return GSIGNOND_DBUS_REMOTE_PLUGIN_V1_GET_IFACE (object)->get_method (object); +} + +/** + * gsignond_dbus_remote_plugin_v1_dup_method: (skip) + * @object: A #GSignondDbusRemotePluginV1. + * + * Gets a copy of the "method" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +gsignond_dbus_remote_plugin_v1_dup_method (GSignondDbusRemotePluginV1 *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "method", &value, NULL); + return value; +} + +/** + * gsignond_dbus_remote_plugin_v1_set_method: (skip) + * @object: A #GSignondDbusRemotePluginV1. + * @value: The value to set. + * + * Sets the "method" D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +gsignond_dbus_remote_plugin_v1_set_method (GSignondDbusRemotePluginV1 *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "method", value, NULL); +} + +/** + * gsignond_dbus_remote_plugin_v1_get_mechanisms: (skip) + * @object: A #GSignondDbusRemotePluginV1. + * + * Gets the value of the "mechanisms" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use gsignond_dbus_remote_plugin_v1_dup_mechanisms() if on another thread. + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar *const * +gsignond_dbus_remote_plugin_v1_get_mechanisms (GSignondDbusRemotePluginV1 *object) +{ + return GSIGNOND_DBUS_REMOTE_PLUGIN_V1_GET_IFACE (object)->get_mechanisms (object); +} + +/** + * gsignond_dbus_remote_plugin_v1_dup_mechanisms: (skip) + * @object: A #GSignondDbusRemotePluginV1. + * + * Gets a copy of the "mechanisms" D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev(). + */ +gchar ** +gsignond_dbus_remote_plugin_v1_dup_mechanisms (GSignondDbusRemotePluginV1 *object) +{ + gchar **value; + g_object_get (G_OBJECT (object), "mechanisms", &value, NULL); + return value; +} + +/** + * gsignond_dbus_remote_plugin_v1_set_mechanisms: (skip) + * @object: A #GSignondDbusRemotePluginV1. + * @value: The value to set. + * + * Sets the "mechanisms" D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +gsignond_dbus_remote_plugin_v1_set_mechanisms (GSignondDbusRemotePluginV1 *object, const gchar *const *value) +{ + g_object_set (G_OBJECT (object), "mechanisms", value, NULL); +} + +/** + * gsignond_dbus_remote_plugin_v1_emit_response: + * @object: A #GSignondDbusRemotePluginV1. * @arg_sessionData: Argument to pass with the signal. * - * Emits the "response" D-Bus signal. + * Emits the "response" D-Bus signal. */ void -gsignond_dbus_remote_plugin_emit_response ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_emit_response ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData) { g_signal_emit_by_name (object, "response", arg_sessionData); } /** - * gsignond_dbus_remote_plugin_emit_response_final: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_emit_response_final: + * @object: A #GSignondDbusRemotePluginV1. * @arg_sessionData: Argument to pass with the signal. * - * Emits the "responseFinal" D-Bus signal. + * Emits the "responseFinal" D-Bus signal. */ void -gsignond_dbus_remote_plugin_emit_response_final ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_emit_response_final ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData) { g_signal_emit_by_name (object, "response-final", arg_sessionData); } /** - * gsignond_dbus_remote_plugin_emit_store: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_emit_store: + * @object: A #GSignondDbusRemotePluginV1. * @arg_sessionData: Argument to pass with the signal. * - * Emits the "store" D-Bus signal. + * Emits the "store" D-Bus signal. */ void -gsignond_dbus_remote_plugin_emit_store ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_emit_store ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData) { g_signal_emit_by_name (object, "store", arg_sessionData); } /** - * gsignond_dbus_remote_plugin_emit_error: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_emit_error: + * @object: A #GSignondDbusRemotePluginV1. * @arg_error: Argument to pass with the signal. * - * Emits the "error" D-Bus signal. + * Emits the "error" D-Bus signal. */ void -gsignond_dbus_remote_plugin_emit_error ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_emit_error ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_error) { g_signal_emit_by_name (object, "error", arg_error); } /** - * gsignond_dbus_remote_plugin_emit_user_action_required: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_emit_user_action_required: + * @object: A #GSignondDbusRemotePluginV1. * @arg_uiData: Argument to pass with the signal. * - * Emits the "userActionRequired" D-Bus signal. + * Emits the "userActionRequired" D-Bus signal. */ void -gsignond_dbus_remote_plugin_emit_user_action_required ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_emit_user_action_required ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_uiData) { g_signal_emit_by_name (object, "user-action-required", arg_uiData); } /** - * gsignond_dbus_remote_plugin_emit_refreshed: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_emit_refreshed: + * @object: A #GSignondDbusRemotePluginV1. * @arg_uiData: Argument to pass with the signal. * - * Emits the "refreshed" D-Bus signal. + * Emits the "refreshed" D-Bus signal. */ void -gsignond_dbus_remote_plugin_emit_refreshed ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_emit_refreshed ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_uiData) { g_signal_emit_by_name (object, "refreshed", arg_uiData); } /** - * gsignond_dbus_remote_plugin_emit_status_changed: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_emit_status_changed: + * @object: A #GSignondDbusRemotePluginV1. * @arg_state: Argument to pass with the signal. * @arg_message: Argument to pass with the signal. * - * Emits the "statusChanged" D-Bus signal. + * Emits the "statusChanged" D-Bus signal. */ void -gsignond_dbus_remote_plugin_emit_status_changed ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_emit_status_changed ( + GSignondDbusRemotePluginV1 *object, gint arg_state, const gchar *arg_message) { @@ -1054,21 +1146,21 @@ gsignond_dbus_remote_plugin_emit_status_changed ( } /** - * gsignond_dbus_remote_plugin_call_cancel: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_cancel: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @cancellable: (allow-none): A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. * @user_data: User data to pass to @callback. * - * Asynchronously invokes the cancel() D-Bus method on @proxy. + * Asynchronously invokes the cancel() D-Bus method on @proxy. * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gsignond_dbus_remote_plugin_call_cancel_finish() to get the result of the operation. + * You can then call gsignond_dbus_remote_plugin_v1_call_cancel_finish() to get the result of the operation. * - * See gsignond_dbus_remote_plugin_call_cancel_sync() for the synchronous, blocking version of this method. + * See gsignond_dbus_remote_plugin_v1_call_cancel_sync() for the synchronous, blocking version of this method. */ void -gsignond_dbus_remote_plugin_call_cancel ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_cancel ( + GSignondDbusRemotePluginV1 *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -1084,18 +1176,18 @@ gsignond_dbus_remote_plugin_call_cancel ( } /** - * gsignond_dbus_remote_plugin_call_cancel_finish: - * @proxy: A #GSignondDbusRemotePluginProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_cancel(). + * gsignond_dbus_remote_plugin_v1_call_cancel_finish: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_cancel(). * @error: Return location for error or %NULL. * - * Finishes an operation started with gsignond_dbus_remote_plugin_call_cancel(). + * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_cancel(). * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_cancel_finish ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_cancel_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error) { @@ -1111,20 +1203,20 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_cancel_sync: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_cancel_sync: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @cancellable: (allow-none): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * - * Synchronously invokes the cancel() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Synchronously invokes the cancel() D-Bus method on @proxy. The calling thread is blocked until a reply is received. * - * See gsignond_dbus_remote_plugin_call_cancel() for the asynchronous version of this method. + * See gsignond_dbus_remote_plugin_v1_call_cancel() for the asynchronous version of this method. * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_cancel_sync ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_cancel_sync ( + GSignondDbusRemotePluginV1 *proxy, GCancellable *cancellable, GError **error) { @@ -1146,8 +1238,8 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_request_initial: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_request_initial: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @arg_sessionData: Argument to pass with the method invocation. * @arg_identityMethodCache: Argument to pass with the method invocation. * @arg_mechanism: Argument to pass with the method invocation. @@ -1155,15 +1247,15 @@ _out: * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. * @user_data: User data to pass to @callback. * - * Asynchronously invokes the requestInitial() D-Bus method on @proxy. + * Asynchronously invokes the requestInitial() D-Bus method on @proxy. * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gsignond_dbus_remote_plugin_call_request_initial_finish() to get the result of the operation. + * You can then call gsignond_dbus_remote_plugin_v1_call_request_initial_finish() to get the result of the operation. * - * See gsignond_dbus_remote_plugin_call_request_initial_sync() for the synchronous, blocking version of this method. + * See gsignond_dbus_remote_plugin_v1_call_request_initial_sync() for the synchronous, blocking version of this method. */ void -gsignond_dbus_remote_plugin_call_request_initial ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_request_initial ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_sessionData, GVariant *arg_identityMethodCache, const gchar *arg_mechanism, @@ -1185,18 +1277,18 @@ gsignond_dbus_remote_plugin_call_request_initial ( } /** - * gsignond_dbus_remote_plugin_call_request_initial_finish: - * @proxy: A #GSignondDbusRemotePluginProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_request_initial(). + * gsignond_dbus_remote_plugin_v1_call_request_initial_finish: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_request_initial(). * @error: Return location for error or %NULL. * - * Finishes an operation started with gsignond_dbus_remote_plugin_call_request_initial(). + * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_request_initial(). * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_request_initial_finish ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_request_initial_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error) { @@ -1212,23 +1304,23 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_request_initial_sync: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_request_initial_sync: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @arg_sessionData: Argument to pass with the method invocation. * @arg_identityMethodCache: Argument to pass with the method invocation. * @arg_mechanism: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * - * Synchronously invokes the requestInitial() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Synchronously invokes the requestInitial() D-Bus method on @proxy. The calling thread is blocked until a reply is received. * - * See gsignond_dbus_remote_plugin_call_request_initial() for the asynchronous version of this method. + * See gsignond_dbus_remote_plugin_v1_call_request_initial() for the asynchronous version of this method. * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_request_initial_sync ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_request_initial_sync ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_sessionData, GVariant *arg_identityMethodCache, const gchar *arg_mechanism, @@ -1256,22 +1348,22 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_request: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_request: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @arg_sessionData: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. * @user_data: User data to pass to @callback. * - * Asynchronously invokes the request() D-Bus method on @proxy. + * Asynchronously invokes the request() D-Bus method on @proxy. * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gsignond_dbus_remote_plugin_call_request_finish() to get the result of the operation. + * You can then call gsignond_dbus_remote_plugin_v1_call_request_finish() to get the result of the operation. * - * See gsignond_dbus_remote_plugin_call_request_sync() for the synchronous, blocking version of this method. + * See gsignond_dbus_remote_plugin_v1_call_request_sync() for the synchronous, blocking version of this method. */ void -gsignond_dbus_remote_plugin_call_request ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_request ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_sessionData, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -1289,18 +1381,18 @@ gsignond_dbus_remote_plugin_call_request ( } /** - * gsignond_dbus_remote_plugin_call_request_finish: - * @proxy: A #GSignondDbusRemotePluginProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_request(). + * gsignond_dbus_remote_plugin_v1_call_request_finish: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_request(). * @error: Return location for error or %NULL. * - * Finishes an operation started with gsignond_dbus_remote_plugin_call_request(). + * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_request(). * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_request_finish ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_request_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error) { @@ -1316,21 +1408,21 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_request_sync: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_request_sync: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @arg_sessionData: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * - * Synchronously invokes the request() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Synchronously invokes the request() D-Bus method on @proxy. The calling thread is blocked until a reply is received. * - * See gsignond_dbus_remote_plugin_call_request() for the asynchronous version of this method. + * See gsignond_dbus_remote_plugin_v1_call_request() for the asynchronous version of this method. * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_request_sync ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_request_sync ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_sessionData, GCancellable *cancellable, GError **error) @@ -1354,22 +1446,22 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_user_action_finished: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_user_action_finished: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @arg_uiData: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. * @user_data: User data to pass to @callback. * - * Asynchronously invokes the userActionFinished() D-Bus method on @proxy. + * Asynchronously invokes the userActionFinished() D-Bus method on @proxy. * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gsignond_dbus_remote_plugin_call_user_action_finished_finish() to get the result of the operation. + * You can then call gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish() to get the result of the operation. * - * See gsignond_dbus_remote_plugin_call_user_action_finished_sync() for the synchronous, blocking version of this method. + * See gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync() for the synchronous, blocking version of this method. */ void -gsignond_dbus_remote_plugin_call_user_action_finished ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_user_action_finished ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_uiData, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -1387,18 +1479,18 @@ gsignond_dbus_remote_plugin_call_user_action_finished ( } /** - * gsignond_dbus_remote_plugin_call_user_action_finished_finish: - * @proxy: A #GSignondDbusRemotePluginProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_user_action_finished(). + * gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_user_action_finished(). * @error: Return location for error or %NULL. * - * Finishes an operation started with gsignond_dbus_remote_plugin_call_user_action_finished(). + * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_user_action_finished(). * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_user_action_finished_finish ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error) { @@ -1414,21 +1506,21 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_user_action_finished_sync: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @arg_uiData: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * - * Synchronously invokes the userActionFinished() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Synchronously invokes the userActionFinished() D-Bus method on @proxy. The calling thread is blocked until a reply is received. * - * See gsignond_dbus_remote_plugin_call_user_action_finished() for the asynchronous version of this method. + * See gsignond_dbus_remote_plugin_v1_call_user_action_finished() for the asynchronous version of this method. * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_user_action_finished_sync ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_uiData, GCancellable *cancellable, GError **error) @@ -1452,22 +1544,22 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_refresh: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_refresh: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @arg_uiData: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. * @user_data: User data to pass to @callback. * - * Asynchronously invokes the refresh() D-Bus method on @proxy. + * Asynchronously invokes the refresh() D-Bus method on @proxy. * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gsignond_dbus_remote_plugin_call_refresh_finish() to get the result of the operation. + * You can then call gsignond_dbus_remote_plugin_v1_call_refresh_finish() to get the result of the operation. * - * See gsignond_dbus_remote_plugin_call_refresh_sync() for the synchronous, blocking version of this method. + * See gsignond_dbus_remote_plugin_v1_call_refresh_sync() for the synchronous, blocking version of this method. */ void -gsignond_dbus_remote_plugin_call_refresh ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_refresh ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_uiData, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -1485,18 +1577,18 @@ gsignond_dbus_remote_plugin_call_refresh ( } /** - * gsignond_dbus_remote_plugin_call_refresh_finish: - * @proxy: A #GSignondDbusRemotePluginProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_refresh(). + * gsignond_dbus_remote_plugin_v1_call_refresh_finish: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_refresh(). * @error: Return location for error or %NULL. * - * Finishes an operation started with gsignond_dbus_remote_plugin_call_refresh(). + * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_refresh(). * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_refresh_finish ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_refresh_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error) { @@ -1512,21 +1604,21 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_refresh_sync: - * @proxy: A #GSignondDbusRemotePluginProxy. + * gsignond_dbus_remote_plugin_v1_call_refresh_sync: + * @proxy: A #GSignondDbusRemotePluginV1Proxy. * @arg_uiData: Argument to pass with the method invocation. * @cancellable: (allow-none): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * - * Synchronously invokes the refresh() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Synchronously invokes the refresh() D-Bus method on @proxy. The calling thread is blocked until a reply is received. * - * See gsignond_dbus_remote_plugin_call_refresh() for the asynchronous version of this method. + * See gsignond_dbus_remote_plugin_v1_call_refresh() for the asynchronous version of this method. * * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. */ gboolean -gsignond_dbus_remote_plugin_call_refresh_sync ( - GSignondDbusRemotePlugin *proxy, +gsignond_dbus_remote_plugin_v1_call_refresh_sync ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_uiData, GCancellable *cancellable, GError **error) @@ -1550,121 +1642,17 @@ _out: } /** - * gsignond_dbus_remote_plugin_call_get_info: - * @proxy: A #GSignondDbusRemotePluginProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the getInfo() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gsignond_dbus_remote_plugin_call_get_info_finish() to get the result of the operation. - * - * See gsignond_dbus_remote_plugin_call_get_info_sync() for the synchronous, blocking version of this method. - */ -void -gsignond_dbus_remote_plugin_call_get_info ( - GSignondDbusRemotePlugin *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "getInfo", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * gsignond_dbus_remote_plugin_call_get_info_finish: - * @proxy: A #GSignondDbusRemotePluginProxy. - * @out_type: (out): Return location for return parameter or %NULL to ignore. - * @out_mechanisms: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_get_info(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with gsignond_dbus_remote_plugin_call_get_info(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -gsignond_dbus_remote_plugin_call_get_info_finish ( - GSignondDbusRemotePlugin *proxy, - gchar **out_type, - gchar ***out_mechanisms, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s^as)", - out_type, - out_mechanisms); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * gsignond_dbus_remote_plugin_call_get_info_sync: - * @proxy: A #GSignondDbusRemotePluginProxy. - * @out_type: (out): Return location for return parameter or %NULL to ignore. - * @out_mechanisms: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the getInfo() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See gsignond_dbus_remote_plugin_call_get_info() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -gsignond_dbus_remote_plugin_call_get_info_sync ( - GSignondDbusRemotePlugin *proxy, - gchar **out_type, - gchar ***out_mechanisms, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "getInfo", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s^as)", - out_type, - out_mechanisms); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * gsignond_dbus_remote_plugin_complete_cancel: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_complete_cancel: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: (transfer full): A #GDBusMethodInvocation. * - * Helper function used in service implementations to finish handling invocations of the cancel() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Helper function used in service implementations to finish handling invocations of the cancel() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. * * This method will free @invocation, you cannot use it afterwards. */ void -gsignond_dbus_remote_plugin_complete_cancel ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_complete_cancel ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation) { g_dbus_method_invocation_return_value (invocation, @@ -1672,17 +1660,17 @@ gsignond_dbus_remote_plugin_complete_cancel ( } /** - * gsignond_dbus_remote_plugin_complete_request_initial: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_complete_request_initial: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: (transfer full): A #GDBusMethodInvocation. * - * Helper function used in service implementations to finish handling invocations of the requestInitial() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Helper function used in service implementations to finish handling invocations of the requestInitial() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. * * This method will free @invocation, you cannot use it afterwards. */ void -gsignond_dbus_remote_plugin_complete_request_initial ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_complete_request_initial ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation) { g_dbus_method_invocation_return_value (invocation, @@ -1690,17 +1678,17 @@ gsignond_dbus_remote_plugin_complete_request_initial ( } /** - * gsignond_dbus_remote_plugin_complete_request: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_complete_request: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: (transfer full): A #GDBusMethodInvocation. * - * Helper function used in service implementations to finish handling invocations of the request() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Helper function used in service implementations to finish handling invocations of the request() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. * * This method will free @invocation, you cannot use it afterwards. */ void -gsignond_dbus_remote_plugin_complete_request ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_complete_request ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation) { g_dbus_method_invocation_return_value (invocation, @@ -1708,17 +1696,17 @@ gsignond_dbus_remote_plugin_complete_request ( } /** - * gsignond_dbus_remote_plugin_complete_user_action_finished: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_complete_user_action_finished: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: (transfer full): A #GDBusMethodInvocation. * - * Helper function used in service implementations to finish handling invocations of the userActionFinished() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Helper function used in service implementations to finish handling invocations of the userActionFinished() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. * * This method will free @invocation, you cannot use it afterwards. */ void -gsignond_dbus_remote_plugin_complete_user_action_finished ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_complete_user_action_finished ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation) { g_dbus_method_invocation_return_value (invocation, @@ -1726,98 +1714,119 @@ gsignond_dbus_remote_plugin_complete_user_action_finished ( } /** - * gsignond_dbus_remote_plugin_complete_refresh: - * @object: A #GSignondDbusRemotePlugin. + * gsignond_dbus_remote_plugin_v1_complete_refresh: + * @object: A #GSignondDbusRemotePluginV1. * @invocation: (transfer full): A #GDBusMethodInvocation. * - * Helper function used in service implementations to finish handling invocations of the refresh() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Helper function used in service implementations to finish handling invocations of the refresh() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. * * This method will free @invocation, you cannot use it afterwards. */ void -gsignond_dbus_remote_plugin_complete_refresh ( - GSignondDbusRemotePlugin *object, +gsignond_dbus_remote_plugin_v1_complete_refresh ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation) { g_dbus_method_invocation_return_value (invocation, g_variant_new ("()")); } -/** - * gsignond_dbus_remote_plugin_complete_get_info: - * @object: A #GSignondDbusRemotePlugin. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @type: Parameter to return. - * @mechanisms: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the getInfo() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -gsignond_dbus_remote_plugin_complete_get_info ( - GSignondDbusRemotePlugin *object, - GDBusMethodInvocation *invocation, - const gchar *type, - const gchar *const *mechanisms) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(s^as)", - type, - mechanisms)); -} - /* ------------------------------------------------------------------------ */ /** - * GSignondDbusRemotePluginProxy: + * GSignondDbusRemotePluginV1Proxy: * - * The #GSignondDbusRemotePluginProxy structure contains only private data and should only be accessed using the provided API. + * The #GSignondDbusRemotePluginV1Proxy structure contains only private data and should only be accessed using the provided API. */ /** - * GSignondDbusRemotePluginProxyClass: + * GSignondDbusRemotePluginV1ProxyClass: * @parent_class: The parent class. * - * Class structure for #GSignondDbusRemotePluginProxy. + * Class structure for #GSignondDbusRemotePluginV1Proxy. */ -struct _GSignondDbusRemotePluginProxyPrivate +struct _GSignondDbusRemotePluginV1ProxyPrivate { GData *qdata; }; -static void gsignond_dbus_remote_plugin_proxy_iface_init (GSignondDbusRemotePluginIface *iface); +static void gsignond_dbus_remote_plugin_v1_proxy_iface_init (GSignondDbusRemotePluginV1Iface *iface); -G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginProxy, gsignond_dbus_remote_plugin_proxy, G_TYPE_DBUS_PROXY, - G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN, gsignond_dbus_remote_plugin_proxy_iface_init)); +G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginV1Proxy, gsignond_dbus_remote_plugin_v1_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1, gsignond_dbus_remote_plugin_v1_proxy_iface_init)); static void -gsignond_dbus_remote_plugin_proxy_finalize (GObject *object) +gsignond_dbus_remote_plugin_v1_proxy_finalize (GObject *object) { - GSignondDbusRemotePluginProxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_PROXY (object); + GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object); g_datalist_clear (&proxy->priv->qdata); - G_OBJECT_CLASS (gsignond_dbus_remote_plugin_proxy_parent_class)->finalize (object); + G_OBJECT_CLASS (gsignond_dbus_remote_plugin_v1_proxy_parent_class)->finalize (object); } static void -gsignond_dbus_remote_plugin_proxy_get_property (GObject *object, +gsignond_dbus_remote_plugin_v1_proxy_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 2); + info = _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1]; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); + if (info->use_gvariant) + { + g_value_set_variant (value, variant); + } + else + { + if (variant != NULL) + g_dbus_gvariant_to_gvalue (variant, value); + } + if (variant != NULL) + g_variant_unref (variant); +} + +static void +gsignond_dbus_remote_plugin_v1_proxy_set_property_cb (GDBusProxy *proxy, + GAsyncResult *res, + gpointer user_data) +{ + const _ExtendedGDBusPropertyInfo *info = user_data; + GError *error; + error = NULL; + if (!g_dbus_proxy_call_finish (proxy, res, &error)) + { + g_warning ("Error setting property `%s' on interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1: %s (%s, %d)", + info->parent_struct.name, + error->message, g_quark_to_string (error->domain), error->code); + g_error_free (error); + } } static void -gsignond_dbus_remote_plugin_proxy_set_property (GObject *object, +gsignond_dbus_remote_plugin_v1_proxy_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 2); + info = _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1]; + variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_dbus_proxy_call (G_DBUS_PROXY (object), + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", info->parent_struct.name, variant), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, (GAsyncReadyCallback) gsignond_dbus_remote_plugin_v1_proxy_set_property_cb, (gpointer) info); + g_variant_unref (variant); } static void -gsignond_dbus_remote_plugin_proxy_g_signal (GDBusProxy *proxy, +gsignond_dbus_remote_plugin_v1_proxy_g_signal (GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters) @@ -1829,12 +1838,12 @@ gsignond_dbus_remote_plugin_proxy_g_signal (GDBusProxy *proxy, guint num_params; guint n; guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, signal_name); + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); paramv = g_new0 (GValue, num_params + 1); - g_value_init (¶mv[0], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN); + g_value_init (¶mv[0], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1); g_value_set_object (¶mv[0], proxy); g_variant_iter_init (&iter, parameters); n = 1; @@ -1851,7 +1860,7 @@ gsignond_dbus_remote_plugin_proxy_g_signal (GDBusProxy *proxy, g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); g_variant_unref (child); } - signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN); + signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1); g_signal_emitv (paramv, signal_id, 0, NULL); for (n = 0; n < num_params + 1; n++) g_value_unset (¶mv[n]); @@ -1859,11 +1868,11 @@ gsignond_dbus_remote_plugin_proxy_g_signal (GDBusProxy *proxy, } static void -gsignond_dbus_remote_plugin_proxy_g_properties_changed (GDBusProxy *_proxy, +gsignond_dbus_remote_plugin_v1_proxy_g_properties_changed (GDBusProxy *_proxy, GVariant *changed_properties, const gchar *const *invalidated_properties) { - GSignondDbusRemotePluginProxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_PROXY (_proxy); + GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (_proxy); guint n; const gchar *key; GVariantIter *iter; @@ -1871,7 +1880,7 @@ gsignond_dbus_remote_plugin_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, key); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); @@ -1879,46 +1888,84 @@ gsignond_dbus_remote_plugin_proxy_g_properties_changed (GDBusProxy *_proxy, g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, invalidated_properties[n]); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); } } +static const gchar * +gsignond_dbus_remote_plugin_v1_proxy_get_method (GSignondDbusRemotePluginV1 *object) +{ + GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "method"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar *const * +gsignond_dbus_remote_plugin_v1_proxy_get_mechanisms (GSignondDbusRemotePluginV1 *object) +{ + GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object); + GVariant *variant; + const gchar *const *value = NULL; + value = g_datalist_get_data (&proxy->priv->qdata, "mechanisms"); + if (value != NULL) + return value; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "mechanisms"); + if (variant != NULL) + { + value = g_variant_get_strv (variant, NULL); + g_datalist_set_data_full (&proxy->priv->qdata, "mechanisms", (gpointer) value, g_free); + g_variant_unref (variant); + } + return value; +} + static void -gsignond_dbus_remote_plugin_proxy_init (GSignondDbusRemotePluginProxy *proxy) +gsignond_dbus_remote_plugin_v1_proxy_init (GSignondDbusRemotePluginV1Proxy *proxy) { - proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, GSignondDbusRemotePluginProxyPrivate); - g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gsignond_dbus_remote_plugin_interface_info ()); + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, GSignondDbusRemotePluginV1ProxyPrivate); + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gsignond_dbus_remote_plugin_v1_interface_info ()); } static void -gsignond_dbus_remote_plugin_proxy_class_init (GSignondDbusRemotePluginProxyClass *klass) +gsignond_dbus_remote_plugin_v1_proxy_class_init (GSignondDbusRemotePluginV1ProxyClass *klass) { GObjectClass *gobject_class; GDBusProxyClass *proxy_class; - g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginProxyPrivate)); + g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginV1ProxyPrivate)); gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = gsignond_dbus_remote_plugin_proxy_finalize; - gobject_class->get_property = gsignond_dbus_remote_plugin_proxy_get_property; - gobject_class->set_property = gsignond_dbus_remote_plugin_proxy_set_property; + gobject_class->finalize = gsignond_dbus_remote_plugin_v1_proxy_finalize; + gobject_class->get_property = gsignond_dbus_remote_plugin_v1_proxy_get_property; + gobject_class->set_property = gsignond_dbus_remote_plugin_v1_proxy_set_property; proxy_class = G_DBUS_PROXY_CLASS (klass); - proxy_class->g_signal = gsignond_dbus_remote_plugin_proxy_g_signal; - proxy_class->g_properties_changed = gsignond_dbus_remote_plugin_proxy_g_properties_changed; + proxy_class->g_signal = gsignond_dbus_remote_plugin_v1_proxy_g_signal; + proxy_class->g_properties_changed = gsignond_dbus_remote_plugin_v1_proxy_g_properties_changed; + + gsignond_dbus_remote_plugin_v1_override_properties (gobject_class, 1); } static void -gsignond_dbus_remote_plugin_proxy_iface_init (GSignondDbusRemotePluginIface *iface) +gsignond_dbus_remote_plugin_v1_proxy_iface_init (GSignondDbusRemotePluginV1Iface *iface) { + iface->get_method = gsignond_dbus_remote_plugin_v1_proxy_get_method; + iface->get_mechanisms = gsignond_dbus_remote_plugin_v1_proxy_get_mechanisms; } /** - * gsignond_dbus_remote_plugin_proxy_new: + * gsignond_dbus_remote_plugin_v1_proxy_new: * @connection: A #GDBusConnection. * @flags: Flags from the #GDBusProxyFlags enumeration. * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. @@ -1927,15 +1974,15 @@ gsignond_dbus_remote_plugin_proxy_iface_init (GSignondDbusRemotePluginIface *ifa * @callback: A #GAsyncReadyCallback to call when the request is satisfied. * @user_data: User data to pass to @callback. * - * Asynchronously creates a proxy for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin. See g_dbus_proxy_new() for more details. + * Asynchronously creates a proxy for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1. See g_dbus_proxy_new() for more details. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gsignond_dbus_remote_plugin_proxy_new_finish() to get the result of the operation. + * You can then call gsignond_dbus_remote_plugin_v1_proxy_new_finish() to get the result of the operation. * - * See gsignond_dbus_remote_plugin_proxy_new_sync() for the synchronous, blocking version of this constructor. + * See gsignond_dbus_remote_plugin_v1_proxy_new_sync() for the synchronous, blocking version of this constructor. */ void -gsignond_dbus_remote_plugin_proxy_new ( +gsignond_dbus_remote_plugin_v1_proxy_new ( GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, @@ -1944,20 +1991,20 @@ gsignond_dbus_remote_plugin_proxy_new ( GAsyncReadyCallback callback, gpointer user_data) { - g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", NULL); + g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL); } /** - * gsignond_dbus_remote_plugin_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_proxy_new(). + * gsignond_dbus_remote_plugin_v1_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_proxy_new(). * @error: Return location for error or %NULL * - * Finishes an operation started with gsignond_dbus_remote_plugin_proxy_new(). + * Finishes an operation started with gsignond_dbus_remote_plugin_v1_proxy_new(). * - * Returns: (transfer full) (type GSignondDbusRemotePluginProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set. */ -GSignondDbusRemotePlugin * -gsignond_dbus_remote_plugin_proxy_new_finish ( +GSignondDbusRemotePluginV1 * +gsignond_dbus_remote_plugin_v1_proxy_new_finish ( GAsyncResult *res, GError **error) { @@ -1967,13 +2014,13 @@ gsignond_dbus_remote_plugin_proxy_new_finish ( ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); g_object_unref (source_object); if (ret != NULL) - return GSIGNOND_DBUS_REMOTE_PLUGIN (ret); + return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret); else return NULL; } /** - * gsignond_dbus_remote_plugin_proxy_new_sync: + * gsignond_dbus_remote_plugin_v1_proxy_new_sync: * @connection: A #GDBusConnection. * @flags: Flags from the #GDBusProxyFlags enumeration. * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. @@ -1981,16 +2028,16 @@ gsignond_dbus_remote_plugin_proxy_new_finish ( * @cancellable: (allow-none): A #GCancellable or %NULL. * @error: Return location for error or %NULL * - * Synchronously creates a proxy for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin. See g_dbus_proxy_new_sync() for more details. + * Synchronously creates a proxy for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1. See g_dbus_proxy_new_sync() for more details. * * The calling thread is blocked until a reply is received. * - * See gsignond_dbus_remote_plugin_proxy_new() for the asynchronous version of this constructor. + * See gsignond_dbus_remote_plugin_v1_proxy_new() for the asynchronous version of this constructor. * - * Returns: (transfer full) (type GSignondDbusRemotePluginProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set. */ -GSignondDbusRemotePlugin * -gsignond_dbus_remote_plugin_proxy_new_sync ( +GSignondDbusRemotePluginV1 * +gsignond_dbus_remote_plugin_v1_proxy_new_sync ( GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, @@ -1999,16 +2046,16 @@ gsignond_dbus_remote_plugin_proxy_new_sync ( GError **error) { GInitable *ret; - ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", NULL); + ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL); if (ret != NULL) - return GSIGNOND_DBUS_REMOTE_PLUGIN (ret); + return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret); else return NULL; } /** - * gsignond_dbus_remote_plugin_proxy_new_for_bus: + * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus: * @bus_type: A #GBusType. * @flags: Flags from the #GDBusProxyFlags enumeration. * @name: A bus name (well-known or unique). @@ -2017,15 +2064,15 @@ gsignond_dbus_remote_plugin_proxy_new_sync ( * @callback: A #GAsyncReadyCallback to call when the request is satisfied. * @user_data: User data to pass to @callback. * - * Like gsignond_dbus_remote_plugin_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * Like gsignond_dbus_remote_plugin_v1_proxy_new() but takes a #GBusType instead of a #GDBusConnection. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gsignond_dbus_remote_plugin_proxy_new_for_bus_finish() to get the result of the operation. + * You can then call gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish() to get the result of the operation. * - * See gsignond_dbus_remote_plugin_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + * See gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. */ void -gsignond_dbus_remote_plugin_proxy_new_for_bus ( +gsignond_dbus_remote_plugin_v1_proxy_new_for_bus ( GBusType bus_type, GDBusProxyFlags flags, const gchar *name, @@ -2034,20 +2081,20 @@ gsignond_dbus_remote_plugin_proxy_new_for_bus ( GAsyncReadyCallback callback, gpointer user_data) { - g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", NULL); + g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL); } /** - * gsignond_dbus_remote_plugin_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_proxy_new_for_bus(). + * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_proxy_new_for_bus(). * @error: Return location for error or %NULL * - * Finishes an operation started with gsignond_dbus_remote_plugin_proxy_new_for_bus(). + * Finishes an operation started with gsignond_dbus_remote_plugin_v1_proxy_new_for_bus(). * - * Returns: (transfer full) (type GSignondDbusRemotePluginProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set. */ -GSignondDbusRemotePlugin * -gsignond_dbus_remote_plugin_proxy_new_for_bus_finish ( +GSignondDbusRemotePluginV1 * +gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish ( GAsyncResult *res, GError **error) { @@ -2057,13 +2104,13 @@ gsignond_dbus_remote_plugin_proxy_new_for_bus_finish ( ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); g_object_unref (source_object); if (ret != NULL) - return GSIGNOND_DBUS_REMOTE_PLUGIN (ret); + return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret); else return NULL; } /** - * gsignond_dbus_remote_plugin_proxy_new_for_bus_sync: + * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync: * @bus_type: A #GBusType. * @flags: Flags from the #GDBusProxyFlags enumeration. * @name: A bus name (well-known or unique). @@ -2071,16 +2118,16 @@ gsignond_dbus_remote_plugin_proxy_new_for_bus_finish ( * @cancellable: (allow-none): A #GCancellable or %NULL. * @error: Return location for error or %NULL * - * Like gsignond_dbus_remote_plugin_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * Like gsignond_dbus_remote_plugin_v1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. * * The calling thread is blocked until a reply is received. * - * See gsignond_dbus_remote_plugin_proxy_new_for_bus() for the asynchronous version of this constructor. + * See gsignond_dbus_remote_plugin_v1_proxy_new_for_bus() for the asynchronous version of this constructor. * - * Returns: (transfer full) (type GSignondDbusRemotePluginProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set. */ -GSignondDbusRemotePlugin * -gsignond_dbus_remote_plugin_proxy_new_for_bus_sync ( +GSignondDbusRemotePluginV1 * +gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync ( GBusType bus_type, GDBusProxyFlags flags, const gchar *name, @@ -2089,9 +2136,9 @@ gsignond_dbus_remote_plugin_proxy_new_for_bus_sync ( GError **error) { GInitable *ret; - ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", NULL); + ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL); if (ret != NULL) - return GSIGNOND_DBUS_REMOTE_PLUGIN (ret); + return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret); else return NULL; } @@ -2100,19 +2147,19 @@ gsignond_dbus_remote_plugin_proxy_new_for_bus_sync ( /* ------------------------------------------------------------------------ */ /** - * GSignondDbusRemotePluginSkeleton: + * GSignondDbusRemotePluginV1Skeleton: * - * The #GSignondDbusRemotePluginSkeleton structure contains only private data and should only be accessed using the provided API. + * The #GSignondDbusRemotePluginV1Skeleton structure contains only private data and should only be accessed using the provided API. */ /** - * GSignondDbusRemotePluginSkeletonClass: + * GSignondDbusRemotePluginV1SkeletonClass: * @parent_class: The parent class. * - * Class structure for #GSignondDbusRemotePluginSkeleton. + * Class structure for #GSignondDbusRemotePluginV1Skeleton. */ -struct _GSignondDbusRemotePluginSkeletonPrivate +struct _GSignondDbusRemotePluginV1SkeletonPrivate { GValue *properties; GList *changed_properties; @@ -2122,7 +2169,7 @@ struct _GSignondDbusRemotePluginSkeletonPrivate }; static void -_gsignond_dbus_remote_plugin_skeleton_handle_method_call ( +_gsignond_dbus_remote_plugin_v1_skeleton_handle_method_call ( GDBusConnection *connection, const gchar *sender, const gchar *object_path, @@ -2132,7 +2179,7 @@ _gsignond_dbus_remote_plugin_skeleton_handle_method_call ( GDBusMethodInvocation *invocation, gpointer user_data) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (user_data); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data); _ExtendedGDBusMethodInfo *info; GVariantIter iter; GVariant *child; @@ -2147,7 +2194,7 @@ _gsignond_dbus_remote_plugin_skeleton_handle_method_call ( num_params = g_variant_n_children (parameters); num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); n = 0; - g_value_init (¶mv[n], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN); + g_value_init (¶mv[n], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1); g_value_set_object (¶mv[n++], skeleton); g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); g_value_set_object (¶mv[n++], invocation); @@ -2174,7 +2221,7 @@ _gsignond_dbus_remote_plugin_skeleton_handle_method_call ( g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); g_variant_unref (child); } - signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN); + signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1); g_value_init (&return_value, G_TYPE_BOOLEAN); g_signal_emitv (paramv, signal_id, 0, &return_value); if (!g_value_get_boolean (&return_value)) @@ -2186,7 +2233,7 @@ _gsignond_dbus_remote_plugin_skeleton_handle_method_call ( } static GVariant * -_gsignond_dbus_remote_plugin_skeleton_handle_get_property ( +_gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property ( GDBusConnection *connection, const gchar *sender, const gchar *object_path, @@ -2195,13 +2242,13 @@ _gsignond_dbus_remote_plugin_skeleton_handle_get_property ( GError **error, gpointer user_data) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (user_data); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data); GValue value = G_VALUE_INIT; GParamSpec *pspec; _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -2219,7 +2266,7 @@ _gsignond_dbus_remote_plugin_skeleton_handle_get_property ( } static gboolean -_gsignond_dbus_remote_plugin_skeleton_handle_set_property ( +_gsignond_dbus_remote_plugin_v1_skeleton_handle_set_property ( GDBusConnection *connection, const gchar *sender, const gchar *object_path, @@ -2229,13 +2276,13 @@ _gsignond_dbus_remote_plugin_skeleton_handle_set_property ( GError **error, gpointer user_data) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (user_data); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data); GValue value = G_VALUE_INIT; GParamSpec *pspec; _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, property_name); + info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) @@ -2255,42 +2302,42 @@ _gsignond_dbus_remote_plugin_skeleton_handle_set_property ( return ret; } -static const GDBusInterfaceVTable _gsignond_dbus_remote_plugin_skeleton_vtable = +static const GDBusInterfaceVTable _gsignond_dbus_remote_plugin_v1_skeleton_vtable = { - _gsignond_dbus_remote_plugin_skeleton_handle_method_call, - _gsignond_dbus_remote_plugin_skeleton_handle_get_property, - _gsignond_dbus_remote_plugin_skeleton_handle_set_property + _gsignond_dbus_remote_plugin_v1_skeleton_handle_method_call, + _gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property, + _gsignond_dbus_remote_plugin_v1_skeleton_handle_set_property }; static GDBusInterfaceInfo * -gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) +gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) { - return gsignond_dbus_remote_plugin_interface_info (); + return gsignond_dbus_remote_plugin_v1_interface_info (); } static GDBusInterfaceVTable * -gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) +gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) { - return (GDBusInterfaceVTable *) &_gsignond_dbus_remote_plugin_skeleton_vtable; + return (GDBusInterfaceVTable *) &_gsignond_dbus_remote_plugin_v1_skeleton_vtable; } static GVariant * -gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (_skeleton); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (_skeleton); GVariantBuilder builder; guint n; g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - if (_gsignond_dbus_remote_plugin_interface_info.parent_struct.properties == NULL) + if (_gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties == NULL) goto out; - for (n = 0; _gsignond_dbus_remote_plugin_interface_info.parent_struct.properties[n] != NULL; n++) + for (n = 0; _gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties[n] != NULL; n++) { - GDBusPropertyInfo *info = _gsignond_dbus_remote_plugin_interface_info.parent_struct.properties[n]; + GDBusPropertyInfo *info = _gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties[n]; if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) { GVariant *value; - value = _gsignond_dbus_remote_plugin_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", info->name, NULL, skeleton); + value = _gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", info->name, NULL, skeleton); if (value != NULL) { g_variant_take_ref (value); @@ -2303,17 +2350,33 @@ out: return g_variant_builder_end (&builder); } +static gboolean _gsignond_dbus_remote_plugin_v1_emit_changed (gpointer user_data); + static void -gsignond_dbus_remote_plugin_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) { + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (_skeleton); + gboolean emit_changed = FALSE; + + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties_idle_source != NULL) + { + g_source_destroy (skeleton->priv->changed_properties_idle_source); + skeleton->priv->changed_properties_idle_source = NULL; + emit_changed = TRUE; + } + g_mutex_unlock (&skeleton->priv->lock); + + if (emit_changed) + _gsignond_dbus_remote_plugin_v1_emit_changed (skeleton); } static void -_gsignond_dbus_remote_plugin_on_signal_response ( - GSignondDbusRemotePlugin *object, +_gsignond_dbus_remote_plugin_v1_on_signal_response ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); GList *connections, *l; GVariant *signal_variant; @@ -2325,7 +2388,7 @@ _gsignond_dbus_remote_plugin_on_signal_response ( { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "response", + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "response", signal_variant, NULL); } g_variant_unref (signal_variant); @@ -2333,11 +2396,11 @@ _gsignond_dbus_remote_plugin_on_signal_response ( } static void -_gsignond_dbus_remote_plugin_on_signal_response_final ( - GSignondDbusRemotePlugin *object, +_gsignond_dbus_remote_plugin_v1_on_signal_response_final ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); GList *connections, *l; GVariant *signal_variant; @@ -2349,7 +2412,7 @@ _gsignond_dbus_remote_plugin_on_signal_response_final ( { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "responseFinal", + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "responseFinal", signal_variant, NULL); } g_variant_unref (signal_variant); @@ -2357,11 +2420,11 @@ _gsignond_dbus_remote_plugin_on_signal_response_final ( } static void -_gsignond_dbus_remote_plugin_on_signal_store ( - GSignondDbusRemotePlugin *object, +_gsignond_dbus_remote_plugin_v1_on_signal_store ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); GList *connections, *l; GVariant *signal_variant; @@ -2373,7 +2436,7 @@ _gsignond_dbus_remote_plugin_on_signal_store ( { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "store", + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "store", signal_variant, NULL); } g_variant_unref (signal_variant); @@ -2381,11 +2444,11 @@ _gsignond_dbus_remote_plugin_on_signal_store ( } static void -_gsignond_dbus_remote_plugin_on_signal_error ( - GSignondDbusRemotePlugin *object, +_gsignond_dbus_remote_plugin_v1_on_signal_error ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_error) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); GList *connections, *l; GVariant *signal_variant; @@ -2397,7 +2460,7 @@ _gsignond_dbus_remote_plugin_on_signal_error ( { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "error", + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "error", signal_variant, NULL); } g_variant_unref (signal_variant); @@ -2405,11 +2468,11 @@ _gsignond_dbus_remote_plugin_on_signal_error ( } static void -_gsignond_dbus_remote_plugin_on_signal_user_action_required ( - GSignondDbusRemotePlugin *object, +_gsignond_dbus_remote_plugin_v1_on_signal_user_action_required ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_uiData) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); GList *connections, *l; GVariant *signal_variant; @@ -2421,7 +2484,7 @@ _gsignond_dbus_remote_plugin_on_signal_user_action_required ( { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "userActionRequired", + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "userActionRequired", signal_variant, NULL); } g_variant_unref (signal_variant); @@ -2429,11 +2492,11 @@ _gsignond_dbus_remote_plugin_on_signal_user_action_required ( } static void -_gsignond_dbus_remote_plugin_on_signal_refreshed ( - GSignondDbusRemotePlugin *object, +_gsignond_dbus_remote_plugin_v1_on_signal_refreshed ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_uiData) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); GList *connections, *l; GVariant *signal_variant; @@ -2445,7 +2508,7 @@ _gsignond_dbus_remote_plugin_on_signal_refreshed ( { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "refreshed", + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "refreshed", signal_variant, NULL); } g_variant_unref (signal_variant); @@ -2453,12 +2516,12 @@ _gsignond_dbus_remote_plugin_on_signal_refreshed ( } static void -_gsignond_dbus_remote_plugin_on_signal_status_changed ( - GSignondDbusRemotePlugin *object, +_gsignond_dbus_remote_plugin_v1_on_signal_status_changed ( + GSignondDbusRemotePluginV1 *object, gint arg_state, const gchar *arg_message) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); GList *connections, *l; GVariant *signal_variant; @@ -2471,77 +2534,252 @@ _gsignond_dbus_remote_plugin_on_signal_status_changed ( { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "statusChanged", + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "statusChanged", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } -static void gsignond_dbus_remote_plugin_skeleton_iface_init (GSignondDbusRemotePluginIface *iface); -G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginSkeleton, gsignond_dbus_remote_plugin_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN, gsignond_dbus_remote_plugin_skeleton_iface_init)); +static void gsignond_dbus_remote_plugin_v1_skeleton_iface_init (GSignondDbusRemotePluginV1Iface *iface); +G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginV1Skeleton, gsignond_dbus_remote_plugin_v1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1, gsignond_dbus_remote_plugin_v1_skeleton_iface_init)); static void -gsignond_dbus_remote_plugin_skeleton_finalize (GObject *object) +gsignond_dbus_remote_plugin_v1_skeleton_finalize (GObject *object) { - GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object); + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); + guint n; + for (n = 0; n < 2; n++) + g_value_unset (&skeleton->priv->properties[n]); + g_free (skeleton->priv->properties); g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); if (skeleton->priv->changed_properties_idle_source != NULL) g_source_destroy (skeleton->priv->changed_properties_idle_source); g_main_context_unref (skeleton->priv->context); g_mutex_clear (&skeleton->priv->lock); - G_OBJECT_CLASS (gsignond_dbus_remote_plugin_skeleton_parent_class)->finalize (object); + G_OBJECT_CLASS (gsignond_dbus_remote_plugin_v1_skeleton_parent_class)->finalize (object); +} + +static void +gsignond_dbus_remote_plugin_v1_skeleton_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 2); + g_mutex_lock (&skeleton->priv->lock); + g_value_copy (&skeleton->priv->properties[prop_id - 1], value); + g_mutex_unlock (&skeleton->priv->lock); +} + +static gboolean +_gsignond_dbus_remote_plugin_v1_emit_changed (gpointer user_data) +{ + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data); + GList *l; + GVariantBuilder builder; + GVariantBuilder invalidated_builder; + guint num_changes; + + g_mutex_lock (&skeleton->priv->lock); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); + for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) + { + ChangedProperty *cp = l->data; + GVariant *variant; + const GValue *cur_value; + + cur_value = &skeleton->priv->properties[cp->prop_id - 1]; + if (!_g_value_equal (cur_value, &cp->orig_value)) + { + variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); + g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); + g_variant_unref (variant); + num_changes++; + } + } + if (num_changes > 0) + { + GList *connections, *l; + GVariant *signal_variant; + signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", + &builder, &invalidated_builder)); + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), + "org.freedesktop.DBus.Properties", + "PropertiesChanged", + signal_variant, + NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); + } + else + { + g_variant_builder_clear (&builder); + g_variant_builder_clear (&invalidated_builder); + } + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + skeleton->priv->changed_properties = NULL; + skeleton->priv->changed_properties_idle_source = NULL; + g_mutex_unlock (&skeleton->priv->lock); + return FALSE; } static void -gsignond_dbus_remote_plugin_skeleton_init (GSignondDbusRemotePluginSkeleton *skeleton) +_gsignond_dbus_remote_plugin_v1_schedule_emit_changed (GSignondDbusRemotePluginV1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) { - skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON, GSignondDbusRemotePluginSkeletonPrivate); + ChangedProperty *cp; + GList *l; + cp = NULL; + for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) + { + ChangedProperty *i_cp = l->data; + if (i_cp->info == info) + { + cp = i_cp; + break; + } + } + if (cp == NULL) + { + cp = g_new0 (ChangedProperty, 1); + cp->prop_id = prop_id; + cp->info = info; + skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); + g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); + g_value_copy (orig_value, &cp->orig_value); + } +} + +static void +gsignond_dbus_remote_plugin_v1_skeleton_notify (GObject *object, + GParamSpec *pspec) +{ + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties != NULL && + skeleton->priv->changed_properties_idle_source == NULL) + { + skeleton->priv->changed_properties_idle_source = g_idle_source_new (); + g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); + g_source_set_callback (skeleton->priv->changed_properties_idle_source, _gsignond_dbus_remote_plugin_v1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); + g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); + g_source_unref (skeleton->priv->changed_properties_idle_source); + } + g_mutex_unlock (&skeleton->priv->lock); +} + +static void +gsignond_dbus_remote_plugin_v1_skeleton_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 2); + g_mutex_lock (&skeleton->priv->lock); + g_object_freeze_notify (object); + if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) + { + if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) + _gsignond_dbus_remote_plugin_v1_schedule_emit_changed (skeleton, _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); + g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); + g_object_notify_by_pspec (object, pspec); + } + g_mutex_unlock (&skeleton->priv->lock); + g_object_thaw_notify (object); +} + +static void +gsignond_dbus_remote_plugin_v1_skeleton_init (GSignondDbusRemotePluginV1Skeleton *skeleton) +{ + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, GSignondDbusRemotePluginV1SkeletonPrivate); g_mutex_init (&skeleton->priv->lock); skeleton->priv->context = g_main_context_ref_thread_default (); + skeleton->priv->properties = g_new0 (GValue, 2); + g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[1], G_TYPE_STRV); +} + +static const gchar * +gsignond_dbus_remote_plugin_v1_skeleton_get_method (GSignondDbusRemotePluginV1 *object) +{ + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[0])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar *const * +gsignond_dbus_remote_plugin_v1_skeleton_get_mechanisms (GSignondDbusRemotePluginV1 *object) +{ + GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object); + const gchar *const *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boxed (&(skeleton->priv->properties[1])); + g_mutex_unlock (&skeleton->priv->lock); + return value; } static void -gsignond_dbus_remote_plugin_skeleton_class_init (GSignondDbusRemotePluginSkeletonClass *klass) +gsignond_dbus_remote_plugin_v1_skeleton_class_init (GSignondDbusRemotePluginV1SkeletonClass *klass) { GObjectClass *gobject_class; GDBusInterfaceSkeletonClass *skeleton_class; - g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginSkeletonPrivate)); + g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginV1SkeletonPrivate)); gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = gsignond_dbus_remote_plugin_skeleton_finalize; + gobject_class->finalize = gsignond_dbus_remote_plugin_v1_skeleton_finalize; + gobject_class->get_property = gsignond_dbus_remote_plugin_v1_skeleton_get_property; + gobject_class->set_property = gsignond_dbus_remote_plugin_v1_skeleton_set_property; + gobject_class->notify = gsignond_dbus_remote_plugin_v1_skeleton_notify; + + + gsignond_dbus_remote_plugin_v1_override_properties (gobject_class, 1); skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); - skeleton_class->get_info = gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_info; - skeleton_class->get_properties = gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_properties; - skeleton_class->flush = gsignond_dbus_remote_plugin_skeleton_dbus_interface_flush; - skeleton_class->get_vtable = gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_vtable; + skeleton_class->get_info = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_properties; + skeleton_class->flush = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_vtable; } static void -gsignond_dbus_remote_plugin_skeleton_iface_init (GSignondDbusRemotePluginIface *iface) +gsignond_dbus_remote_plugin_v1_skeleton_iface_init (GSignondDbusRemotePluginV1Iface *iface) { - iface->response = _gsignond_dbus_remote_plugin_on_signal_response; - iface->response_final = _gsignond_dbus_remote_plugin_on_signal_response_final; - iface->store = _gsignond_dbus_remote_plugin_on_signal_store; - iface->error = _gsignond_dbus_remote_plugin_on_signal_error; - iface->user_action_required = _gsignond_dbus_remote_plugin_on_signal_user_action_required; - iface->refreshed = _gsignond_dbus_remote_plugin_on_signal_refreshed; - iface->status_changed = _gsignond_dbus_remote_plugin_on_signal_status_changed; + iface->response = _gsignond_dbus_remote_plugin_v1_on_signal_response; + iface->response_final = _gsignond_dbus_remote_plugin_v1_on_signal_response_final; + iface->store = _gsignond_dbus_remote_plugin_v1_on_signal_store; + iface->error = _gsignond_dbus_remote_plugin_v1_on_signal_error; + iface->user_action_required = _gsignond_dbus_remote_plugin_v1_on_signal_user_action_required; + iface->refreshed = _gsignond_dbus_remote_plugin_v1_on_signal_refreshed; + iface->status_changed = _gsignond_dbus_remote_plugin_v1_on_signal_status_changed; + iface->get_method = gsignond_dbus_remote_plugin_v1_skeleton_get_method; + iface->get_mechanisms = gsignond_dbus_remote_plugin_v1_skeleton_get_mechanisms; } /** - * gsignond_dbus_remote_plugin_skeleton_new: + * gsignond_dbus_remote_plugin_v1_skeleton_new: * - * Creates a skeleton object for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin. + * Creates a skeleton object for the D-Bus interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1. * - * Returns: (transfer full) (type GSignondDbusRemotePluginSkeleton): The skeleton object. + * Returns: (transfer full) (type GSignondDbusRemotePluginV1Skeleton): The skeleton object. */ -GSignondDbusRemotePlugin * -gsignond_dbus_remote_plugin_skeleton_new (void) +GSignondDbusRemotePluginV1 * +gsignond_dbus_remote_plugin_v1_skeleton_new (void) { - return GSIGNOND_DBUS_REMOTE_PLUGIN (g_object_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON, NULL)); + return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (g_object_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, NULL)); } diff --git a/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h b/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h index 5732dea..42326c4 100644 --- a/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h +++ b/src/daemon/dbus/gsignond-dbus-remote-plugin-gen.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.32.4. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ @@ -13,169 +13,164 @@ G_BEGIN_DECLS /* ------------------------------------------------------------------------ */ -/* Declarations for com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin */ +/* Declarations for com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 */ -#define GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN (gsignond_dbus_remote_plugin_get_type ()) -#define GSIGNOND_DBUS_REMOTE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN, GSignondDbusRemotePlugin)) -#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN)) -#define GSIGNOND_DBUS_REMOTE_PLUGIN_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN, GSignondDbusRemotePluginIface)) +#define GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1 (gsignond_dbus_remote_plugin_v1_get_type ()) +#define GSIGNOND_DBUS_REMOTE_PLUGIN_V1(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1, GSignondDbusRemotePluginV1)) +#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_V1(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1)) +#define GSIGNOND_DBUS_REMOTE_PLUGIN_V1_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1, GSignondDbusRemotePluginV1Iface)) -struct _GSignondDbusRemotePlugin; -typedef struct _GSignondDbusRemotePlugin GSignondDbusRemotePlugin; -typedef struct _GSignondDbusRemotePluginIface GSignondDbusRemotePluginIface; +struct _GSignondDbusRemotePluginV1; +typedef struct _GSignondDbusRemotePluginV1 GSignondDbusRemotePluginV1; +typedef struct _GSignondDbusRemotePluginV1Iface GSignondDbusRemotePluginV1Iface; -struct _GSignondDbusRemotePluginIface +struct _GSignondDbusRemotePluginV1Iface { GTypeInterface parent_iface; - gboolean (*handle_cancel) ( - GSignondDbusRemotePlugin *object, - GDBusMethodInvocation *invocation); - gboolean (*handle_get_info) ( - GSignondDbusRemotePlugin *object, + gboolean (*handle_cancel) ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation); gboolean (*handle_refresh) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation, GVariant *arg_uiData); gboolean (*handle_request) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation, GVariant *arg_sessionData); gboolean (*handle_request_initial) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation, GVariant *arg_sessionData, GVariant *arg_identityMethodCache, const gchar *arg_mechanism); gboolean (*handle_user_action_finished) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation, GVariant *arg_uiData); + const gchar *const * (*get_mechanisms) (GSignondDbusRemotePluginV1 *object); + + const gchar * (*get_method) (GSignondDbusRemotePluginV1 *object); + void (*error) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GVariant *arg_error); void (*refreshed) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GVariant *arg_uiData); void (*response) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData); void (*response_final) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData); void (*status_changed) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, gint arg_state, const gchar *arg_message); void (*store) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData); void (*user_action_required) ( - GSignondDbusRemotePlugin *object, + GSignondDbusRemotePluginV1 *object, GVariant *arg_uiData); }; -GType gsignond_dbus_remote_plugin_get_type (void) G_GNUC_CONST; +GType gsignond_dbus_remote_plugin_v1_get_type (void) G_GNUC_CONST; -GDBusInterfaceInfo *gsignond_dbus_remote_plugin_interface_info (void); -guint gsignond_dbus_remote_plugin_override_properties (GObjectClass *klass, guint property_id_begin); +GDBusInterfaceInfo *gsignond_dbus_remote_plugin_v1_interface_info (void); +guint gsignond_dbus_remote_plugin_v1_override_properties (GObjectClass *klass, guint property_id_begin); /* D-Bus method call completion functions: */ -void gsignond_dbus_remote_plugin_complete_cancel ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_complete_cancel ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation); -void gsignond_dbus_remote_plugin_complete_request_initial ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_complete_request_initial ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation); -void gsignond_dbus_remote_plugin_complete_request ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_complete_request ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation); -void gsignond_dbus_remote_plugin_complete_user_action_finished ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_complete_user_action_finished ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation); -void gsignond_dbus_remote_plugin_complete_refresh ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_complete_refresh ( + GSignondDbusRemotePluginV1 *object, GDBusMethodInvocation *invocation); -void gsignond_dbus_remote_plugin_complete_get_info ( - GSignondDbusRemotePlugin *object, - GDBusMethodInvocation *invocation, - const gchar *type, - const gchar *const *mechanisms); - /* D-Bus signal emissions functions: */ -void gsignond_dbus_remote_plugin_emit_response ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_emit_response ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData); -void gsignond_dbus_remote_plugin_emit_response_final ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_emit_response_final ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData); -void gsignond_dbus_remote_plugin_emit_store ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_emit_store ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_sessionData); -void gsignond_dbus_remote_plugin_emit_error ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_emit_error ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_error); -void gsignond_dbus_remote_plugin_emit_user_action_required ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_emit_user_action_required ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_uiData); -void gsignond_dbus_remote_plugin_emit_refreshed ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_emit_refreshed ( + GSignondDbusRemotePluginV1 *object, GVariant *arg_uiData); -void gsignond_dbus_remote_plugin_emit_status_changed ( - GSignondDbusRemotePlugin *object, +void gsignond_dbus_remote_plugin_v1_emit_status_changed ( + GSignondDbusRemotePluginV1 *object, gint arg_state, const gchar *arg_message); /* D-Bus method calls: */ -void gsignond_dbus_remote_plugin_call_cancel ( - GSignondDbusRemotePlugin *proxy, +void gsignond_dbus_remote_plugin_v1_call_cancel ( + GSignondDbusRemotePluginV1 *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -gboolean gsignond_dbus_remote_plugin_call_cancel_finish ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_cancel_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error); -gboolean gsignond_dbus_remote_plugin_call_cancel_sync ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_cancel_sync ( + GSignondDbusRemotePluginV1 *proxy, GCancellable *cancellable, GError **error); -void gsignond_dbus_remote_plugin_call_request_initial ( - GSignondDbusRemotePlugin *proxy, +void gsignond_dbus_remote_plugin_v1_call_request_initial ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_sessionData, GVariant *arg_identityMethodCache, const gchar *arg_mechanism, @@ -183,123 +178,113 @@ void gsignond_dbus_remote_plugin_call_request_initial ( GAsyncReadyCallback callback, gpointer user_data); -gboolean gsignond_dbus_remote_plugin_call_request_initial_finish ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_request_initial_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error); -gboolean gsignond_dbus_remote_plugin_call_request_initial_sync ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_request_initial_sync ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_sessionData, GVariant *arg_identityMethodCache, const gchar *arg_mechanism, GCancellable *cancellable, GError **error); -void gsignond_dbus_remote_plugin_call_request ( - GSignondDbusRemotePlugin *proxy, +void gsignond_dbus_remote_plugin_v1_call_request ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_sessionData, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -gboolean gsignond_dbus_remote_plugin_call_request_finish ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_request_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error); -gboolean gsignond_dbus_remote_plugin_call_request_sync ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_request_sync ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_sessionData, GCancellable *cancellable, GError **error); -void gsignond_dbus_remote_plugin_call_user_action_finished ( - GSignondDbusRemotePlugin *proxy, +void gsignond_dbus_remote_plugin_v1_call_user_action_finished ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_uiData, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -gboolean gsignond_dbus_remote_plugin_call_user_action_finished_finish ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error); -gboolean gsignond_dbus_remote_plugin_call_user_action_finished_sync ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_uiData, GCancellable *cancellable, GError **error); -void gsignond_dbus_remote_plugin_call_refresh ( - GSignondDbusRemotePlugin *proxy, +void gsignond_dbus_remote_plugin_v1_call_refresh ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_uiData, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -gboolean gsignond_dbus_remote_plugin_call_refresh_finish ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_refresh_finish ( + GSignondDbusRemotePluginV1 *proxy, GAsyncResult *res, GError **error); -gboolean gsignond_dbus_remote_plugin_call_refresh_sync ( - GSignondDbusRemotePlugin *proxy, +gboolean gsignond_dbus_remote_plugin_v1_call_refresh_sync ( + GSignondDbusRemotePluginV1 *proxy, GVariant *arg_uiData, GCancellable *cancellable, GError **error); -void gsignond_dbus_remote_plugin_call_get_info ( - GSignondDbusRemotePlugin *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -gboolean gsignond_dbus_remote_plugin_call_get_info_finish ( - GSignondDbusRemotePlugin *proxy, - gchar **out_type, - gchar ***out_mechanisms, - GAsyncResult *res, - GError **error); -gboolean gsignond_dbus_remote_plugin_call_get_info_sync ( - GSignondDbusRemotePlugin *proxy, - gchar **out_type, - gchar ***out_mechanisms, - GCancellable *cancellable, - GError **error); +/* D-Bus property accessors: */ +const gchar *gsignond_dbus_remote_plugin_v1_get_method (GSignondDbusRemotePluginV1 *object); +gchar *gsignond_dbus_remote_plugin_v1_dup_method (GSignondDbusRemotePluginV1 *object); +void gsignond_dbus_remote_plugin_v1_set_method (GSignondDbusRemotePluginV1 *object, const gchar *value); +const gchar *const *gsignond_dbus_remote_plugin_v1_get_mechanisms (GSignondDbusRemotePluginV1 *object); +gchar **gsignond_dbus_remote_plugin_v1_dup_mechanisms (GSignondDbusRemotePluginV1 *object); +void gsignond_dbus_remote_plugin_v1_set_mechanisms (GSignondDbusRemotePluginV1 *object, const gchar *const *value); /* ---- */ -#define GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY (gsignond_dbus_remote_plugin_proxy_get_type ()) -#define GSIGNOND_DBUS_REMOTE_PLUGIN_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, GSignondDbusRemotePluginProxy)) -#define GSIGNOND_DBUS_REMOTE_PLUGIN_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, GSignondDbusRemotePluginProxyClass)) -#define GSIGNOND_DBUS_REMOTE_PLUGIN_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, GSignondDbusRemotePluginProxyClass)) -#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY)) -#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY)) +#define GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY (gsignond_dbus_remote_plugin_v1_proxy_get_type ()) +#define GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, GSignondDbusRemotePluginV1Proxy)) +#define GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, GSignondDbusRemotePluginV1ProxyClass)) +#define GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, GSignondDbusRemotePluginV1ProxyClass)) +#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_V1_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY)) +#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_V1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY)) -typedef struct _GSignondDbusRemotePluginProxy GSignondDbusRemotePluginProxy; -typedef struct _GSignondDbusRemotePluginProxyClass GSignondDbusRemotePluginProxyClass; -typedef struct _GSignondDbusRemotePluginProxyPrivate GSignondDbusRemotePluginProxyPrivate; +typedef struct _GSignondDbusRemotePluginV1Proxy GSignondDbusRemotePluginV1Proxy; +typedef struct _GSignondDbusRemotePluginV1ProxyClass GSignondDbusRemotePluginV1ProxyClass; +typedef struct _GSignondDbusRemotePluginV1ProxyPrivate GSignondDbusRemotePluginV1ProxyPrivate; -struct _GSignondDbusRemotePluginProxy +struct _GSignondDbusRemotePluginV1Proxy { /*< private >*/ GDBusProxy parent_instance; - GSignondDbusRemotePluginProxyPrivate *priv; + GSignondDbusRemotePluginV1ProxyPrivate *priv; }; -struct _GSignondDbusRemotePluginProxyClass +struct _GSignondDbusRemotePluginV1ProxyClass { GDBusProxyClass parent_class; }; -GType gsignond_dbus_remote_plugin_proxy_get_type (void) G_GNUC_CONST; +GType gsignond_dbus_remote_plugin_v1_proxy_get_type (void) G_GNUC_CONST; -void gsignond_dbus_remote_plugin_proxy_new ( +void gsignond_dbus_remote_plugin_v1_proxy_new ( GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, @@ -307,10 +292,10 @@ void gsignond_dbus_remote_plugin_proxy_new ( GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -GSignondDbusRemotePlugin *gsignond_dbus_remote_plugin_proxy_new_finish ( +GSignondDbusRemotePluginV1 *gsignond_dbus_remote_plugin_v1_proxy_new_finish ( GAsyncResult *res, GError **error); -GSignondDbusRemotePlugin *gsignond_dbus_remote_plugin_proxy_new_sync ( +GSignondDbusRemotePluginV1 *gsignond_dbus_remote_plugin_v1_proxy_new_sync ( GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, @@ -318,7 +303,7 @@ GSignondDbusRemotePlugin *gsignond_dbus_remote_plugin_proxy_new_sync ( GCancellable *cancellable, GError **error); -void gsignond_dbus_remote_plugin_proxy_new_for_bus ( +void gsignond_dbus_remote_plugin_v1_proxy_new_for_bus ( GBusType bus_type, GDBusProxyFlags flags, const gchar *name, @@ -326,10 +311,10 @@ void gsignond_dbus_remote_plugin_proxy_new_for_bus ( GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -GSignondDbusRemotePlugin *gsignond_dbus_remote_plugin_proxy_new_for_bus_finish ( +GSignondDbusRemotePluginV1 *gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish ( GAsyncResult *res, GError **error); -GSignondDbusRemotePlugin *gsignond_dbus_remote_plugin_proxy_new_for_bus_sync ( +GSignondDbusRemotePluginV1 *gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync ( GBusType bus_type, GDBusProxyFlags flags, const gchar *name, @@ -340,32 +325,32 @@ GSignondDbusRemotePlugin *gsignond_dbus_remote_plugin_proxy_new_for_bus_sync ( /* ---- */ -#define GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON (gsignond_dbus_remote_plugin_skeleton_get_type ()) -#define GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON, GSignondDbusRemotePluginSkeleton)) -#define GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON, GSignondDbusRemotePluginSkeletonClass)) -#define GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON, GSignondDbusRemotePluginSkeletonClass)) -#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON)) -#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON)) +#define GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON (gsignond_dbus_remote_plugin_v1_skeleton_get_type ()) +#define GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, GSignondDbusRemotePluginV1Skeleton)) +#define GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, GSignondDbusRemotePluginV1SkeletonClass)) +#define GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, GSignondDbusRemotePluginV1SkeletonClass)) +#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_V1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON)) +#define GSIGNOND_DBUS_IS_REMOTE_PLUGIN_V1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON)) -typedef struct _GSignondDbusRemotePluginSkeleton GSignondDbusRemotePluginSkeleton; -typedef struct _GSignondDbusRemotePluginSkeletonClass GSignondDbusRemotePluginSkeletonClass; -typedef struct _GSignondDbusRemotePluginSkeletonPrivate GSignondDbusRemotePluginSkeletonPrivate; +typedef struct _GSignondDbusRemotePluginV1Skeleton GSignondDbusRemotePluginV1Skeleton; +typedef struct _GSignondDbusRemotePluginV1SkeletonClass GSignondDbusRemotePluginV1SkeletonClass; +typedef struct _GSignondDbusRemotePluginV1SkeletonPrivate GSignondDbusRemotePluginV1SkeletonPrivate; -struct _GSignondDbusRemotePluginSkeleton +struct _GSignondDbusRemotePluginV1Skeleton { /*< private >*/ GDBusInterfaceSkeleton parent_instance; - GSignondDbusRemotePluginSkeletonPrivate *priv; + GSignondDbusRemotePluginV1SkeletonPrivate *priv; }; -struct _GSignondDbusRemotePluginSkeletonClass +struct _GSignondDbusRemotePluginV1SkeletonClass { GDBusInterfaceSkeletonClass parent_class; }; -GType gsignond_dbus_remote_plugin_skeleton_get_type (void) G_GNUC_CONST; +GType gsignond_dbus_remote_plugin_v1_skeleton_get_type (void) G_GNUC_CONST; -GSignondDbusRemotePlugin *gsignond_dbus_remote_plugin_skeleton_new (void); +GSignondDbusRemotePluginV1 *gsignond_dbus_remote_plugin_v1_skeleton_new (void); G_END_DECLS diff --git a/src/daemon/dbus/gsignond-dbus-signonui-adapter.c b/src/daemon/dbus/gsignond-dbus-signonui-adapter.c index 74b887b..a4392cd 100644 --- a/src/daemon/dbus/gsignond-dbus-signonui-adapter.c +++ b/src/daemon/dbus/gsignond-dbus-signonui-adapter.c @@ -243,8 +243,7 @@ _on_query_dialog_ready (GObject *proxy, GAsyncResult *res, gpointer user_data) g_object_unref (info->adapter); g_slice_free (_SignonuiDbusInfo, info); } - - if (error) g_error_free (error); + else if (error) g_error_free (error); if (reply) g_variant_unref (reply); } @@ -290,9 +289,8 @@ _on_refresh_dialog_ready (GObject *proxy, GAsyncResult *res, gpointer user_data) g_object_unref (info->adapter); g_slice_free (_SignonuiDbusInfo, info); } - + else if (error) g_error_free (error); if (reply) g_variant_unref (reply); - if (error) g_error_free (error); } gboolean @@ -338,9 +336,9 @@ _on_cancel_request_ready (GObject *proxy, GAsyncResult *res, gpointer user_data) g_object_unref (info->adapter); g_slice_free (_SignonuiDbusInfo, info); } + else if (error) g_error_free (error); if (reply) g_variant_unref (reply); - if (error) g_error_free (error); } gboolean diff --git a/src/daemon/dbus/gsignond-dbus.h b/src/daemon/dbus/gsignond-dbus.h index 8da81ce..a89b1f7 100644 --- a/src/daemon/dbus/gsignond-dbus.h +++ b/src/daemon/dbus/gsignond-dbus.h @@ -36,7 +36,7 @@ #define GSIGNOND_DAEMON_INTERFACE GSIGNOND_SERVICE_PREFIX ".AuthService" #define GSIGNOND_IDENTITY_INTERFACE GSIGNOND_SERVICE_PREFIX ".Identity" #define GSIGNOND_AUTH_SESSION_INTERFACE GSIGNOND_SERVICE_PREFIX ".AuthSession" -#define GSIGNOND_PLUGIN_OBJECTPATH GSIGNOND_DAEMON_OBJECTPATH "/Plugin" +#define GSIGNOND_PLUGIN_OBJECTPATH "/" #define SIGNONUI_SERVICE "com.google.code.AccountsSSO.gSingleSignOn.UI" #define SIGNONUI_OBJECTPATH "/" diff --git a/src/daemon/dbus/interfaces/com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml b/src/daemon/dbus/interfaces/com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml index ef09de0..7918caa 100644 --- a/src/daemon/dbus/interfaces/com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml +++ b/src/daemon/dbus/interfaces/com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.xml @@ -1,6 +1,8 @@ - + + + @@ -17,10 +19,6 @@ - - - - diff --git a/src/daemon/gsignond-auth-session.c b/src/daemon/gsignond-auth-session.c index f165a26..68482c1 100644 --- a/src/daemon/gsignond-auth-session.c +++ b/src/daemon/gsignond-auth-session.c @@ -238,6 +238,11 @@ gsignond_auth_session_process (GSignondAuthSession *self, if (secret) gsignond_session_data_set_secret (session_data, secret); } + GSequence *realms = + gsignond_identity_info_get_realms (self->priv->identity_info); + if (realms) + gsignond_session_data_set_allowed_realms (session_data, + realms); } _ProcessData * data = g_slice_new0 (_ProcessData); @@ -342,7 +347,7 @@ _dispose (GObject *object) } if (self->priv->identity_info) { - g_hash_table_unref ((GHashTable *)self->priv->identity_info); + gsignond_identity_info_unref (self->priv->identity_info); self->priv->identity_info = NULL; } @@ -578,7 +583,7 @@ gsignond_auth_session_new (GSignondIdentityInfo *info, const gchar *method, GSig g_object_new (GSIGNOND_TYPE_AUTH_SESSION, "method", method, NULL); auth_session->priv->proxy = proxy; - auth_session->priv->identity_info = g_hash_table_ref ((GHashTable *)info); + auth_session->priv->identity_info = gsignond_identity_info_ref (info); auth_session->priv->token_data = token_data ? gsignond_dictionary_ref(token_data) : gsignond_dictionary_new(); diff --git a/src/daemon/gsignond-daemon.c b/src/daemon/gsignond-daemon.c index 735e6e4..7a05b63 100644 --- a/src/daemon/gsignond-daemon.c +++ b/src/daemon/gsignond-daemon.c @@ -23,10 +23,12 @@ * 02110-1301 USA */ -#include "gsignond-daemon.h" - #include +#include "config.h" + +#include "gsignond-daemon.h" + #include "gsignond/gsignond-config.h" #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-error.h" @@ -209,15 +211,18 @@ _init_extensions (GSignondDaemon *self) { gboolean res = TRUE; gboolean symfound; - const gchar *ext_path; + const gchar *ext_path = GSIGNOND_EXTENSIONS_DIR; const gchar *ext_name; gchar *mod_name; gchar *mod_filename; gchar *initf_name; GSignondExtension* (*ext_init) (void); - ext_path = gsignond_config_get_string (self->priv->config, - GSIGNOND_CONFIG_GENERAL_EXTENSIONS_DIR); +# ifdef ENABLE_DEBUG + const gchar *env_val = g_getenv ("SSO_EXTENSIONS_DIR"); + if (env_val) + ext_path = env_val; +# endif ext_name = gsignond_config_get_string (self->priv->config, GSIGNOND_CONFIG_GENERAL_EXTENSION); if (ext_name && !ext_path) return FALSE; @@ -457,7 +462,7 @@ gsignond_daemon_register_new_identity (GSignondDaemon *daemon, DBG("register_new_identity: cache size : %d", g_hash_table_size(daemon->priv->identities)); identity = gsignond_identity_new (daemon, info); if (identity == NULL) { - gsignond_dictionary_unref (info); + gsignond_identity_info_unref (info); ERR("Unable to register new identity"); if (error) *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_INTERNAL_SERVER, "Internal server error"); return NULL; @@ -496,7 +501,7 @@ gsignond_daemon_get_identity (GSignondDaemon *daemon, gsignond_security_context_list_free (acl); \ if (!valid) { \ WARN ("identity access check failed"); \ - gsignond_dictionary_unref (info); \ + gsignond_identity_info_unref (info); \ if (error) { \ *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_PERMISSION_DENIED, "Can not read identity"); \ } \ @@ -507,8 +512,10 @@ gsignond_daemon_get_identity (GSignondDaemon *daemon, identity = GSIGNOND_IDENTITY(g_hash_table_lookup (daemon->priv->identities, GUINT_TO_POINTER(id))); if (identity) { identity_info = gsignond_identity_get_identity_info (identity); + gsignond_identity_info_ref (identity_info); VALIDATE_IDENTITY_READ_ACCESS (identity_info, ctx, NULL); DBG ("using cased Identity '%p' for id %d", identity, id); + gsignond_identity_info_unref (identity_info); return GSIGNOND_IDENTITY (g_object_ref (identity)); } diff --git a/src/daemon/gsignond-identity.c b/src/daemon/gsignond-identity.c index cb36fa1..7e3657a 100644 --- a/src/daemon/gsignond-identity.c +++ b/src/daemon/gsignond-identity.c @@ -24,15 +24,16 @@ * 02110-1301 USA */ -#include "gsignond-identity.h" +#include #include +#include "gsignond-identity.h" #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-error.h" +#include "gsignond/gsignond-config-dbus.h" #include "gsignond-daemon.h" #include "gsignond-identity-enum-types.h" #include "gsignond-auth-session.h" -#include "gsignond/gsignond-config-dbus.h" #include "common/gsignond-identity-info-internal.h" #include "plugins/gsignond-plugin-proxy-factory.h" @@ -290,7 +291,6 @@ gsignond_identity_get_info (GSignondIdentity *identity, const GSignondSecurityCo return FALSE; } - GSignondIdentityInfo *info = NULL; GVariant *vinfo = NULL; if (!identity->priv->info) { @@ -301,18 +301,8 @@ gsignond_identity_get_info (GSignondIdentity *identity, const GSignondSecurityCo VALIDATE_IDENTITY_READ_ACCESS (identity, ctx, NULL); - info = gsignond_identity_info_copy (identity->priv->info); - - /* remove password */ - gsignond_identity_info_remove_secret (info); - - /* remove username if its secret */ - if (gsignond_identity_info_get_is_username_secret (info)) - gsignond_identity_info_remove_username (info); - /* prepare identity info, excluding password and username if secret */ - vinfo = gsignond_dictionary_to_variant (identity->priv->info); - gsignond_identity_info_unref (info); + vinfo = gsignond_identity_info_to_variant (identity->priv->info); if (!vinfo) { WARN ("identity info to variant convertion failed."); if (error) *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_IDENTITY_ERR, "Identity internal eror."); @@ -831,6 +821,7 @@ typedef struct _{ GSignondDaemon *daemon; guint32 identity_id; }_StoreCachedTokenCbInfo; + static void _store_cached_token_data (const gchar *method, GSignondAuthSession *session, _StoreCachedTokenCbInfo *data) { @@ -842,16 +833,33 @@ _store_cached_token_data (const gchar *method, GSignondAuthSession *session, _St gsignond_daemon_store_identity_data (data->daemon, data->identity_id, method, token_data); } +/* check for alphanumeric characters in a string */ +static long +_check_string (const gchar *strptr) +{ + if (strptr == NULL) + return -1; + while (*strptr != '\0') { + if (isalnum(*strptr)) + return 1; + strptr++; + } + return 0; +} + guint32 gsignond_identity_store (GSignondIdentity *identity, const GVariant *info, const GSignondSecurityContext *ctx, GError **error) { + GSignondIdentityPrivate *priv = NULL; GSignondIdentityInfo *identity_info = NULL; gboolean was_new_identity = FALSE; + GSignondSecurityContext *owner_ctx = NULL; GSignondSecurityContextList *contexts = NULL; - GSignondSecurityContext *owner = NULL; + GSignondIdentityInfoPropFlags flags; + GSignondIdentityInfoPropFlags flag_mask; guint32 id; if (!(identity && GSIGNOND_IS_IDENTITY (identity))) { @@ -859,51 +867,70 @@ gsignond_identity_store (GSignondIdentity *identity, if (error) *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_UNKNOWN, "Unknown error"); return 0; } - + + priv = identity->priv; + VALIDATE_IDENTITY_WRITE_ACCESS (identity, ctx, 0); - identity_info = gsignond_dictionary_new_from_variant ((GVariant *)info); - /* dont trust 'identity id' passed via 'info' */ - id = gsignond_identity_info_get_id (identity->priv->info); - gsignond_identity_info_set_id (identity_info, id); + was_new_identity = gsignond_identity_info_get_is_identity_new (priv->info); - was_new_identity = gsignond_identity_info_get_is_identity_new (identity_info); + identity_info = gsignond_identity_info_new_from_variant ((GVariant *)info); - contexts = gsignond_identity_info_get_access_control_list (identity_info); - if (!contexts) { - contexts = gsignond_identity_info_get_access_control_list (identity->priv->info); - gsignond_identity_info_set_access_control_list (identity_info, contexts); + /* if owner context is non-NULL but empty, remove the dictionary item, + * it will get filled up later when actual store happens */ + owner_ctx = gsignond_identity_info_get_owner (identity_info); + if (owner_ctx) { + const gchar *sys_ctx = + gsignond_security_context_get_system_context (owner_ctx); + if (_check_string (sys_ctx) <= 0) { + gsignond_identity_info_remove_owner (identity_info); + } + gsignond_security_context_free (owner_ctx); + owner_ctx = NULL; } - else { + + contexts = gsignond_identity_info_get_access_control_list (identity_info); + if (contexts) { VALIDATE_IDENTITY_WRITE_ACL (identity, ctx, 0); + gsignond_security_context_list_free (contexts); } - gsignond_security_context_list_free (contexts); - owner = gsignond_identity_info_get_owner (identity_info); - if (!owner) { - owner = gsignond_identity_info_get_owner (identity->priv->info); - gsignond_identity_info_set_owner (identity_info, owner); - } - gsignond_security_context_free (owner); - - - /* update object cache */ - if (identity->priv->info) - gsignond_identity_info_unref (identity->priv->info); - identity->priv->info = identity_info; + flags = gsignond_identity_info_get_edit_flags (identity_info); + + /* select only interested field */ + flag_mask = (IDENTITY_INFO_PROP_USERNAME | + IDENTITY_INFO_PROP_USERNAME_IS_SECRET | + IDENTITY_INFO_PROP_SECRET | + IDENTITY_INFO_PROP_STORE_SECRET | + IDENTITY_INFO_PROP_CAPTION | + IDENTITY_INFO_PROP_TYPE | + IDENTITY_INFO_PROP_METHODS | + IDENTITY_INFO_PROP_REALMS | + IDENTITY_INFO_PROP_ACL); + if (was_new_identity) + flag_mask |= IDENTITY_INFO_PROP_OWNER; + flags &= flag_mask; + gsignond_identity_info_selective_copy (priv->info, identity_info, flags); + + /* FIXME : either username/secret changed reset the identity + * valdated state to FALSE ??? + */ + + gsignond_identity_info_unref (identity_info); /* Ask daemon to store identity info to db */ - id = gsignond_daemon_store_identity (identity->priv->owner, identity); + id = gsignond_daemon_store_identity (priv->owner, identity); if (!id) { if (error) *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_STORE_FAILED, "Failed to store identity"); + /*FIXME: Roll-back the local changes */ } else { if (was_new_identity) { _set_id (identity, id); - _StoreCachedTokenCbInfo data = { identity->priv->owner, id }; + _StoreCachedTokenCbInfo data = { priv->owner, id }; /* store any cached token data if available at auth sessions */ - g_hash_table_foreach (identity->priv->auth_sessions, (GHFunc)_store_cached_token_data, (gpointer)&data); + g_hash_table_foreach (priv->auth_sessions, (GHFunc)_store_cached_token_data, (gpointer)&data); } g_signal_emit (identity, signals[SIG_INFO_UPDATED], 0, GSIGNOND_IDENTITY_DATA_UPDATED); diff --git a/src/daemon/plugins/Makefile.am b/src/daemon/plugins/Makefile.am index 796bea6..2b3e85c 100644 --- a/src/daemon/plugins/Makefile.am +++ b/src/daemon/plugins/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = plugind +include $(top_srcdir)/common.mk noinst_LTLIBRARIES = libgsignond-plugins.la @@ -7,6 +7,8 @@ libgsignond_plugins_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ -I$(top_builddir)/src \ + -DGSIGNOND_PLUGINLOADERS_DIR='"$(pluginloadersdir)"' \ + -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \ $(GSIGNOND_CFLAGS) libgsignond_plugins_la_LIBADD = \ diff --git a/src/daemon/plugins/Makefile.in b/src/daemon/plugins/Makefile.in index 1780ba2..2e5894e 100644 --- a/src/daemon/plugins/Makefile.in +++ b/src/daemon/plugins/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -51,8 +34,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/common.mk subdir = src/daemon/plugins -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -107,52 +91,9 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgsignond_plugins_la_SOURCES) DIST_SOURCES = $(libgsignond_plugins_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -161,6 +102,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -187,6 +129,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -199,6 +142,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -291,13 +235,17 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = plugind +extensionsdir = $(pkglibdir)/extensions +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins noinst_LTLIBRARIES = libgsignond-plugins.la libgsignond_plugins_la_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ -I$(top_builddir)/src \ + -DGSIGNOND_PLUGINLOADERS_DIR='"$(pluginloadersdir)"' \ + -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \ $(GSIGNOND_CFLAGS) libgsignond_plugins_la_LIBADD = \ @@ -315,11 +263,11 @@ libgsignond_plugins_la_SOURCES = \ gsignond-plugin-remote.c CLEANFILES = -all: all-recursive +all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -340,6 +288,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/common.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -422,76 +371,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -502,23 +381,10 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -537,7 +403,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -587,45 +453,19 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done check-am: all-am -check: check-recursive +check: check-am all-am: Makefile $(LTLIBRARIES) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-recursive +installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ @@ -648,83 +488,81 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive +clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am -distclean: distclean-recursive +distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags -dvi: dvi-recursive +dvi: dvi-am dvi-am: -html: html-recursive +html: html-am html-am: -info: info-recursive +info: info-am info-am: install-data-am: -install-dvi: install-dvi-recursive +install-dvi: install-dvi-am install-dvi-am: install-exec-am: -install-html: install-html-recursive +install-html: install-html-am install-html-am: -install-info: install-info-recursive +install-info: install-info-am install-info-am: install-man: -install-pdf: install-pdf-recursive +install-pdf: install-pdf-am install-pdf-am: -install-ps: install-ps-recursive +install-ps: install-ps-am install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-recursive +maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-recursive +mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-recursive +pdf: pdf-am pdf-am: -ps: ps-recursive +ps: ps-am ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -732,10 +570,9 @@ uninstall-am: install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/daemon/plugins/gsignond-plugin-proxy-factory.c b/src/daemon/plugins/gsignond-plugin-proxy-factory.c index 4f94e4a..6dabab2 100644 --- a/src/daemon/plugins/gsignond-plugin-proxy-factory.c +++ b/src/daemon/plugins/gsignond-plugin-proxy-factory.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2012 Intel Corporation. + * Copyright (C) 2012-2014 Intel Corporation. * * Contact: Alexander Kanavin * @@ -26,8 +26,9 @@ #include #include +#include "config.h" + #include "gsignond/gsignond-log.h" -#include "common/gsignond-plugin-loader.h" #include "gsignond-plugin-proxy-factory.h" #include "gsignond-plugin-remote.h" @@ -45,60 +46,120 @@ enum static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, }; + +static gchar** _get_plugin_names_from_loader(const gchar* loader_path) +{ + gchar* command_line = g_strdup_printf("%s --list-plugins", loader_path); + gchar* standard_output = NULL; + gchar* standard_error = NULL; + gint exit_status; + GError* error = NULL; + + if (g_spawn_command_line_sync(command_line, &standard_output, &standard_error, + &exit_status, &error)) { + DBG("Loader %s returned plugin list %s", loader_path, standard_output); + gchar** plugin_list = g_strsplit(standard_output, "\n", 0); + g_free(command_line); + g_free(standard_output); + g_free(standard_error); + return plugin_list; + } else { + DBG("Loader %s returned exit status %d, error %s", loader_path, + exit_status, error->message); + g_error_free(error); + g_free(command_line); + return NULL; + } +} + +static void _add_plugins(GSignondPluginProxyFactory* self, const gchar* loader_path, gchar** plugins) +{ + DBG ("Checking mechanisms of plugins provided by %s", loader_path); + gchar **plugin_iter = plugins; + while (*plugin_iter) { + GSignondPlugin* plugin = GSIGNOND_PLUGIN ( + gsignond_plugin_remote_new (loader_path, *plugin_iter)); + if (plugin != NULL) { + gchar* plugin_type; + gchar** mechanisms; + g_object_get(plugin, + "type", &plugin_type, + "mechanisms", &mechanisms, + NULL); + if (g_strcmp0 (plugin_type, *plugin_iter) == 0) { + const gchar* loader = g_hash_table_lookup(self->methods_to_loader_paths, + plugin_type); + // Do not replace plugins provided by gsignond-plugind with + // 3rd party plugins + if (loader && g_str_has_suffix(loader, "/gsignond-plugind")) { + DBG("Do not replace plugin %s with plugin provided by loader %s", + plugin_type, loader_path); + g_strfreev(mechanisms); + } else { + DBG("Adding plugin %s to plugin enumeration", plugin_type); + g_hash_table_insert(self->methods_to_mechanisms, + g_strdup(plugin_type), mechanisms); + g_hash_table_insert(self->methods_to_loader_paths, + g_strdup(plugin_type), g_strdup(loader_path)); + } + } else { + DBG("Plugin returned type property %s, which does not match requested type %s", + plugin_type, *plugin_iter); + g_strfreev(mechanisms); + } + g_free(plugin_type); + g_object_unref(plugin); + } + plugin_iter++; + } +} + +static void _insert_method(gchar* method, gchar*** method_iter_p) +{ + *(*method_iter_p) = method; + (*method_iter_p)++; +} + + static void _enumerate_plugins(GSignondPluginProxyFactory* self) { - GDir* plugin_dir = g_dir_open(gsignond_config_get_string (self->config, - GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR), 0, NULL); - if (plugin_dir == NULL) { + const gchar *loaders_path = GSIGNOND_PLUGINLOADERS_DIR; +# ifdef ENABLE_DEBUG + const gchar* env_val = g_getenv("SSO_BIN_DIR"); + if (env_val) + loaders_path = env_val; +# endif + + GDir* loaders_dir = g_dir_open(loaders_path, 0, NULL); + if (loaders_dir == NULL) { WARN ("plugin directory empty"); return; } - - int n_plugins = 0; - while (g_dir_read_name(plugin_dir) != NULL) - n_plugins++; - g_dir_rewind(plugin_dir); - - self->methods = g_malloc0(sizeof(gchar*) * (n_plugins + 1)); - DBG ("enumerate plugins in %s (factory=%p)", - gsignond_config_get_string (self->config, - GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR), - self - ); - gchar **method_iter = self->methods; + DBG ("Getting lists of plugins from loaders in %s (factory=%p)", loaders_path, self); while (1) { - const gchar* plugin_soname = g_dir_read_name(plugin_dir); - if (plugin_soname == NULL) + const gchar* loader_name = g_dir_read_name(loaders_dir); + if (loader_name == NULL) break; - if (g_str_has_prefix(plugin_soname, "lib") && - g_str_has_suffix(plugin_soname, ".so")) { - gchar* plugin_name = g_strndup(plugin_soname+3, - strlen(plugin_soname) - 6); - GSignondPlugin* plugin = GSIGNOND_PLUGIN ( - gsignond_plugin_remote_new (self->config, plugin_name)); - if (plugin != NULL) { - gchar* plugin_type; - gchar** mechanisms; - g_object_get(plugin, - "type", &plugin_type, - "mechanisms", &mechanisms, - NULL); - if (g_strcmp0 (plugin_type, plugin_name) == 0) { - *method_iter = plugin_type; - method_iter++; - g_hash_table_insert(self->mechanisms, - plugin_type, mechanisms); - } else { - g_free(plugin_type); - g_strfreev(mechanisms); - } - g_object_unref(plugin); - } - g_free(plugin_name); + gchar* loader_path = g_build_filename(loaders_path, loader_name, NULL); + gchar** plugins = _get_plugin_names_from_loader(loader_path); + if (plugins != NULL) { + _add_plugins(self, loader_path, plugins); + g_strfreev(plugins); } + g_free(loader_path); } - g_dir_close(plugin_dir); + g_dir_close(loaders_dir); + + // make a flat list of available plugin types + int n_plugins = g_hash_table_size(self->methods_to_mechanisms); + self->methods = g_new0(gchar*, n_plugins + 1); + gchar **method_iter = self->methods; + + GList* keys = g_hash_table_get_keys(self->methods_to_mechanisms); + g_list_foreach(keys, (GFunc)_insert_method, &method_iter); + + g_list_free(keys); } static GObject * @@ -178,9 +239,13 @@ gsignond_plugin_proxy_factory_finalize (GObject *gobject) g_hash_table_destroy (self->plugins); self->plugins = NULL; } - if (self->mechanisms) { - g_hash_table_destroy (self->mechanisms); - self->mechanisms = NULL; + if (self->methods_to_mechanisms) { + g_hash_table_destroy (self->methods_to_mechanisms); + self->methods_to_mechanisms = NULL; + } + if (self->methods_to_loader_paths) { + g_hash_table_destroy (self->methods_to_loader_paths); + self->methods_to_loader_paths = NULL; } if (self->methods) { g_free (self->methods); @@ -220,11 +285,16 @@ gsignond_plugin_proxy_factory_class_init (GSignondPluginProxyFactoryClass *klass static void gsignond_plugin_proxy_factory_init (GSignondPluginProxyFactory *self) { - self->mechanisms = g_hash_table_new_full((GHashFunc)g_str_hash, + self->methods_to_mechanisms = g_hash_table_new_full((GHashFunc)g_str_hash, (GEqualFunc)g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_strfreev); + self->methods_to_loader_paths = g_hash_table_new_full((GHashFunc)g_str_hash, + (GEqualFunc)g_str_equal, + (GDestroyNotify)g_free, + (GDestroyNotify)g_free); + self->plugins = g_hash_table_new_full ((GHashFunc)g_str_hash, (GEqualFunc)g_str_equal, (GDestroyNotify)g_free, @@ -286,7 +356,7 @@ gsignond_plugin_proxy_factory_get_plugin(GSignondPluginProxyFactory* factory, _enumerate_plugins (factory); } - if (g_hash_table_lookup(factory->mechanisms, plugin_type) == NULL) { + if (g_hash_table_lookup(factory->methods_to_mechanisms, plugin_type) == NULL) { DBG("Plugin not known %s", plugin_type); return NULL; } @@ -298,7 +368,8 @@ gsignond_plugin_proxy_factory_get_plugin(GSignondPluginProxyFactory* factory, return proxy; } - proxy = gsignond_plugin_proxy_new(factory->config, plugin_type); + proxy = gsignond_plugin_proxy_new(g_hash_table_lookup(factory->methods_to_loader_paths, plugin_type), plugin_type, + gsignond_config_get_integer (factory->config, GSIGNOND_CONFIG_PLUGIN_TIMEOUT)); if (proxy == NULL) { return NULL; } @@ -309,27 +380,6 @@ gsignond_plugin_proxy_factory_get_plugin(GSignondPluginProxyFactory* factory, return proxy; } -gboolean gsignond_plugin_proxy_factory_add_plugin( - GSignondPluginProxyFactory* factory, - GSignondPluginProxy* proxy) -{ - g_return_val_if_fail (factory && GSIGNOND_IS_PLUGIN_PROXY_FACTORY(factory), FALSE); - g_return_val_if_fail (proxy && GSIGNOND_IS_PLUGIN_PROXY(proxy), FALSE); - - gchar* plugin_type = NULL; - g_object_get (proxy, "type", &plugin_type, NULL); - - if (g_hash_table_contains(factory->plugins, plugin_type)) { - g_free(plugin_type); - return FALSE; - } - g_object_ref(proxy); - DBG("add plugin %s -> %p", plugin_type, proxy); - g_hash_table_insert(factory->plugins, plugin_type, proxy); - - return TRUE; -} - const gchar** gsignond_plugin_proxy_factory_get_plugin_types( GSignondPluginProxyFactory* factory) @@ -344,11 +394,11 @@ const gchar** gsignond_plugin_proxy_factory_get_plugin_mechanisms( GSignondPluginProxyFactory* factory, const gchar* plugin_type) { - g_return_val_if_fail(factory->mechanisms, NULL); + g_return_val_if_fail(factory->methods_to_mechanisms, NULL); if (factory->methods == NULL) { _enumerate_plugins (factory); } - return g_hash_table_lookup(factory->mechanisms, plugin_type); + return g_hash_table_lookup(factory->methods_to_mechanisms, plugin_type); } diff --git a/src/daemon/plugins/gsignond-plugin-proxy-factory.h b/src/daemon/plugins/gsignond-plugin-proxy-factory.h index bed020c..d6d4205 100644 --- a/src/daemon/plugins/gsignond-plugin-proxy-factory.h +++ b/src/daemon/plugins/gsignond-plugin-proxy-factory.h @@ -50,7 +50,8 @@ struct _GSignondPluginProxyFactory GHashTable* plugins; gchar** methods; - GHashTable* mechanisms; + GHashTable* methods_to_mechanisms; + GHashTable* methods_to_loader_paths; }; struct _GSignondPluginProxyFactoryClass @@ -67,10 +68,6 @@ GSignondPluginProxy* gsignond_plugin_proxy_factory_get_plugin(GSignondPluginProxyFactory* factory, const gchar* plugin_type); -gboolean gsignond_plugin_proxy_factory_add_plugin( - GSignondPluginProxyFactory* factory, - GSignondPluginProxy* proxy); - const gchar** gsignond_plugin_proxy_factory_get_plugin_types( GSignondPluginProxyFactory* factory); diff --git a/src/daemon/plugins/gsignond-plugin-proxy.c b/src/daemon/plugins/gsignond-plugin-proxy.c index 7e2e225..30446c5 100644 --- a/src/daemon/plugins/gsignond-plugin-proxy.c +++ b/src/daemon/plugins/gsignond-plugin-proxy.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2012 Intel Corporation. + * Copyright (C) 2012-2014 Intel Corporation. * * Contact: Alexander Kanavin * @@ -26,7 +26,6 @@ #include "gsignond/gsignond-error.h" #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-config.h" -#include "common/gsignond-plugin-loader.h" #include "daemon/gsignond-auth-session.h" #include "gsignond-plugin-proxy.h" #include "gsignond-plugin-remote.h" @@ -42,14 +41,14 @@ enum PROP_TYPE, PROP_MECHANISMS, - PROP_CONFIG, + PROP_LOADERPATH, N_PROPERTIES }; struct _GSignondPluginProxyPrivate { - GSignondConfig *config; + gchar* loader_path; gchar* plugin_type; GSignondPlugin* plugin; GQueue* session_queue; @@ -289,7 +288,7 @@ gsignond_plugin_proxy_constructor ( /* update the object state depending on constructor properties */ GSignondPluginProxy* self = GSIGNOND_PLUGIN_PROXY (obj); GSignondPluginProxyPrivate *priv = self->priv; - priv->plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new (priv->config, + priv->plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new (priv->loader_path, priv->plugin_type)); if (priv->plugin == NULL) { @@ -343,9 +342,9 @@ gsignond_plugin_proxy_set_property ( g_free (self->priv->plugin_type); priv->plugin_type = g_value_dup_string (value); break; - case PROP_CONFIG: - g_assert (self->priv->config == NULL); - priv->config = g_value_dup_object (value); + case PROP_LOADERPATH: + g_assert (self->priv->loader_path == NULL); + priv->loader_path = g_value_dup_string (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -372,8 +371,8 @@ gsignond_plugin_proxy_get_property ( g_object_get_property (G_OBJECT(priv->plugin), "mechanisms", value); break; - case PROP_CONFIG: - g_value_set_object (value, priv->config); + case PROP_LOADERPATH: + g_value_set_string (value, priv->loader_path); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -397,10 +396,6 @@ gsignond_plugin_proxy_dispose ( g_object_unref (priv->plugin); priv->plugin = NULL; } - if (priv->config) { - g_object_unref (priv->config); - priv->config = NULL; - } /* Chain up to the parent class */ G_OBJECT_CLASS (gsignond_plugin_proxy_parent_class)->dispose (gobject); @@ -416,6 +411,10 @@ gsignond_plugin_proxy_finalize (GObject *gobject) g_free (priv->plugin_type); priv->plugin_type = NULL; } + if (priv->loader_path) { + g_free (priv->loader_path); + priv->loader_path = NULL; + } if (priv->session_queue) { g_queue_free_full (priv->session_queue, @@ -456,14 +455,13 @@ gsignond_plugin_proxy_class_init ( "List of plugin mechanisms", G_TYPE_STRV, G_PARAM_READABLE); - obj_properties[PROP_CONFIG] = g_param_spec_object ("config", - "config", - "Configuration object", - GSIGNOND_TYPE_CONFIG, - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_READWRITE | + obj_properties[PROP_LOADERPATH] = g_param_spec_string ("loaderpath", + "Path to loader", + "Path to plugin loader for this plugin", + "" /* default value */, + G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - + g_object_class_install_properties (gobject_class, N_PROPERTIES, obj_properties); @@ -477,7 +475,7 @@ gsignond_plugin_proxy_init ( GSignondPluginProxyPrivate *priv = GSIGNOND_PLUGIN_PROXY_PRIV (self); self->priv = priv; - priv->config = NULL; + priv->loader_path = NULL; priv->plugin_type = NULL; priv->plugin = NULL; priv->session_queue = g_queue_new (); @@ -497,14 +495,14 @@ gsignond_plugin_proxy_get_plugin_type ( GSignondPluginProxy* gsignond_plugin_proxy_new ( - GSignondConfig *config, - const gchar *plugin_type) + const gchar *loader_path, + const gchar *plugin_type, + gint timeout) { - g_return_val_if_fail (config && plugin_type, NULL); + g_return_val_if_fail (loader_path && plugin_type, NULL); - gint timeout = gsignond_config_get_integer (config, GSIGNOND_CONFIG_PLUGIN_TIMEOUT); GSignondPluginProxy* proxy = g_object_new (GSIGNOND_TYPE_PLUGIN_PROXY, - "config", config, + "loaderpath", loader_path, "type", plugin_type, "auto-dispose", FALSE, "timeout", timeout, diff --git a/src/daemon/plugins/gsignond-plugin-proxy.h b/src/daemon/plugins/gsignond-plugin-proxy.h index d5b5bc1..688d826 100644 --- a/src/daemon/plugins/gsignond-plugin-proxy.h +++ b/src/daemon/plugins/gsignond-plugin-proxy.h @@ -71,8 +71,9 @@ gsignond_plugin_proxy_get_type (void); GSignondPluginProxy* gsignond_plugin_proxy_new( - GSignondConfig *config, - const gchar* plugin_type); + const gchar* loader_path, + const gchar* plugin_type, + gint timeout); void gsignond_plugin_proxy_cancel ( diff --git a/src/daemon/plugins/gsignond-plugin-remote-private.h b/src/daemon/plugins/gsignond-plugin-remote-private.h index 759c13a..f69f990 100644 --- a/src/daemon/plugins/gsignond-plugin-remote-private.h +++ b/src/daemon/plugins/gsignond-plugin-remote-private.h @@ -35,20 +35,12 @@ G_BEGIN_DECLS struct _GSignondPluginRemotePrivate { GDBusConnection *connection; - GSignondDbusRemotePlugin *dbus_plugin_proxy; - gchar *plugin_type; - gchar **plugin_mechanisms; + GSignondDbusRemotePluginV1 *dbus_plugin_proxy; GPid cpid; guint child_watch_id; - GIOChannel *err_watch_ch; - guint err_watch_id; - - GMainLoop *main_loop; gboolean is_plugind_up; - gboolean unref_in_down_cb; - /* Signals */ gulong signal_response; gulong signal_response_final; diff --git a/src/daemon/plugins/gsignond-plugin-remote.c b/src/daemon/plugins/gsignond-plugin-remote.c index 7d6291a..3a0aee4 100644 --- a/src/daemon/plugins/gsignond-plugin-remote.c +++ b/src/daemon/plugins/gsignond-plugin-remote.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2013 Intel Corporation. + * Copyright (C) 2013-2014 Intel Corporation. * * Contact: Imran Zaman * @@ -23,6 +23,8 @@ * 02110-1301 USA */ +#include "config.h" + #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-error.h" #include "gsignond/gsignond-plugin-interface.h" @@ -51,8 +53,6 @@ G_DEFINE_TYPE_WITH_CODE (GSignondPluginRemote, gsignond_plugin_remote, G_TYPE_INSTANCE_GET_PRIVATE ((obj), GSIGNOND_TYPE_PLUGIN_REMOTE, \ GSignondPluginRemotePrivate) -#define GSIGNOND_PLUGIND_NAME "gsignond-plugind" - static void _on_child_down_cb ( GPid pid, @@ -66,136 +66,8 @@ _on_child_down_cb ( DBG ("Plugind(%p) with pid (%d) closed with status %d", plugin, pid, status); - if (!g_source_is_destroyed (g_main_current_source ())) { - if (plugin->priv->main_loop && g_main_loop_is_running ( - plugin->priv->main_loop)) { - g_main_loop_quit (plugin->priv->main_loop); - } - plugin->priv->is_plugind_up = FALSE; - } - - if (plugin->priv->unref_in_down_cb) { - plugin->priv->unref_in_down_cb = FALSE; - g_object_unref (plugin); - } -} - -static gboolean -_on_child_status_cb ( - GIOChannel *channel, - GIOCondition condition, - gpointer data) -{ - GSignondPluginRemote *plugin = GSIGNOND_PLUGIN_REMOTE (data); - DBG ("Plugind(%p) with pid (%d) status cb", plugin, plugin->priv->cpid); - - if (plugin->priv->main_loop && g_main_loop_is_running ( - plugin->priv->main_loop)) { - g_main_loop_quit (plugin->priv->main_loop); - } - - if (g_io_channel_get_flags (channel) & G_IO_FLAG_IS_READABLE) { - gchar string[1]; - GError *error = NULL; - gsize bytes_read = 0; - GIOStatus status = g_io_channel_read_chars (channel, string, 1, - &bytes_read, &error); - if (status == G_IO_STATUS_NORMAL && error == NULL) { - if (*string == '1') { - DBG ("Plugind is UP and READY"); - plugin->priv->is_plugind_up = TRUE; - } else if (*string == '0') { - DBG ("Plugind is DOWN"); - plugin->priv->is_plugind_up = FALSE; - } - } - if (error) { - g_error_free (error); - } - } - - return FALSE; -} - -static gboolean -_on_loop_timeout_cb (gpointer data) -{ - GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (data); - - if (g_main_loop_is_running (self->priv->main_loop)) { - g_main_loop_quit (self->priv->main_loop); - } - - return FALSE; -} - -static guint -_create_main_loop_with_timeout ( - GSignondPluginRemote *self, - GMainContext *context, - guint timeout) -{ - guint timer_id = 0; - GSource *timer = g_timeout_source_new (timeout); - g_source_set_callback (timer, (GSourceFunc) _on_loop_timeout_cb, self, - NULL); - //g_source_attach increments the ref count of the source - timer_id = g_source_attach (timer, context); - g_source_unref (timer); - - self->priv->main_loop = g_main_loop_new (context, TRUE); - //loop has ref'd the context - if (context) { - g_main_context_unref (context); - } - return timer_id; -} - -static void -_run_main_loop ( - GSignondPluginRemote *self) -{ - if (self->priv->main_loop) { - g_main_loop_run (self->priv->main_loop); - /* attached context gets freed as well, which internally destroys all - * the attached sources */ - g_main_loop_unref (self->priv->main_loop); - self->priv->main_loop = NULL; - } -} - -static void -_run_main_loop_with_timeout ( - GSignondPluginRemote *self, - guint timeout) -{ - guint timer_id = _create_main_loop_with_timeout (self, NULL, timeout); - _run_main_loop (self); - g_source_remove (timer_id); -} - -static void -_run_main_loop_with_ready_watch ( - GSignondPluginRemote *self, - gint fd, - guint timeout) -{ - GIOChannel *ready_watch = NULL; - GSource *up_source = NULL; + plugin->priv->is_plugind_up = FALSE; - GMainContext *context = g_main_context_new (); - _create_main_loop_with_timeout (self, context, timeout); - - ready_watch = g_io_channel_unix_new (fd); - up_source = g_io_create_watch (ready_watch, G_IO_IN | G_IO_HUP); - g_source_set_callback (up_source, (GSourceFunc)_on_child_status_cb, self, - NULL); - g_source_attach (up_source, context); - g_source_unref (up_source); - - _run_main_loop (self); - - g_io_channel_unref (ready_watch); } static void @@ -222,40 +94,13 @@ gsignond_plugin_remote_get_property ( switch (property_id) { case PROP_TYPE: { - if (!self->priv->plugin_type) { - GError *error = NULL; - gsignond_dbus_remote_plugin_call_get_info_sync ( - self->priv->dbus_plugin_proxy, &self->priv->plugin_type, - &self->priv->plugin_mechanisms, NULL, &error); - if (error) { - DBG ("Plugin type retrieval error :: %s", error->message); - g_error_free (error); - if (self->priv->plugin_type) { - g_free (self->priv->plugin_type); - self->priv->plugin_type = NULL; - } - } - } - g_value_set_string (value, self->priv->plugin_type); + g_value_set_string (value, + gsignond_dbus_remote_plugin_v1_get_method(self->priv->dbus_plugin_proxy)); break; } case PROP_MECHANISMS: { - if (!self->priv->plugin_mechanisms) { - GError *error = NULL; - gsignond_dbus_remote_plugin_call_get_info_sync ( - self->priv->dbus_plugin_proxy, &self->priv->plugin_type, - &self->priv->plugin_mechanisms, NULL, &error); - if (error) { - DBG ("Plugin mechanisms retrieval error :: %s", - error->message); - g_error_free (error); - if (self->priv->plugin_mechanisms) { - g_strfreev (self->priv->plugin_mechanisms); - self->priv->plugin_mechanisms = NULL; - } - } - } - g_value_set_boxed (value, self->priv->plugin_mechanisms); + g_value_set_boxed (value, + gsignond_dbus_remote_plugin_v1_get_mechanisms(self->priv->dbus_plugin_proxy)); break; } default: @@ -264,37 +109,28 @@ gsignond_plugin_remote_get_property ( } +static gboolean _check_child_exited(GSignondPluginRemote *self) +{ + if (kill (self->priv->cpid, 0) == 0) { + WARN ("Plugind has to be killed with SIGKILL"); + kill (self->priv->cpid, SIGKILL); + } + return FALSE; +} + static void gsignond_plugin_remote_dispose (GObject *object) { GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (object); - self->priv->unref_in_down_cb = FALSE; - - if (self->priv->main_loop) { - if (g_main_loop_is_running (self->priv->main_loop)) { - g_main_loop_quit (self->priv->main_loop); - } - g_main_loop_unref (self->priv->main_loop); - self->priv->main_loop = NULL; - } - if (self->priv->cpid > 0 && self->priv->is_plugind_up) { DBG ("Send SIGTERM to Plugind"); kill (self->priv->cpid, SIGTERM); - _run_main_loop_with_timeout (self, 1000); //1 sec - - if (kill (self->priv->cpid, 0) == 0) { - WARN ("Plugind have to be killed with SIGKILL"); - kill (self->priv->cpid, SIGKILL); - _run_main_loop_with_timeout (self, 1000); //1 sec - } - - if (self->priv->is_plugind_up) { - WARN ("Plugind did not exit even after SIGKILL"); - } else { - DBG ("Plugind DESTROYED"); - } + guint check_id = g_timeout_add(1000, (GSourceFunc)_check_child_exited, self); + while (self->priv->is_plugind_up) + g_main_context_iteration(NULL, TRUE); + g_source_remove(check_id); + DBG ("Plugind DESTROYED"); } self->priv->cpid = 0; @@ -327,32 +163,13 @@ gsignond_plugin_remote_dispose (GObject *object) self->priv->dbus_plugin_proxy = NULL; } - if (self->priv->err_watch_ch) { - g_io_channel_shutdown (self->priv->err_watch_ch, FALSE, NULL); - g_io_channel_unref (self->priv->err_watch_ch); - self->priv->err_watch_ch = NULL; - if (self->priv->err_watch_id) { - g_source_remove (self->priv->err_watch_id); - } - } - G_OBJECT_CLASS (gsignond_plugin_remote_parent_class)->dispose (object); } static void gsignond_plugin_remote_finalize (GObject *object) { - GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (object); - - if (self->priv->plugin_type) { - g_free (self->priv->plugin_type); - self->priv->plugin_type = NULL; - } - - if (self->priv->plugin_mechanisms) { - g_strfreev (self->priv->plugin_mechanisms); - self->priv->plugin_mechanisms = NULL; - } + //GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (object); G_OBJECT_CLASS (gsignond_plugin_remote_parent_class)->finalize (object); } @@ -383,16 +200,11 @@ gsignond_plugin_remote_init (GSignondPluginRemote *self) self->priv->connection = NULL; self->priv->dbus_plugin_proxy = NULL; - self->priv->plugin_type = NULL; - self->priv->plugin_mechanisms = NULL; self->priv->cpid = 0; - self->priv->err_watch_ch = NULL; self->priv->child_watch_id = 0; - self->priv->main_loop = NULL; self->priv->is_plugind_up = FALSE; - self->priv->unref_in_down_cb = FALSE; } static void @@ -402,10 +214,10 @@ _cancel_async_cb ( gpointer user_data) { GError *error = NULL; - GSignondDbusRemotePlugin *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN (object); + GSignondDbusRemotePluginV1 *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (object); GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (user_data); - gsignond_dbus_remote_plugin_call_cancel_finish (proxy, res, &error); + gsignond_dbus_remote_plugin_v1_call_cancel_finish (proxy, res, &error); if (error) { gsignond_plugin_error (GSIGNOND_PLUGIN(self), error); g_error_free (error); @@ -419,7 +231,7 @@ gsignond_plugin_remote_cancel ( g_return_if_fail (plugin && GSIGNOND_IS_PLUGIN_REMOTE (plugin)); GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (plugin); - gsignond_dbus_remote_plugin_call_cancel ( + gsignond_dbus_remote_plugin_v1_call_cancel ( self->priv->dbus_plugin_proxy, NULL, _cancel_async_cb, self); } @@ -430,9 +242,9 @@ _request_initial_async_cb ( gpointer user_data) { GError *error = NULL; - GSignondDbusRemotePlugin *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN (object); + GSignondDbusRemotePluginV1 *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (object); GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (user_data); - gsignond_dbus_remote_plugin_call_request_initial_finish (proxy, + gsignond_dbus_remote_plugin_v1_call_request_initial_finish (proxy, res, &error); if (error) { gsignond_plugin_error (GSIGNOND_PLUGIN(self), error); @@ -460,7 +272,7 @@ gsignond_plugin_remote_request_initial ( cache = gsignond_dictionary_to_variant (empty_cache); gsignond_dictionary_unref(empty_cache); } - gsignond_dbus_remote_plugin_call_request_initial ( + gsignond_dbus_remote_plugin_v1_call_request_initial ( self->priv->dbus_plugin_proxy, data, cache, mechanism, NULL, _request_initial_async_cb, self); } @@ -472,10 +284,10 @@ _request_async_cb ( gpointer user_data) { GError *error = NULL; - GSignondDbusRemotePlugin *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN (object); + GSignondDbusRemotePluginV1 *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (object); GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (user_data); - gsignond_dbus_remote_plugin_call_request_finish (proxy, res, &error); + gsignond_dbus_remote_plugin_v1_call_request_finish (proxy, res, &error); if (error) { gsignond_plugin_error (GSIGNOND_PLUGIN(self), error); g_error_free (error); @@ -492,7 +304,7 @@ gsignond_plugin_remote_request ( GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (plugin); GVariant *data = gsignond_dictionary_to_variant (session_data); - gsignond_dbus_remote_plugin_call_request ( + gsignond_dbus_remote_plugin_v1_call_request ( self->priv->dbus_plugin_proxy, data, NULL, _request_async_cb, self); } @@ -503,10 +315,10 @@ _user_action_finished_async_cb ( gpointer user_data) { GError *error = NULL; - GSignondDbusRemotePlugin *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN (object); + GSignondDbusRemotePluginV1 *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (object); GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (user_data); - gsignond_dbus_remote_plugin_call_user_action_finished_finish (proxy, + gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish (proxy, res, &error); if (error) { gsignond_plugin_error (GSIGNOND_PLUGIN(self), error); @@ -524,7 +336,7 @@ gsignond_plugin_remote_user_action_finished ( GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (plugin); GVariant *data = gsignond_dictionary_to_variant (signonui_data); - gsignond_dbus_remote_plugin_call_user_action_finished ( + gsignond_dbus_remote_plugin_v1_call_user_action_finished ( self->priv->dbus_plugin_proxy, data, NULL, _user_action_finished_async_cb, self); } @@ -536,10 +348,10 @@ _refresh_async_cb ( gpointer user_data) { GError *error = NULL; - GSignondDbusRemotePlugin *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN (object); + GSignondDbusRemotePluginV1 *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (object); GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (user_data); - gsignond_dbus_remote_plugin_call_refresh_finish (proxy, res, &error); + gsignond_dbus_remote_plugin_v1_call_refresh_finish (proxy, res, &error); if (error) { gsignond_plugin_error (GSIGNOND_PLUGIN(self), error); g_error_free (error); @@ -556,7 +368,7 @@ gsignond_plugin_remote_refresh ( GSignondPluginRemote *self = GSIGNOND_PLUGIN_REMOTE (plugin); GVariant *data = gsignond_dictionary_to_variant (signonui_data); - gsignond_dbus_remote_plugin_call_refresh ( + gsignond_dbus_remote_plugin_v1_call_refresh ( self->priv->dbus_plugin_proxy, data, NULL, _refresh_async_cb, self); } @@ -667,7 +479,7 @@ _status_changed_cb ( GSignondPluginRemote * gsignond_plugin_remote_new ( - GSignondConfig *config, + const gchar *loader_path, const gchar *plugin_type) { GError *error = NULL; @@ -684,12 +496,9 @@ gsignond_plugin_remote_new ( signal(SIGPIPE, SIG_IGN); /* Spawn child process */ - argv = g_malloc0 ((3 + 1) * sizeof (gchar *)); - argv[0] = g_build_filename (gsignond_config_get_string (config, - GSIGNOND_CONFIG_GENERAL_BIN_DIR), GSIGNOND_PLUGIND_NAME, NULL); - argv[1] = g_module_build_path (gsignond_config_get_string (config, - GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR), plugin_type); - argv[2] = g_strdup(plugin_type); + argv = g_new0 (gchar *, 2 + 1); + argv[0] = g_strdup(loader_path); + argv[1] = g_strdup_printf("--load-plugin=%s",plugin_type); ret = g_spawn_async_with_pipes (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &cpid, &cin_fd, &cout_fd, NULL, &error); @@ -708,15 +517,7 @@ gsignond_plugin_remote_new ( plugin->priv->child_watch_id = g_child_watch_add (cpid, (GChildWatchFunc)_on_child_down_cb, plugin); plugin->priv->cpid = cpid; - - _run_main_loop_with_ready_watch (plugin, cout_fd, 1000); - if (!plugin->priv->is_plugind_up) { - DBG ("Plugind (%s) with pid %d process failed to start up", plugin_type, - cpid); - /* moved unref'ng into the cb to avoid zombies */ - plugin->priv->unref_in_down_cb = TRUE; - return NULL; - } + plugin->priv->is_plugind_up = TRUE; /* Create dbus connection */ stream = gsignond_pipe_stream_new (cout_fd, cin_fd, TRUE); @@ -726,9 +527,9 @@ gsignond_plugin_remote_new ( /* Create dbus proxy */ plugin->priv->dbus_plugin_proxy = - gsignond_dbus_remote_plugin_proxy_new_sync ( + gsignond_dbus_remote_plugin_v1_proxy_new_sync ( plugin->priv->connection, - G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + G_DBUS_PROXY_FLAGS_NONE, NULL, GSIGNOND_PLUGIN_OBJECTPATH, NULL, diff --git a/src/daemon/plugins/gsignond-plugin-remote.h b/src/daemon/plugins/gsignond-plugin-remote.h index 59807d8..4f206dc 100644 --- a/src/daemon/plugins/gsignond-plugin-remote.h +++ b/src/daemon/plugins/gsignond-plugin-remote.h @@ -69,7 +69,7 @@ gsignond_plugin_remote_get_type (void) G_GNUC_CONST; GSignondPluginRemote * gsignond_plugin_remote_new ( - GSignondConfig *config, + const gchar *loader_path, const gchar *plugin_type); G_END_DECLS diff --git a/src/extensions/Makefile.in b/src/extensions/Makefile.in index 30929b4..480fcc6 100644 --- a/src/extensions/Makefile.in +++ b/src/extensions/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,23 +15,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -80,11 +63,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -127,6 +105,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -153,6 +132,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -165,6 +145,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -465,10 +446,13 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/src/extensions/test/Makefile.am b/src/extensions/test/Makefile.am index 99612aa..a1caf40 100644 --- a/src/extensions/test/Makefile.am +++ b/src/extensions/test/Makefile.am @@ -21,3 +21,4 @@ libextension_test_la_SOURCES = \ test-storage-manager.h \ test-storage-manager.c +libextension_test_la_LDFLAGS = -avoid-version diff --git a/src/extensions/test/Makefile.in b/src/extensions/test/Makefile.in index b8e93c5..18a29cb 100644 --- a/src/extensions/test/Makefile.in +++ b/src/extensions/test/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -108,6 +91,10 @@ libextension_test_la_OBJECTS = $(am_libextension_test_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +libextension_test_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libextension_test_la_LDFLAGS) \ + $(LDFLAGS) -o $@ DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -136,11 +123,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libextension_test_la_SOURCES) DIST_SOURCES = $(libextension_test_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -152,6 +134,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -178,6 +161,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -190,6 +174,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -283,7 +268,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ extensionsdir = $(pkglibdir)/extensions -pluginsdir = $(pkglibdir)/plugins +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins extensions_LTLIBRARIES = libextension-test.la libextension_test_la_CPPFLAGS = \ -I$(top_builddir) \ @@ -305,6 +291,7 @@ libextension_test_la_SOURCES = \ test-storage-manager.h \ test-storage-manager.c +libextension_test_la_LDFLAGS = -avoid-version all: all-am .SUFFIXES: @@ -342,6 +329,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-extensionsLTLIBRARIES: $(extensions_LTLIBRARIES) @$(NORMAL_INSTALL) + test -z "$(extensionsdir)" || $(MKDIR_P) "$(DESTDIR)$(extensionsdir)" @list='$(extensions_LTLIBRARIES)'; test -n "$(extensionsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -349,8 +337,6 @@ install-extensionsLTLIBRARIES: $(extensions_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(extensionsdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(extensionsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(extensionsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(extensionsdir)"; \ } @@ -373,7 +359,7 @@ clean-extensionsLTLIBRARIES: rm -f "$${dir}/so_locations"; \ done libextension-test.la: $(libextension_test_la_OBJECTS) $(libextension_test_la_DEPENDENCIES) $(EXTRA_libextension_test_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(extensionsdir) $(libextension_test_la_OBJECTS) $(libextension_test_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libextension_test_la_LINK) -rpath $(extensionsdir) $(libextension_test_la_OBJECTS) $(libextension_test_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/extensions/tizen/Makefile.am b/src/extensions/tizen/Makefile.am index b7301bf..2473b0a 100644 --- a/src/extensions/tizen/Makefile.am +++ b/src/extensions/tizen/Makefile.am @@ -24,3 +24,4 @@ libextension_tizen_la_SOURCES = \ tizen-storage-manager.h \ tizen-storage-manager.c +libextension_tizen_la_LDFLAGS = -avoid-version diff --git a/src/extensions/tizen/Makefile.in b/src/extensions/tizen/Makefile.in index 147fd88..9750f9f 100644 --- a/src/extensions/tizen/Makefile.in +++ b/src/extensions/tizen/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -109,6 +92,10 @@ libextension_tizen_la_OBJECTS = $(am_libextension_tizen_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +libextension_tizen_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libextension_tizen_la_LDFLAGS) \ + $(LDFLAGS) -o $@ DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -137,11 +124,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libextension_tizen_la_SOURCES) DIST_SOURCES = $(libextension_tizen_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -153,6 +135,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -179,6 +162,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -191,6 +175,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -284,7 +269,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ extensionsdir = $(pkglibdir)/extensions -pluginsdir = $(pkglibdir)/plugins +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins extensions_LTLIBRARIES = libextension-tizen.la libextension_tizen_la_CPPFLAGS = \ -I$(top_builddir) \ @@ -309,6 +295,7 @@ libextension_tizen_la_SOURCES = \ tizen-storage-manager.h \ tizen-storage-manager.c +libextension_tizen_la_LDFLAGS = -avoid-version all: all-am .SUFFIXES: @@ -346,6 +333,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-extensionsLTLIBRARIES: $(extensions_LTLIBRARIES) @$(NORMAL_INSTALL) + test -z "$(extensionsdir)" || $(MKDIR_P) "$(DESTDIR)$(extensionsdir)" @list='$(extensions_LTLIBRARIES)'; test -n "$(extensionsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -353,8 +341,6 @@ install-extensionsLTLIBRARIES: $(extensions_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(extensionsdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(extensionsdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(extensionsdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(extensionsdir)"; \ } @@ -377,7 +363,7 @@ clean-extensionsLTLIBRARIES: rm -f "$${dir}/so_locations"; \ done libextension-tizen.la: $(libextension_tizen_la_OBJECTS) $(libextension_tizen_la_DEPENDENCIES) $(EXTRA_libextension_tizen_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(extensionsdir) $(libextension_tizen_la_OBJECTS) $(libextension_tizen_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libextension_tizen_la_LINK) -rpath $(extensionsdir) $(libextension_tizen_la_OBJECTS) $(libextension_tizen_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/extensions/tizen/tizen-access-control-manager.c b/src/extensions/tizen/tizen-access-control-manager.c index b439643..355f09f 100644 --- a/src/extensions/tizen/tizen-access-control-manager.c +++ b/src/extensions/tizen/tizen-access-control-manager.c @@ -202,7 +202,19 @@ GSignondSecurityContext * extension_tizen_access_control_manager_security_context_of_keychain ( GSignondAccessControlManager *self) { - (void) self; + g_return_val_if_fail (self != NULL, NULL); + + const gchar *keychain_sysctx; + + keychain_sysctx = gsignond_config_get_string ( + self->config, + GSIGNOND_CONFIG_GENERAL_KEYCHAIN_SYSCTX); + if (!keychain_sysctx) +# ifdef KEYCHAIN_SYSCTX + keychain_sysctx = KEYCHAIN_SYSCTX; +# else + keychain_sysctx = keychainAppId; +# endif - return gsignond_security_context_new_from_values (keychainAppId, NULL); + return gsignond_security_context_new_from_values (keychain_sysctx, NULL); } diff --git a/src/extensions/tizen/tizen-storage-manager.c b/src/extensions/tizen/tizen-storage-manager.c index d098e9e..a142cb8 100644 --- a/src/extensions/tizen/tizen-storage-manager.c +++ b/src/extensions/tizen/tizen-storage-manager.c @@ -33,6 +33,8 @@ #include #include +#include "config.h" + #include "tizen-storage-manager.h" #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-utils.h" @@ -79,16 +81,16 @@ _set_config (ExtensionTizenStorageManager *self, GSignondConfig *config) gchar *user_dir = g_strdup_printf ("gsignond.%s", g_get_user_name ()); const gchar *storage_path = gsignond_config_get_string ( - config, + parent->config, GSIGNOND_CONFIG_GENERAL_STORAGE_PATH); - if (storage_path) - parent->location = g_build_filename (storage_path, - user_dir, - NULL); - else - parent->location = g_build_filename ("/var/db", - user_dir, - NULL); + if (!storage_path) + storage_path = BASE_STORAGE_DIR; +# ifdef ENABLE_DEBUG + const gchar *env_val = g_getenv("SSO_STORAGE_PATH"); + if (env_val) + storage_path = env_val; +# endif + parent->location = g_build_filename (storage_path, user_dir, NULL); g_free (user_dir); self->priv->cdir = g_strdup_printf ("%s.efs", parent->location); DBG ("location %s encryption point %s", parent->location, self->priv->cdir); diff --git a/src/daemon/plugins/plugind/Makefile.am b/src/gplugind/Makefile.am similarity index 72% rename from src/daemon/plugins/plugind/Makefile.am rename to src/gplugind/Makefile.am index 0ee89ff..d2d99bf 100644 --- a/src/daemon/plugins/plugind/Makefile.am +++ b/src/gplugind/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/common.mk + SUBDIRS= NULL= @@ -8,6 +10,7 @@ libgsignond_plugind_daemon_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ -I$(top_builddir)/src \ + -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \ $(GSIGNOND_CFLAGS) libgsignond_plugind_daemon_la_LIBADD = \ @@ -16,10 +19,12 @@ libgsignond_plugind_daemon_la_LIBADD = \ $(GSIGNOND_LIBS) libgsignond_plugind_daemon_la_SOURCES = \ + gsignond-plugin-loader.h \ + gsignond-plugin-loader.c \ gsignond-plugin-daemon.h \ gsignond-plugin-daemon.c -bin_PROGRAMS = gsignond-plugind +pluginloaders_PROGRAMS = gsignond-plugind gsignond_plugind_SOURCES = \ main.c \ @@ -29,6 +34,7 @@ gsignond_plugind_CFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/include/ \ -I$(top_srcdir)/src/ \ + -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \ $(GSIGNOND_CFLAGS) \ $(NULL) @@ -41,4 +47,4 @@ all-local: slink slink: $(MKDIR_P) $(abs_top_builddir)/src/daemon/.libs - ln -sf $(abs_top_builddir)/src/daemon/plugins/plugind/.libs/gsignond-plugind $(abs_top_builddir)/src/daemon/.libs/gsignond-plugind + ln -sf $(abs_top_builddir)/src/gplugind/.libs/gsignond-plugind $(abs_top_builddir)/src/daemon/.libs/gsignond-plugind diff --git a/src/daemon/plugins/plugind/Makefile.in b/src/gplugind/Makefile.in similarity index 85% rename from src/daemon/plugins/plugind/Makefile.in rename to src/gplugind/Makefile.in index 97fb425..371960a 100644 --- a/src/daemon/plugins/plugind/Makefile.in +++ b/src/gplugind/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,23 +17,6 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -52,9 +35,10 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = gsignond-plugind$(EXEEXT) -subdir = src/daemon/plugins/plugind -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/common.mk +pluginloaders_PROGRAMS = gsignond-plugind$(EXEEXT) +subdir = src/gplugind ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -74,14 +58,15 @@ libgsignond_plugind_daemon_la_DEPENDENCIES = \ $(top_builddir)/src/daemon/dbus/libgsignond-dbus-glue.la \ $(am__DEPENDENCIES_1) am_libgsignond_plugind_daemon_la_OBJECTS = \ + libgsignond_plugind_daemon_la-gsignond-plugin-loader.lo \ libgsignond_plugind_daemon_la-gsignond-plugin-daemon.lo libgsignond_plugind_daemon_la_OBJECTS = \ $(am_libgsignond_plugind_daemon_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) +am__installdirs = "$(DESTDIR)$(pluginloadersdir)" +PROGRAMS = $(pluginloaders_PROGRAMS) am__objects_1 = am_gsignond_plugind_OBJECTS = gsignond_plugind-main.$(OBJEXT) \ $(am__objects_1) @@ -129,11 +114,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -176,6 +156,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -202,6 +183,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -214,6 +196,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -306,6 +289,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +extensionsdir = $(pkglibdir)/extensions +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins SUBDIRS = NULL = noinst_LTLIBRARIES = libgsignond-plugind-daemon.la @@ -314,6 +300,7 @@ libgsignond_plugind_daemon_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ -I$(top_builddir)/src \ + -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \ $(GSIGNOND_CFLAGS) libgsignond_plugind_daemon_la_LIBADD = \ @@ -322,6 +309,8 @@ libgsignond_plugind_daemon_la_LIBADD = \ $(GSIGNOND_LIBS) libgsignond_plugind_daemon_la_SOURCES = \ + gsignond-plugin-loader.h \ + gsignond-plugin-loader.c \ gsignond-plugin-daemon.h \ gsignond-plugin-daemon.c @@ -333,6 +322,7 @@ gsignond_plugind_CFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir)/include/ \ -I$(top_srcdir)/src/ \ + -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \ $(GSIGNOND_CFLAGS) \ $(NULL) @@ -345,7 +335,7 @@ all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -354,9 +344,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/daemon/plugins/plugind/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gplugind/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/daemon/plugins/plugind/Makefile + $(AUTOMAKE) --gnu src/gplugind/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -366,6 +356,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/common.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -386,13 +377,10 @@ clean-noinstLTLIBRARIES: done libgsignond-plugind-daemon.la: $(libgsignond_plugind_daemon_la_OBJECTS) $(libgsignond_plugind_daemon_la_DEPENDENCIES) $(EXTRA_libgsignond_plugind_daemon_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libgsignond_plugind_daemon_la_OBJECTS) $(libgsignond_plugind_daemon_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) +install-pluginloadersPROGRAMS: $(pluginloaders_PROGRAMS) @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ + test -z "$(pluginloadersdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginloadersdir)" + @list='$(pluginloaders_PROGRAMS)'; test -n "$(pluginloadersdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -409,23 +397,23 @@ install-binPROGRAMS: $(bin_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pluginloadersdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pluginloadersdir)$$dir" || exit $$?; \ } \ ; done -uninstall-binPROGRAMS: +uninstall-pluginloadersPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + @list='$(pluginloaders_PROGRAMS)'; test -n "$(pluginloadersdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(pluginloadersdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pluginloadersdir)" && rm -f $$files -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-pluginloadersPROGRAMS: + @list='$(pluginloaders_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -444,6 +432,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsignond_plugind-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_plugind_daemon_la-gsignond-plugin-daemon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgsignond_plugind_daemon_la-gsignond-plugin-loader.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -469,6 +458,13 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +libgsignond_plugind_daemon_la-gsignond-plugin-loader.lo: gsignond-plugin-loader.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_plugind_daemon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_plugind_daemon_la-gsignond-plugin-loader.lo -MD -MP -MF $(DEPDIR)/libgsignond_plugind_daemon_la-gsignond-plugin-loader.Tpo -c -o libgsignond_plugind_daemon_la-gsignond-plugin-loader.lo `test -f 'gsignond-plugin-loader.c' || echo '$(srcdir)/'`gsignond-plugin-loader.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_plugind_daemon_la-gsignond-plugin-loader.Tpo $(DEPDIR)/libgsignond_plugind_daemon_la-gsignond-plugin-loader.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gsignond-plugin-loader.c' object='libgsignond_plugind_daemon_la-gsignond-plugin-loader.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_plugind_daemon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgsignond_plugind_daemon_la-gsignond-plugin-loader.lo `test -f 'gsignond-plugin-loader.c' || echo '$(srcdir)/'`gsignond-plugin-loader.c + libgsignond_plugind_daemon_la-gsignond-plugin-daemon.lo: gsignond-plugin-daemon.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsignond_plugind_daemon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgsignond_plugind_daemon_la-gsignond-plugin-daemon.lo -MD -MP -MF $(DEPDIR)/libgsignond_plugind_daemon_la-gsignond-plugin-daemon.Tpo -c -o libgsignond_plugind_daemon_la-gsignond-plugin-daemon.lo `test -f 'gsignond-plugin-daemon.c' || echo '$(srcdir)/'`gsignond-plugin-daemon.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgsignond_plugind_daemon_la-gsignond-plugin-daemon.Tpo $(DEPDIR)/libgsignond_plugind_daemon_la-gsignond-plugin-daemon.Plo @@ -663,10 +659,13 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -691,7 +690,7 @@ check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(pluginloadersdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -726,8 +725,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstLTLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pluginloadersPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -747,13 +746,13 @@ info: info-recursive info-am: -install-data-am: +install-data-am: install-pluginloadersPROGRAMS install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: install-binPROGRAMS +install-exec-am: install-html: install-html-recursive @@ -793,33 +792,34 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS +uninstall-am: uninstall-pluginloadersPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool clean-noinstLTLIBRARIES ctags \ - ctags-recursive distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS + all all-am all-local check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES \ + clean-pluginloadersPROGRAMS ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pluginloadersPROGRAMS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-pluginloadersPROGRAMS all-local: slink slink: $(MKDIR_P) $(abs_top_builddir)/src/daemon/.libs - ln -sf $(abs_top_builddir)/src/daemon/plugins/plugind/.libs/gsignond-plugind $(abs_top_builddir)/src/daemon/.libs/gsignond-plugind + ln -sf $(abs_top_builddir)/src/gplugind/.libs/gsignond-plugind $(abs_top_builddir)/src/daemon/.libs/gsignond-plugind # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/daemon/plugins/plugind/gsignond-plugin-daemon.c b/src/gplugind/gsignond-plugin-daemon.c similarity index 87% rename from src/daemon/plugins/plugind/gsignond-plugin-daemon.c rename to src/gplugind/gsignond-plugin-daemon.c index 11e6fc7..d025d74 100644 --- a/src/daemon/plugins/plugind/gsignond-plugin-daemon.c +++ b/src/gplugind/gsignond-plugin-daemon.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2013 Intel Corporation. + * Copyright (C) 2013-2014 Intel Corporation. * * Contact: Imran Zaman * @@ -26,7 +26,7 @@ #include "gsignond/gsignond-plugin-interface.h" #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-error.h" -#include "common/gsignond-plugin-loader.h" +#include "gsignond-plugin-loader.h" #include "common/gsignond-pipe-stream.h" #include "daemon/dbus/gsignond-dbus-remote-plugin-gen.h" #include "daemon/dbus/gsignond-dbus.h" @@ -35,7 +35,7 @@ struct _GSignondPluginDaemonPrivate { GDBusConnection *connection; - GSignondDbusRemotePlugin *dbus_remote_plugin; + GSignondDbusRemotePluginV1 *dbus_remote_plugin; GSignondPlugin *plugin; gchar *plugin_type; }; @@ -137,7 +137,7 @@ _handle_cancel_from_dbus ( { DBG (""); g_return_val_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self), FALSE); - gsignond_dbus_remote_plugin_complete_cancel (self->priv->dbus_remote_plugin, + gsignond_dbus_remote_plugin_v1_complete_cancel (self->priv->dbus_remote_plugin, invocation); gsignond_plugin_cancel (self->priv->plugin); @@ -154,7 +154,7 @@ _handle_request_from_dbus ( DBG (""); g_return_val_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self), FALSE); - gsignond_dbus_remote_plugin_complete_request ( + gsignond_dbus_remote_plugin_v1_complete_request ( self->priv->dbus_remote_plugin, invocation); GSignondSessionData *data = (GSignondSessionData *) @@ -182,7 +182,7 @@ _handle_request_initial_from_dbus ( DBG (""); g_return_val_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self), FALSE); - gsignond_dbus_remote_plugin_complete_request_initial ( + gsignond_dbus_remote_plugin_v1_complete_request_initial ( self->priv->dbus_remote_plugin, invocation); GSignondSessionData *data = (GSignondSessionData *) @@ -206,7 +206,7 @@ _handle_user_action_finished_from_dbus ( DBG (""); g_return_val_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self), FALSE); - gsignond_dbus_remote_plugin_complete_user_action_finished ( + gsignond_dbus_remote_plugin_v1_complete_user_action_finished ( self->priv->dbus_remote_plugin, invocation); GSignondSignonuiData *data = (GSignondSignonuiData *) @@ -226,7 +226,7 @@ _handle_refresh_from_dbus ( DBG (""); g_return_val_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self), FALSE); - gsignond_dbus_remote_plugin_complete_refresh ( + gsignond_dbus_remote_plugin_v1_complete_refresh ( self->priv->dbus_remote_plugin, invocation); GSignondSignonuiData *data = (GSignondSignonuiData *) @@ -236,27 +236,6 @@ _handle_refresh_from_dbus ( return TRUE; } -static gboolean -_handle_get_info_from_dbus ( - GSignondPluginDaemon *self, - GDBusMethodInvocation *invocation, - gpointer user_data) -{ - DBG (""); - g_return_val_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self), FALSE); - gchar *type = NULL; - gchar **mechanisms = NULL; - - g_object_get (self->priv->plugin, "type", &type, "mechanisms", &mechanisms, - NULL); - gsignond_dbus_remote_plugin_complete_get_info ( - self->priv->dbus_remote_plugin, invocation, (const gchar*)type, - (const gchar *const *)mechanisms); - g_free (type); - g_strfreev (mechanisms); - return TRUE; -} - static void _handle_response_from_plugin ( GSignondPluginDaemon *self, @@ -268,7 +247,7 @@ _handle_response_from_plugin ( GVariant *data = gsignond_dictionary_to_variant ( (GSignondDictionary *)session_data); - gsignond_dbus_remote_plugin_emit_response (self->priv->dbus_remote_plugin, + gsignond_dbus_remote_plugin_v1_emit_response (self->priv->dbus_remote_plugin, data); } @@ -283,7 +262,7 @@ _handle_response_final_from_plugin ( GVariant *data = gsignond_dictionary_to_variant ( (GSignondDictionary *)session_data); - gsignond_dbus_remote_plugin_emit_response_final ( + gsignond_dbus_remote_plugin_v1_emit_response_final ( self->priv->dbus_remote_plugin, data); } @@ -298,7 +277,7 @@ _handle_store_from_plugin ( GVariant *data = gsignond_dictionary_to_variant ( (GSignondDictionary *)session_data); - gsignond_dbus_remote_plugin_emit_store (self->priv->dbus_remote_plugin, + gsignond_dbus_remote_plugin_v1_emit_store (self->priv->dbus_remote_plugin, data); } @@ -312,7 +291,7 @@ _handle_error_from_plugin ( g_return_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self)); GVariant *error = gsignond_error_to_variant (gerror); - gsignond_dbus_remote_plugin_emit_error (self->priv->dbus_remote_plugin, + gsignond_dbus_remote_plugin_v1_emit_error (self->priv->dbus_remote_plugin, error); } @@ -326,7 +305,7 @@ _handle_user_action_required_from_plugin ( g_return_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self)); GVariant *data = gsignond_dictionary_to_variant (ui_data); - gsignond_dbus_remote_plugin_emit_user_action_required ( + gsignond_dbus_remote_plugin_v1_emit_user_action_required ( self->priv->dbus_remote_plugin, data); } @@ -340,7 +319,7 @@ _handle_refreshed_from_plugin( g_return_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self)); GVariant *data = gsignond_dictionary_to_variant (ui_data); - gsignond_dbus_remote_plugin_emit_refreshed (self->priv->dbus_remote_plugin, + gsignond_dbus_remote_plugin_v1_emit_refreshed (self->priv->dbus_remote_plugin, data); } @@ -354,7 +333,7 @@ _handle_status_changed_from_plugin ( DBG (""); g_return_if_fail (self && GSIGNOND_IS_PLUGIN_DAEMON (self)); - gsignond_dbus_remote_plugin_emit_status_changed ( + gsignond_dbus_remote_plugin_v1_emit_status_changed ( self->priv->dbus_remote_plugin, (gint)status, (const gchar *)message); } @@ -375,8 +354,8 @@ gsignond_plugin_daemon_new ( GSIGNOND_TYPE_PLUGIN_DAEMON, NULL)); /* Load plugin */ - daemon->priv->plugin = gsignond_load_plugin_with_filename ( - (gchar *)plugin_type, (gchar *)filename); + daemon->priv->plugin = gsignond_load_plugin_with_filename (plugin_type, + filename); if (!daemon->priv->plugin) { DBG ("failed to load plugin"); g_object_unref (daemon); @@ -394,19 +373,7 @@ gsignond_plugin_daemon_new ( /* Create dbus object */ daemon->priv->dbus_remote_plugin = - gsignond_dbus_remote_plugin_skeleton_new (); - - g_dbus_interface_skeleton_export ( - G_DBUS_INTERFACE_SKELETON(daemon->priv->dbus_remote_plugin), - daemon->priv->connection, GSIGNOND_PLUGIN_OBJECTPATH, &error); - if (error) { - DBG ("failed to register object: %s", error->message); - g_error_free (error); - g_object_unref (daemon); - return NULL; - } - DBG("Started plugin daemon '%p' at path '%s' on conneciton '%p'", - daemon, GSIGNOND_PLUGIN_OBJECTPATH, daemon->priv->connection); + gsignond_dbus_remote_plugin_v1_skeleton_new (); /* Connect dbus remote plugin signals to handlers */ g_signal_connect_swapped (daemon->priv->dbus_remote_plugin, @@ -421,8 +388,6 @@ gsignond_plugin_daemon_new ( G_CALLBACK(_handle_user_action_finished_from_dbus), daemon); g_signal_connect_swapped (daemon->priv->dbus_remote_plugin, "handle-refresh", G_CALLBACK(_handle_refresh_from_dbus), daemon); - g_signal_connect_swapped (daemon->priv->dbus_remote_plugin, - "handle-get-info", G_CALLBACK(_handle_get_info_from_dbus), daemon); /* Connect plugin signals to handlers */ g_signal_connect_swapped (daemon->priv->plugin, "response", @@ -443,6 +408,29 @@ gsignond_plugin_daemon_new ( g_signal_connect (daemon->priv->connection, "closed", G_CALLBACK(_on_connection_closed), daemon); + /* Set DBus properties */ + gchar* type; + gchar** mechanisms; + + g_object_get(daemon->priv->plugin, "type", &type, "mechanisms", &mechanisms, NULL); + gsignond_dbus_remote_plugin_v1_set_method(daemon->priv->dbus_remote_plugin, type); + gsignond_dbus_remote_plugin_v1_set_mechanisms(daemon->priv->dbus_remote_plugin, (const gchar* const*) mechanisms); + + g_free(type); + g_strfreev(mechanisms); + + g_dbus_interface_skeleton_export ( + G_DBUS_INTERFACE_SKELETON(daemon->priv->dbus_remote_plugin), + daemon->priv->connection, GSIGNOND_PLUGIN_OBJECTPATH, &error); + if (error) { + DBG ("failed to register object: %s", error->message); + g_error_free (error); + g_object_unref (daemon); + return NULL; + } + DBG("Started plugin daemon '%p' at path '%s' on conneciton '%p'", + daemon, GSIGNOND_PLUGIN_OBJECTPATH, daemon->priv->connection); + g_dbus_connection_start_message_processing (daemon->priv->connection); return daemon; diff --git a/src/daemon/plugins/plugind/gsignond-plugin-daemon.h b/src/gplugind/gsignond-plugin-daemon.h similarity index 100% rename from src/daemon/plugins/plugind/gsignond-plugin-daemon.h rename to src/gplugind/gsignond-plugin-daemon.h diff --git a/src/common/gsignond-plugin-loader.c b/src/gplugind/gsignond-plugin-loader.c similarity index 76% rename from src/common/gsignond-plugin-loader.c rename to src/gplugind/gsignond-plugin-loader.c index 99dd5bd..17425f0 100644 --- a/src/common/gsignond-plugin-loader.c +++ b/src/gplugind/gsignond-plugin-loader.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2012 Intel Corporation. + * Copyright (C) 2012-2014 Intel Corporation. * * Contact: Alexander Kanavin * @@ -26,27 +26,36 @@ #include +#include "config.h" + #include "gsignond/gsignond-log.h" #include "gsignond-plugin-loader.h" -GSignondPlugin* -gsignond_load_plugin( +GSignondPlugin * +gsignond_load_plugin ( GSignondConfig* config, - gchar* plugin_type) + const gchar *plugin_type) { - gchar* plugin_filename = g_module_build_path ( - gsignond_config_get_string (config, - GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR), plugin_type); - GSignondPlugin *plugin = gsignond_load_plugin_with_filename (plugin_type, - plugin_filename); + const gchar *plugin_path = GSIGNOND_GPLUGINS_DIR; + gchar *plugin_filename; + GSignondPlugin *plugin; + +# ifdef ENABLE_DEBUG + const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR"); + if (env_val) + plugin_path = env_val; +# endif + plugin_filename = g_module_build_path (plugin_path, plugin_type); + plugin = gsignond_load_plugin_with_filename (plugin_type, + plugin_filename); g_free(plugin_filename); return plugin; } -GSignondPlugin* +GSignondPlugin * gsignond_load_plugin_with_filename( - gchar *plugin_type, - gchar *plugin_filename) + const gchar *plugin_type, + const gchar *plugin_filename) { DBG("Loading plugin %s", plugin_filename); GModule* plugin_module = g_module_open (plugin_filename, diff --git a/src/common/gsignond-plugin-loader.h b/src/gplugind/gsignond-plugin-loader.h similarity index 82% rename from src/common/gsignond-plugin-loader.h rename to src/gplugind/gsignond-plugin-loader.h index 0c1e727..ae8cec1 100644 --- a/src/common/gsignond-plugin-loader.h +++ b/src/gplugind/gsignond-plugin-loader.h @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2012 Intel Corporation. + * Copyright (C) 2012-2014 Intel Corporation. * * Contact: Alexander Kanavin * @@ -31,15 +31,15 @@ G_BEGIN_DECLS -GSignondPlugin* -gsignond_load_plugin( +GSignondPlugin * +gsignond_load_plugin ( GSignondConfig* config, - gchar* plugin_type); + const gchar *plugin_type); -GSignondPlugin* -gsignond_load_plugin_with_filename( - gchar *plugin_type, - gchar *plugin_filename); +GSignondPlugin * +gsignond_load_plugin_with_filename ( + const gchar *plugin_type, + const gchar *plugin_filename); G_END_DECLS diff --git a/src/daemon/plugins/plugind/main.c b/src/gplugind/main.c similarity index 66% rename from src/daemon/plugins/plugind/main.c rename to src/gplugind/main.c index 2c0bfd7..aef71c3 100644 --- a/src/daemon/plugins/plugind/main.c +++ b/src/gplugind/main.c @@ -3,7 +3,7 @@ /* * This file is part of gsignond * - * Copyright (C) 2013 Intel Corporation. + * Copyright (C) 2013-2014 Intel Corporation. * * Contact: Imran Zaman * @@ -91,20 +91,73 @@ _install_sighandlers (GMainLoop *main_loop) WARN ("failed to set parent death signal"); } +static void _list_plugins() +{ + const gchar *plugin_path = GSIGNOND_GPLUGINS_DIR; + +# ifdef ENABLE_DEBUG + const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR"); + if (env_val) + plugin_path = env_val; +# endif + GDir* plugin_dir = g_dir_open(plugin_path, 0, NULL); + if (plugin_dir == NULL) { + return; + } + + while (1) { + const gchar* plugin_soname = g_dir_read_name(plugin_dir); + if (plugin_soname == NULL) + break; + if (g_str_has_prefix(plugin_soname, "lib") && + g_str_has_suffix(plugin_soname, ".so")) { + gchar* plugin_name = g_strndup(plugin_soname+3, + strlen(plugin_soname) - 6); + g_print("%s\n", plugin_name); + g_free(plugin_name); + } + } + g_dir_close(plugin_dir); +} + int main (int argc, char **argv) { GError *error = NULL; GMainLoop *main_loop = NULL; GOptionContext *opt_context = NULL; - gchar **plugin_args = NULL; - gint up_signal = -1; gint in_fd = 0, out_fd = 1; - GOptionEntry opt_entries[] = { - {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &plugin_args, - "Plugin Args", NULL}, - {NULL} + + gboolean list_plugins = FALSE; + gchar* plugin_name = NULL; + GOptionEntry main_entries[] = + { + { "list-plugins", 0, 0, G_OPTION_ARG_NONE, &list_plugins, "List available plugins", NULL}, + { "load-plugin", 0, 0, G_OPTION_ARG_STRING, &plugin_name, "Load a plugin and start a d-bus connection with it on stdio channel", "name"}, + { NULL } }; + opt_context = g_option_context_new ("gSSO glib plugin loader"); + g_option_context_add_main_entries (opt_context, main_entries, NULL); + + if (!g_option_context_parse (opt_context, &argc, &argv, &error)) { + WARN ("option parsing failed: %s\n", error->message); + g_error_free(error); + g_option_context_free(opt_context); + return -1; + } + g_option_context_free(opt_context); + + if (list_plugins) { + _list_plugins(); + return 0; + } + + if (!plugin_name) { + g_print("Use --help to list command line options\n"); + return -1; + } + + /* Duplicates stdin,stdout,stderr descriptors and point the descriptors * to /dev/null to avoid anyone writing to descriptors before initial * "plugind-is-ready" notification is sent to gsignond @@ -131,34 +184,19 @@ int main (int argc, char **argv) g_type_init (); #endif - opt_context = g_option_context_new (" "); - g_option_context_set_summary (opt_context, "gSSO helper plugin daemon"); - g_option_context_add_main_entries (opt_context, opt_entries, NULL); - g_option_context_set_ignore_unknown_options (opt_context, TRUE); - g_option_context_parse (opt_context, &argc, &argv, &error); - g_option_context_free (opt_context); - if (error) { - WARN ("Error in arguments parsing: %s", error->message); - g_error_free (error); - } - if (!plugin_args || !plugin_args[0] || !plugin_args[1]) { - WARN ("plugin path or plugin type missing"); - if (write (out_fd, "0", sizeof(char)) == -1) - WARN ("Unable to write down notification to stdout"); - if (in_fd != 0) close (in_fd); - if (out_fd != 1) close (out_fd); - if (plugin_args) g_strfreev(plugin_args); - return -1; - } + const gchar *plugin_path = GSIGNOND_GPLUGINS_DIR; +# ifdef ENABLE_DEBUG + const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR"); + if (env_val) + plugin_path = env_val; +# endif + gchar* filename = g_module_build_path (plugin_path, plugin_name); - _daemon = gsignond_plugin_daemon_new (plugin_args[0], plugin_args[1], in_fd, + _daemon = gsignond_plugin_daemon_new (filename, plugin_name, in_fd, out_fd); - g_strfreev(plugin_args); + g_free(filename); + g_free(plugin_name); if (_daemon == NULL) { - if (write (out_fd, "0", sizeof(char)) == -1) - WARN ("Unable to write down notification to stdout"); - if (in_fd != 0) close (in_fd); - if (out_fd != 1) close (out_fd); return -1; } @@ -166,15 +204,6 @@ int main (int argc, char **argv) g_object_weak_ref (G_OBJECT (_daemon), _on_daemon_closed, main_loop); _install_sighandlers (main_loop); - /* Notification for gsignond that plugind is up and ready */ - up_signal = write (out_fd, "1", sizeof(char)); - - if (up_signal == -1) { - g_main_loop_unref (main_loop); - g_object_unref (_daemon); - return -1; - } - DBG ("Entering main event loop"); g_main_loop_run (main_loop); diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 375f050..20be189 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,23 +15,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -79,11 +62,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -126,6 +104,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -152,6 +131,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -164,6 +144,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -464,10 +445,13 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/src/plugins/digest/Makefile.am b/src/plugins/digest/Makefile.am index 2274ae4..2c26c9c 100644 --- a/src/plugins/digest/Makefile.am +++ b/src/plugins/digest/Makefile.am @@ -1,5 +1,5 @@ include $(top_srcdir)/common.mk -plugins_LTLIBRARIES = libdigest.la +gplugins_LTLIBRARIES = libdigest.la NULL= libdigest_la_CPPFLAGS = \ @@ -19,6 +19,8 @@ libdigest_la_SOURCES = \ gsignond-digest-plugin.c \ $(NULL) +libdigest_la_LDFLAGS = -avoid-version + all-local: slink slink: diff --git a/src/plugins/digest/Makefile.in b/src/plugins/digest/Makefile.in index 65ce0b7..654c70d 100644 --- a/src/plugins/digest/Makefile.in +++ b/src/plugins/digest/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -93,8 +76,8 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(pluginsdir)" -LTLIBRARIES = $(plugins_LTLIBRARIES) +am__installdirs = "$(DESTDIR)$(gpluginsdir)" +LTLIBRARIES = $(gplugins_LTLIBRARIES) am__DEPENDENCIES_1 = libdigest_la_DEPENDENCIES = \ $(top_builddir)/src/common/libgsignond-common.la \ @@ -106,6 +89,9 @@ libdigest_la_OBJECTS = $(am_libdigest_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +libdigest_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libdigest_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -134,11 +120,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libdigest_la_SOURCES) DIST_SOURCES = $(libdigest_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -150,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -176,6 +158,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -188,6 +171,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -281,8 +265,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ extensionsdir = $(pkglibdir)/extensions -pluginsdir = $(pkglibdir)/plugins -plugins_LTLIBRARIES = libdigest.la +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins +gplugins_LTLIBRARIES = libdigest.la NULL = libdigest_la_CPPFLAGS = \ -I$(top_builddir) \ @@ -301,6 +286,7 @@ libdigest_la_SOURCES = \ gsignond-digest-plugin.c \ $(NULL) +libdigest_la_LDFLAGS = -avoid-version all: all-am .SUFFIXES: @@ -336,40 +322,39 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) +install-gpluginsLTLIBRARIES: $(gplugins_LTLIBRARIES) @$(NORMAL_INSTALL) - @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ + test -z "$(gpluginsdir)" || $(MKDIR_P) "$(DESTDIR)$(gpluginsdir)" + @list='$(gplugins_LTLIBRARIES)'; test -n "$(gpluginsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(pluginsdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pluginsdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pluginsdir)"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(gpluginsdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(gpluginsdir)"; \ } -uninstall-pluginsLTLIBRARIES: +uninstall-gpluginsLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ + @list='$(gplugins_LTLIBRARIES)'; test -n "$(gpluginsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginsdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginsdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(gpluginsdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(gpluginsdir)/$$f"; \ done -clean-pluginsLTLIBRARIES: - -test -z "$(plugins_LTLIBRARIES)" || rm -f $(plugins_LTLIBRARIES) - @list='$(plugins_LTLIBRARIES)'; for p in $$list; do \ +clean-gpluginsLTLIBRARIES: + -test -z "$(gplugins_LTLIBRARIES)" || rm -f $(gplugins_LTLIBRARIES) + @list='$(gplugins_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libdigest.la: $(libdigest_la_OBJECTS) $(libdigest_la_DEPENDENCIES) $(EXTRA_libdigest_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(pluginsdir) $(libdigest_la_OBJECTS) $(libdigest_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libdigest_la_LINK) -rpath $(gpluginsdir) $(libdigest_la_OBJECTS) $(libdigest_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -502,7 +487,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) all-local installdirs: - for dir in "$(DESTDIR)$(pluginsdir)"; do \ + for dir in "$(DESTDIR)$(gpluginsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -537,7 +522,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-pluginsLTLIBRARIES \ +clean-am: clean-generic clean-gpluginsLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am @@ -558,7 +543,7 @@ info: info-am info-am: -install-data-am: install-pluginsLTLIBRARIES +install-data-am: install-gpluginsLTLIBRARIES install-dvi: install-dvi-am @@ -604,24 +589,24 @@ ps: ps-am ps-am: -uninstall-am: uninstall-pluginsLTLIBRARIES +uninstall-am: uninstall-gpluginsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-generic clean-libtool clean-pluginsLTLIBRARIES ctags \ + clean-generic clean-gpluginsLTLIBRARIES clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-pluginsLTLIBRARIES install-ps install-ps-am \ + install-exec-am install-gpluginsLTLIBRARIES install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-pluginsLTLIBRARIES + uninstall-gpluginsLTLIBRARIES all-local: slink diff --git a/src/plugins/digest/gsignond-digest-plugin.c b/src/plugins/digest/gsignond-digest-plugin.c index 325f93b..23eef6c 100644 --- a/src/plugins/digest/gsignond-digest-plugin.c +++ b/src/plugins/digest/gsignond-digest-plugin.c @@ -45,8 +45,8 @@ * the following string items, whose meaning is described in the RFC: * - username and secret. If they are absent, they are requested from the user * via gSSO UI. - * - realm, "Algo", "Nonce", "Method", "DigestUri" - mandatory items. - * - "NonceCount", "Qop", "HEntity". "NonceCount" must be present if "Qop" is + * - realm, allowed realms, "Algo", "Nonce", "Method", "DigestUri" - mandatory items. + * - "NonceCount", "Qop", "HEntity". "NonceCount" must be present if "Qop" is * present, "HEntity" must be present if "Qop" is present and set to "auth-int". * * If the plugin has all the data to calculate the digest, it issues @@ -183,16 +183,34 @@ gsignond_digest_plugin_request ( { } +/* difference with g_strcmp0() here is that two NULLs don't compare equal */ +static gint +_compare_realm (gconstpointer a, gconstpointer b, gpointer user_data) +{ + const gchar *realm1 = (const gchar *) a; + const gchar *realm2 = (const gchar *) b; + (void) user_data; + if (realm1 == NULL) + return -1; + if (realm2 == NULL) + return 1; + + return g_strcmp0 (realm1, realm2); +} + static void -_gsignond_digest_plugin_return_digest(GSignondPlugin *plugin, - const gchar *username, - const gchar *secret, - GSignondDictionary *session_data) +_gsignond_digest_plugin_return_digest (GSignondPlugin *plugin, + const gchar *username, + const gchar *secret, + GSignondDictionary *session_data) { g_return_if_fail (plugin != NULL); g_return_if_fail (GSIGNOND_IS_DIGEST_PLUGIN (plugin)); GSignondSessionData *response = NULL; + GSequenceIter *iter; + GSequence* allowed_realms = + gsignond_session_data_get_allowed_realms (session_data); const gchar* realm = gsignond_session_data_get_realm (session_data); const gchar* algo = gsignond_dictionary_get_string (session_data, "Algo"); @@ -208,10 +226,34 @@ _gsignond_digest_plugin_return_digest(GSignondPlugin *plugin, "DigestUri"); const gchar* hentity = gsignond_dictionary_get_string (session_data, "HEntity"); + + if (!allowed_realms) { + GError* error = g_error_new (GSIGNOND_ERROR, + GSIGNOND_ERROR_MISSING_DATA, + "Missing realm list"); + gsignond_plugin_error (plugin, error); + g_error_free (error); + return; + } + iter = g_sequence_lookup (allowed_realms, + (gpointer) realm, + _compare_realm, + NULL); + g_sequence_free (allowed_realms); + if (!iter) { + GError* error = g_error_new (GSIGNOND_ERROR, + GSIGNOND_ERROR_NOT_AUTHORIZED, + "Unauthorized realm"); + gsignond_plugin_error (plugin, error); + g_error_free (error); + return; + } + gchar *cnonce = gsignond_generate_nonce (); if (!cnonce) { GError* error = g_error_new (GSIGNOND_ERROR, - GSIGNOND_ERROR_MISSING_DATA, "Error in generating nonce"); + GSIGNOND_ERROR_MISSING_DATA, + "Error in generating nonce"); gsignond_plugin_error (plugin, error); g_error_free (error); return; @@ -227,7 +269,7 @@ _gsignond_digest_plugin_return_digest(GSignondPlugin *plugin, return; } gchar *digest = _gsignond_digest_plugin_compute_md5_digest(algo, - username,realm, secret, nonce, nonce_count, cnonce, qop, method, + username, realm, secret, nonce, nonce_count, cnonce, qop, method, digest_uri, hentity); response = gsignond_dictionary_new(); diff --git a/src/plugins/password/Makefile.am b/src/plugins/password/Makefile.am index 3cd660a..e9ccb7e 100644 --- a/src/plugins/password/Makefile.am +++ b/src/plugins/password/Makefile.am @@ -1,5 +1,5 @@ include $(top_srcdir)/common.mk -plugins_LTLIBRARIES = libpassword.la +gplugins_LTLIBRARIES = libpassword.la NULL= libpassword_la_CPPFLAGS = \ @@ -19,6 +19,8 @@ libpassword_la_SOURCES = \ gsignond-password-plugin.c \ $(NULL) +libpassword_la_LDFLAGS = -avoid-version + all-local: slink slink: diff --git a/src/plugins/password/Makefile.in b/src/plugins/password/Makefile.in index 74d6c6b..796e435 100644 --- a/src/plugins/password/Makefile.in +++ b/src/plugins/password/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -93,8 +76,8 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(pluginsdir)" -LTLIBRARIES = $(plugins_LTLIBRARIES) +am__installdirs = "$(DESTDIR)$(gpluginsdir)" +LTLIBRARIES = $(gplugins_LTLIBRARIES) am__DEPENDENCIES_1 = libpassword_la_DEPENDENCIES = \ $(top_builddir)/src/common/libgsignond-common.la \ @@ -106,6 +89,10 @@ libpassword_la_OBJECTS = $(am_libpassword_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +libpassword_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libpassword_la_LDFLAGS) $(LDFLAGS) -o \ + $@ DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -134,11 +121,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libpassword_la_SOURCES) DIST_SOURCES = $(libpassword_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -150,6 +132,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -176,6 +159,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -188,6 +172,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -281,8 +266,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ extensionsdir = $(pkglibdir)/extensions -pluginsdir = $(pkglibdir)/plugins -plugins_LTLIBRARIES = libpassword.la +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins +gplugins_LTLIBRARIES = libpassword.la NULL = libpassword_la_CPPFLAGS = \ -I$(top_builddir) \ @@ -301,6 +287,7 @@ libpassword_la_SOURCES = \ gsignond-password-plugin.c \ $(NULL) +libpassword_la_LDFLAGS = -avoid-version all: all-am .SUFFIXES: @@ -336,40 +323,39 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) +install-gpluginsLTLIBRARIES: $(gplugins_LTLIBRARIES) @$(NORMAL_INSTALL) - @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ + test -z "$(gpluginsdir)" || $(MKDIR_P) "$(DESTDIR)$(gpluginsdir)" + @list='$(gplugins_LTLIBRARIES)'; test -n "$(gpluginsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(pluginsdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pluginsdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pluginsdir)"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(gpluginsdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(gpluginsdir)"; \ } -uninstall-pluginsLTLIBRARIES: +uninstall-gpluginsLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ + @list='$(gplugins_LTLIBRARIES)'; test -n "$(gpluginsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginsdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginsdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(gpluginsdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(gpluginsdir)/$$f"; \ done -clean-pluginsLTLIBRARIES: - -test -z "$(plugins_LTLIBRARIES)" || rm -f $(plugins_LTLIBRARIES) - @list='$(plugins_LTLIBRARIES)'; for p in $$list; do \ +clean-gpluginsLTLIBRARIES: + -test -z "$(gplugins_LTLIBRARIES)" || rm -f $(gplugins_LTLIBRARIES) + @list='$(gplugins_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpassword.la: $(libpassword_la_OBJECTS) $(libpassword_la_DEPENDENCIES) $(EXTRA_libpassword_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(pluginsdir) $(libpassword_la_OBJECTS) $(libpassword_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libpassword_la_LINK) -rpath $(gpluginsdir) $(libpassword_la_OBJECTS) $(libpassword_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -502,7 +488,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) all-local installdirs: - for dir in "$(DESTDIR)$(pluginsdir)"; do \ + for dir in "$(DESTDIR)$(gpluginsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -537,7 +523,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-pluginsLTLIBRARIES \ +clean-am: clean-generic clean-gpluginsLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am @@ -558,7 +544,7 @@ info: info-am info-am: -install-data-am: install-pluginsLTLIBRARIES +install-data-am: install-gpluginsLTLIBRARIES install-dvi: install-dvi-am @@ -604,24 +590,24 @@ ps: ps-am ps-am: -uninstall-am: uninstall-pluginsLTLIBRARIES +uninstall-am: uninstall-gpluginsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-generic clean-libtool clean-pluginsLTLIBRARIES ctags \ + clean-generic clean-gpluginsLTLIBRARIES clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-pluginsLTLIBRARIES install-ps install-ps-am \ + install-exec-am install-gpluginsLTLIBRARIES install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-pluginsLTLIBRARIES + uninstall-gpluginsLTLIBRARIES all-local: slink diff --git a/src/plugins/ssotest/Makefile.am b/src/plugins/ssotest/Makefile.am index e84d648..7316237 100644 --- a/src/plugins/ssotest/Makefile.am +++ b/src/plugins/ssotest/Makefile.am @@ -1,5 +1,5 @@ include $(top_srcdir)/common.mk -plugins_LTLIBRARIES = libssotest.la +gplugins_LTLIBRARIES = libssotest.la NULL= libssotest_la_CPPFLAGS = \ @@ -19,6 +19,8 @@ libssotest_la_SOURCES = \ gsignond-ssotest-plugin.c \ $(NULL) +libssotest_la_LDFLAGS = -avoid-version + all-local: slink slink: diff --git a/src/plugins/ssotest/Makefile.in b/src/plugins/ssotest/Makefile.in index 8696001..37d6892 100644 --- a/src/plugins/ssotest/Makefile.in +++ b/src/plugins/ssotest/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,23 +16,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -93,8 +76,8 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(pluginsdir)" -LTLIBRARIES = $(plugins_LTLIBRARIES) +am__installdirs = "$(DESTDIR)$(gpluginsdir)" +LTLIBRARIES = $(gplugins_LTLIBRARIES) am__DEPENDENCIES_1 = libssotest_la_DEPENDENCIES = \ $(top_builddir)/src/common/libgsignond-common.la \ @@ -106,6 +89,9 @@ libssotest_la_OBJECTS = $(am_libssotest_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +libssotest_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libssotest_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -134,11 +120,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libssotest_la_SOURCES) DIST_SOURCES = $(libssotest_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -150,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -176,6 +158,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -188,6 +171,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -281,8 +265,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ extensionsdir = $(pkglibdir)/extensions -pluginsdir = $(pkglibdir)/plugins -plugins_LTLIBRARIES = libssotest.la +pluginloadersdir = $(pkglibdir)/pluginloaders +gpluginsdir = $(pkglibdir)/gplugins +gplugins_LTLIBRARIES = libssotest.la NULL = libssotest_la_CPPFLAGS = \ -I$(top_builddir) \ @@ -301,6 +286,7 @@ libssotest_la_SOURCES = \ gsignond-ssotest-plugin.c \ $(NULL) +libssotest_la_LDFLAGS = -avoid-version all: all-am .SUFFIXES: @@ -336,40 +322,39 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES) +install-gpluginsLTLIBRARIES: $(gplugins_LTLIBRARIES) @$(NORMAL_INSTALL) - @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ + test -z "$(gpluginsdir)" || $(MKDIR_P) "$(DESTDIR)$(gpluginsdir)" + @list='$(gplugins_LTLIBRARIES)'; test -n "$(gpluginsdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(pluginsdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pluginsdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pluginsdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pluginsdir)"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(gpluginsdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(gpluginsdir)"; \ } -uninstall-pluginsLTLIBRARIES: +uninstall-gpluginsLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(plugins_LTLIBRARIES)'; test -n "$(pluginsdir)" || list=; \ + @list='$(gplugins_LTLIBRARIES)'; test -n "$(gpluginsdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginsdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginsdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(gpluginsdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(gpluginsdir)/$$f"; \ done -clean-pluginsLTLIBRARIES: - -test -z "$(plugins_LTLIBRARIES)" || rm -f $(plugins_LTLIBRARIES) - @list='$(plugins_LTLIBRARIES)'; for p in $$list; do \ +clean-gpluginsLTLIBRARIES: + -test -z "$(gplugins_LTLIBRARIES)" || rm -f $(gplugins_LTLIBRARIES) + @list='$(gplugins_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libssotest.la: $(libssotest_la_OBJECTS) $(libssotest_la_DEPENDENCIES) $(EXTRA_libssotest_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(pluginsdir) $(libssotest_la_OBJECTS) $(libssotest_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libssotest_la_LINK) -rpath $(gpluginsdir) $(libssotest_la_OBJECTS) $(libssotest_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -502,7 +487,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) all-local installdirs: - for dir in "$(DESTDIR)$(pluginsdir)"; do \ + for dir in "$(DESTDIR)$(gpluginsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -537,7 +522,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-pluginsLTLIBRARIES \ +clean-am: clean-generic clean-gpluginsLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am @@ -558,7 +543,7 @@ info: info-am info-am: -install-data-am: install-pluginsLTLIBRARIES +install-data-am: install-gpluginsLTLIBRARIES install-dvi: install-dvi-am @@ -604,24 +589,24 @@ ps: ps-am ps-am: -uninstall-am: uninstall-pluginsLTLIBRARIES +uninstall-am: uninstall-gpluginsLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-generic clean-libtool clean-pluginsLTLIBRARIES ctags \ + clean-generic clean-gpluginsLTLIBRARIES clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-pluginsLTLIBRARIES install-ps install-ps-am \ + install-exec-am install-gpluginsLTLIBRARIES install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-pluginsLTLIBRARIES + uninstall-gpluginsLTLIBRARIES all-local: slink diff --git a/test/Makefile.in b/test/Makefile.in index b61d289..0db42bd 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,23 +15,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -79,11 +62,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -126,6 +104,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -152,6 +131,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -164,6 +144,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -470,10 +451,13 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/test/common/Makefile.am b/test/common/Makefile.am index a43367c..71112d4 100644 --- a/test/common/Makefile.am +++ b/test/common/Makefile.am @@ -1,8 +1,8 @@ TESTS = commontest -TESTS_ENVIRONMENT= SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ +TESTS_ENVIRONMENT= SSO_GPLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ SSO_STORAGE_PATH=/tmp/gsignond \ - LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" + LD_LIBRARY_PATH="$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE= @@ -13,10 +13,12 @@ commontest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/include/ \ -I$(top_srcdir)/src/ commontest_LDADD = \ $(top_builddir)/src/common/libgsignond-common.la \ + $(top_builddir)/src/gplugind/libgsignond-plugind-daemon.la \ $(GSIGNOND_LIBS) \ $(CHECK_LIBS) diff --git a/test/common/Makefile.in b/test/common/Makefile.in index 296ce48..b957d84 100644 --- a/test/common/Makefile.in +++ b/test/common/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,23 +15,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -72,6 +55,7 @@ commontest_OBJECTS = $(am_commontest_OBJECTS) am__DEPENDENCIES_1 = commontest_DEPENDENCIES = \ $(top_builddir)/src/common/libgsignond-common.la \ + $(top_builddir)/src/gplugind/libgsignond-plugind-daemon.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -107,11 +91,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(commontest_SOURCES) DIST_SOURCES = $(commontest_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -125,6 +104,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -151,6 +131,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -163,6 +144,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -255,10 +237,10 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -TESTS_ENVIRONMENT = SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ +TESTS_ENVIRONMENT = SSO_GPLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ SSO_STORAGE_PATH=/tmp/gsignond \ - LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" + LD_LIBRARY_PATH="$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE = SUPPRESSIONS = $(top_srcdir)/test/valgrind.supp @@ -267,11 +249,13 @@ commontest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/include/ \ -I$(top_srcdir)/src/ commontest_LDADD = \ $(top_builddir)/src/common/libgsignond-common.la \ + $(top_builddir)/src/gplugind/libgsignond-plugind-daemon.la \ $(GSIGNOND_LIBS) \ $(CHECK_LIBS) diff --git a/test/common/commontest.c b/test/common/commontest.c index 81028f7..efe30bf 100644 --- a/test/common/commontest.c +++ b/test/common/commontest.c @@ -27,12 +27,57 @@ #include #include #include +#include #include #include "gsignond/gsignond-session-data.h" #include "gsignond/gsignond-error.h" #include "gsignond/gsignond-log.h" +#include "gsignond/gsignond-utils.h" +#include "common/gsignond-identity-info.h" #include "common/gsignond-pipe-stream.h" -#include "common/gsignond-plugin-loader.h" +#include "gplugind/gsignond-plugin-loader.h" + +static GSequence* +_sequence_new (gchar *data) +{ + GSequence *value = NULL; + value = g_sequence_new (NULL); + g_sequence_append (value, (guint8 *)data); + return value; +} + +static gboolean +_compare_sequences ( + GSequence *one, + GSequence *two) +{ + GSequenceIter *iter1 = NULL, *iter2 = NULL; + gboolean equal = TRUE; + + if (one == NULL && two == NULL) + return TRUE; + + if ((one != NULL && two == NULL) || + (one == NULL && two != NULL) || + (g_sequence_get_length (one) != g_sequence_get_length (two))) + return FALSE; + + if (one == two) + return TRUE; + + iter1 = g_sequence_get_begin_iter (one); + while (!g_sequence_iter_is_end (iter1)) { + iter2 = g_sequence_get_iter_at_pos (two, + g_sequence_iter_get_position (iter1)); + if (g_strcmp0 (g_sequence_get (iter1), g_sequence_get (iter2)) != 0) { + equal = FALSE; + break; + } + iter1 = g_sequence_iter_next (iter1); + } + + return equal; +} START_TEST (test_pipe_stream) { @@ -128,15 +173,223 @@ START_TEST (test_plugin_loader) } END_TEST +START_TEST (test_identity_info) +{ + guint32 id = 125; + guint32 type = 456; + const gchar *username = "username1"; + const gchar *secret = "secret1"; + const gchar *caption = "caption1"; + GSignondIdentityInfo *identity = NULL; + GSignondIdentityInfo *identity2 = NULL; + GSignondSecurityContextList *ctx_list = NULL, *list = NULL; + GSignondSecurityContext *ctx, *ctx1, *ctx2, *ctx3 ; + GHashTable *methods = NULL, *methods2; + GSequence *seq1 = NULL, *seq_realms, *seq21, *mechs; + GList *list2; + + identity = gsignond_identity_info_new (); + fail_if (identity == NULL); + + fail_unless (gsignond_identity_info_get_id (identity) == 0); + fail_unless (gsignond_identity_info_get_is_identity_new (identity)== TRUE); + fail_unless (gsignond_identity_info_get_username (identity) == NULL); + fail_unless (gsignond_identity_info_get_is_username_secret ( + identity) == FALSE); + fail_unless (gsignond_identity_info_get_secret (identity) == NULL); + fail_unless (gsignond_identity_info_get_store_secret (identity) == FALSE); + fail_unless (gsignond_identity_info_get_caption (identity) == NULL); + fail_unless (gsignond_identity_info_get_realms (identity) == NULL); + fail_unless (gsignond_identity_info_get_methods (identity) == NULL); + fail_unless (gsignond_identity_info_get_mechanisms ( + identity, "testmech") == NULL); + fail_unless (gsignond_identity_info_get_access_control_list ( + identity) == NULL); + fail_unless (gsignond_identity_info_get_owner (identity) == NULL); + fail_unless (gsignond_identity_info_get_validated (identity) == FALSE); + fail_unless (gsignond_identity_info_get_identity_type (identity) == 0); + + fail_unless (gsignond_identity_info_set_id (identity, id) == TRUE); + + fail_unless (id == gsignond_identity_info_get_id (identity)); + + fail_unless (gsignond_identity_info_set_identity_new (identity) == TRUE); + + fail_unless (gsignond_identity_info_get_is_identity_new ( + identity) == TRUE); + + fail_unless (gsignond_identity_info_set_username ( + identity, NULL) == TRUE); + + fail_unless (gsignond_identity_info_get_username (identity) == NULL); + + fail_unless (gsignond_identity_info_set_username ( + identity, username) == TRUE); + + fail_unless (g_strcmp0 (username, gsignond_identity_info_get_username ( + identity)) == 0); + + fail_unless (gsignond_identity_info_set_username_secret ( + identity, TRUE) == TRUE); + + fail_unless (gsignond_identity_info_get_is_username_secret ( + identity) == TRUE); + + fail_unless (gsignond_identity_info_set_secret (identity, NULL) == TRUE); + + fail_unless (gsignond_identity_info_get_secret (identity) == NULL); + + fail_unless (gsignond_identity_info_set_secret (identity, secret) == TRUE); + + fail_unless (g_strcmp0 (secret, gsignond_identity_info_get_secret ( + identity)) == 0); + + fail_unless (gsignond_identity_info_set_store_secret ( + identity, TRUE) == TRUE); + + fail_unless (gsignond_identity_info_get_store_secret ( + identity) == TRUE); + + fail_unless (gsignond_identity_info_set_caption (identity, NULL) == TRUE); + + fail_unless (gsignond_identity_info_get_caption (identity) == NULL); + + fail_unless (gsignond_identity_info_set_caption ( + identity, caption) == TRUE); + + fail_unless (g_strcmp0 (caption, gsignond_identity_info_get_caption ( + identity)) == 0); + + /*realms*/ + seq_realms = _sequence_new("realms1"); + fail_unless (gsignond_identity_info_set_realms ( + identity, seq_realms) == TRUE); + + seq1 = gsignond_identity_info_get_realms (identity); + fail_if (seq1 == NULL); + fail_unless (_compare_sequences (seq1, seq_realms) == TRUE); + g_sequence_free (seq1); seq1 = NULL; + g_sequence_free (seq_realms); + + /*methods*/ + methods = g_hash_table_new_full ((GHashFunc)g_str_hash, + (GEqualFunc)g_str_equal, + (GDestroyNotify)NULL, + (GDestroyNotify)g_sequence_free); + seq1 = _sequence_new("mech11"); g_sequence_append (seq1, "mech12"); + fail_unless (gsignond_identity_info_set_methods ( + identity, methods) == TRUE); + g_hash_table_insert (methods, "method1", seq1); + g_hash_table_insert (methods, "method2", _sequence_new("mech21")); + g_hash_table_insert (methods, "method3", _sequence_new("mech31")); + g_hash_table_insert (methods, "method4", _sequence_new("mech41")); + fail_unless (gsignond_identity_info_set_methods ( + identity, methods) == TRUE); + + methods2 = gsignond_identity_info_get_methods (identity); + fail_if (methods2 == NULL); + seq21 = g_hash_table_lookup (methods, "method1"); + fail_if (seq21 == NULL); + fail_unless (_compare_sequences (seq1, seq21) == TRUE); + g_hash_table_unref (methods2); + g_hash_table_unref (methods); + + fail_unless (gsignond_identity_info_get_mechanisms ( + identity, "method20") == NULL); + + mechs = gsignond_identity_info_get_mechanisms ( + identity, "method1"); + fail_if (mechs == NULL); + g_sequence_free (mechs); + + fail_unless (gsignond_identity_info_remove_method ( + identity, "method20") == FALSE); + fail_unless (gsignond_identity_info_remove_method ( + identity, "method4") == TRUE); + + /*acl*/ + ctx1 = gsignond_security_context_new_from_values ("sysctx1", "appctx1"); + ctx2 = gsignond_security_context_new_from_values ("sysctx2", "appctx2"); + ctx3 = gsignond_security_context_new_from_values ("sysctx3", "appctx3"); + ctx_list = g_list_append (ctx_list,ctx1); + ctx_list = g_list_append (ctx_list,ctx2); + ctx_list = g_list_append (ctx_list,ctx3); + fail_unless (gsignond_identity_info_set_access_control_list ( + identity, ctx_list) == TRUE); + + list = gsignond_identity_info_get_access_control_list (identity); + fail_if (list == NULL); + list2 = g_list_nth (list, 0); + ctx = (GSignondSecurityContext *) list2->data; + fail_unless (gsignond_security_context_compare (ctx, ctx1) == 0); + list2 = g_list_nth (list, 1); + ctx = (GSignondSecurityContext *) list2->data; + fail_unless (gsignond_security_context_compare (ctx, ctx2) == 0); + list2 = g_list_nth (list, 2); + ctx = (GSignondSecurityContext *) list2->data; + fail_unless (gsignond_security_context_compare (ctx, ctx3) == 0); + gsignond_security_context_list_free (list); list = NULL; + + /*owners*/ + fail_unless (gsignond_identity_info_set_owner ( + identity, ctx1) == TRUE); + ctx = gsignond_identity_info_get_owner (identity); + fail_if (ctx == NULL); + fail_unless (gsignond_security_context_compare (ctx, ctx1) == 0); + gsignond_security_context_free (ctx); ctx = NULL; + + fail_unless (gsignond_identity_info_set_validated ( + identity, FALSE) == TRUE); + + fail_unless (gsignond_identity_info_get_validated (identity) == FALSE); + + fail_unless (gsignond_identity_info_set_identity_type ( + identity, type) == TRUE); + + fail_unless (type == gsignond_identity_info_get_identity_type (identity)); + + /*copy*/ + identity2 = gsignond_identity_info_copy (identity); + fail_if (identity2 == NULL); + fail_unless (gsignond_identity_info_compare (identity, identity2) == TRUE); + gsignond_identity_info_unref (identity2); + fail_unless (gsignond_identity_info_compare (identity, identity) == TRUE); + + gsignond_security_context_list_free (ctx_list); ctx_list = NULL; + + gsignond_identity_info_unref (identity); +} +END_TEST + +START_TEST (test_is_host_in_domain) +{ + fail_unless(gsignond_is_host_in_domain("somehost", "") == TRUE); + fail_unless(gsignond_is_host_in_domain("", "somedomain") == FALSE); + fail_unless(gsignond_is_host_in_domain("", "") == TRUE); + fail_unless(gsignond_is_host_in_domain("somehost", "otherdomain") == FALSE); + fail_unless(gsignond_is_host_in_domain("somehost", "somehost") == TRUE); + fail_unless(gsignond_is_host_in_domain("somehost.com", "otherdomain.com") == FALSE); + fail_unless(gsignond_is_host_in_domain("somehost.com", "othersomehost.com") == FALSE); + fail_unless(gsignond_is_host_in_domain("somehost.com", "host.com") == FALSE); + fail_unless(gsignond_is_host_in_domain("somehost.com", "somehost.com") == TRUE); + fail_unless(gsignond_is_host_in_domain("somehost.com", "subhost.somehost.com") == FALSE); + fail_unless(gsignond_is_host_in_domain("somehost.somedomain.com", "otherdomain.com") == FALSE); + fail_unless(gsignond_is_host_in_domain("somehost.somedomain.com", "somehost.otherdomain.com") == FALSE); + fail_unless(gsignond_is_host_in_domain("somehost.somedomain.com", "somedomain.com") == TRUE); +} +END_TEST + Suite* common_suite (void) { Suite *s = suite_create ("Common library"); /* Core test case */ TCase *tc_core = tcase_create ("Tests"); + tcase_add_test (tc_core, test_identity_info); tcase_add_test (tc_core, test_pipe_stream); tcase_add_test (tc_core, test_session_data); tcase_add_test (tc_core, test_plugin_loader); + tcase_add_test (tc_core, test_is_host_in_domain); suite_add_tcase (s, tc_core); return s; } diff --git a/test/daemon/Makefile.am b/test/daemon/Makefile.am index cc7d789..1ca7ae1 100644 --- a/test/daemon/Makefile.am +++ b/test/daemon/Makefile.am @@ -1,8 +1,8 @@ TESTS = daemontest -TESTS_ENVIRONMENT= SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ +TESTS_ENVIRONMENT= SSO_GPLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ - LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" + LD_LIBRARY_PATH="$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE= @@ -17,6 +17,7 @@ daemontest_CFLAGS = \ -U G_LOG_DOMAIN \ -DG_LOG_DOMAIN=\"gsignond-test-server\" \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src/ \ -I$(top_srcdir)/include/ diff --git a/test/daemon/Makefile.in b/test/daemon/Makefile.in index eae6ce5..7a13bff 100644 --- a/test/daemon/Makefile.in +++ b/test/daemon/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,23 +15,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -112,11 +95,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(daemontest_SOURCES) DIST_SOURCES = $(daemontest_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -130,6 +108,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -156,6 +135,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -168,6 +148,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -260,16 +241,17 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -TESTS_ENVIRONMENT = SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ +TESTS_ENVIRONMENT = SSO_GPLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ - LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" + LD_LIBRARY_PATH="$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE = SUPPRESSIONS = $(top_srcdir)/test/valgrind.supp daemontest_SOURCES = daemon-test.c daemontest_CFLAGS = $(GSIGNOND_CFLAGS) $(CHECK_CFLAGS) -U G_LOG_DOMAIN \ -DG_LOG_DOMAIN=\"gsignond-test-server\" -I$(top_builddir) \ - -I$(top_srcdir)/src/ -I$(top_srcdir)/include/ $(am__append_1) + -I$(top_builddir)/src/ -I$(top_srcdir)/src/ \ + -I$(top_srcdir)/include/ $(am__append_1) daemontest_LDADD = \ $(top_builddir)/src/common/libgsignond-common.la \ $(top_builddir)/src/daemon/dbus/libgsignond-dbus-glue.la \ diff --git a/test/daemon/daemon-test.c b/test/daemon/daemon-test.c index 2f4e470..50945ac 100644 --- a/test/daemon/daemon-test.c +++ b/test/daemon/daemon-test.c @@ -92,13 +92,9 @@ setup_daemon (void) gchar* exe_name = _get_executable_name(); fail_if(exe_name == NULL); - fail_if (g_setenv ("G_MESSAGES_DEBUG", "all", TRUE) == FALSE); - fail_if (g_setenv ("SSO_IDENTITY_TIMEOUT", "5", TRUE) == FALSE); - fail_if (g_setenv ("SSO_DAEMON_TIMEOUT", "5", TRUE) == FALSE); - fail_if (g_setenv ("SSO_AUTH_SESSION_TIMEOUT", "5", TRUE) == FALSE); + fail_if (g_setenv ("GSIGNOND_CONFIG", "daemontest.conf", TRUE) == FALSE); fail_if (g_setenv ("SSO_STORAGE_PATH", "/tmp/gsignond", TRUE) == FALSE); fail_if (g_setenv ("SSO_KEYCHAIN_SYSCTX", exe_name, TRUE) == FALSE); - fail_if (g_setenv ("SSO_PLUGIN_TIMEOUT", "5", TRUE) == FALSE); DBG ("Programe pid %d, name : %s\n", getpid(), exe_name); free(exe_name); @@ -215,15 +211,15 @@ gboolean _validate_identity_info (GVariant *identity_info) const gchar *username = 0; if (!identity_info) return FALSE; - identity = (GSignondIdentityInfo *)gsignond_dictionary_new_from_variant (identity_info); + identity = (GSignondIdentityInfo *)gsignond_identity_info_new_from_variant (identity_info); if (!identity) return FALSE; username = gsignond_identity_info_get_username (identity); - gsignond_dictionary_unref (identity); - if (!username || strcmp (username, "test_user")) return FALSE; + gsignond_identity_info_unref (identity); + return TRUE; } @@ -653,7 +649,7 @@ START_TEST(test_query_identities) identity = _get_identity (auth_service, id, "app_context_A", &v_info, &error); fail_if (identity == NULL || v_info == NULL, "Failed to load identity for id '%d' : %s", id, error ? error->message : ""); g_object_unref (identity); - info1 = gsignond_dictionary_new_from_variant (v_info); + info1 = gsignond_identity_info_new_from_variant (v_info); /* created identity2 */ identity = _register_identity (auth_service, "app_context_B", &error); @@ -668,7 +664,7 @@ START_TEST(test_query_identities) identity = _get_identity (auth_service, id, "app_context_B", &v_info, &error); fail_if (identity == NULL || v_info == NULL, "Failed to load identity for id '%d' : %s", id, error ? error->message : ""); g_object_unref (identity); - info2 = gsignond_dictionary_new_from_variant (v_info); + info2 = gsignond_identity_info_new_from_variant (v_info); /* create identity3 */ identity = _register_identity (auth_service, "app_context_A", &error); @@ -683,7 +679,7 @@ START_TEST(test_query_identities) identity = _get_identity (auth_service, id, "app_context_A", &v_info, &error); fail_if (identity == NULL || v_info == NULL, "Failed to load identity for id '%d' : %s", id, error ? error->message : ""); g_object_unref (identity); - info3 = gsignond_dictionary_new_from_variant (v_info); + info3 = gsignond_identity_info_new_from_variant (v_info); /* query identities for app-context: app_context_A */ v_identities = NULL; @@ -699,12 +695,12 @@ START_TEST(test_query_identities) "Expected no of identities '%d', got '%d'", 2, g_variant_n_children(v_identities)); /* validated query results */ - tmp_info = gsignond_dictionary_new_from_variant ( + tmp_info = gsignond_identity_info_new_from_variant ( g_variant_get_child_value (v_identities, 0)); fail_if (gsignond_identity_info_compare (info1, tmp_info) == FALSE); gsignond_identity_info_unref (tmp_info); - tmp_info = gsignond_dictionary_new_from_variant ( + tmp_info = gsignond_identity_info_new_from_variant ( g_variant_get_child_value (v_identities, 1)); fail_if (gsignond_identity_info_compare (info3, tmp_info) == FALSE); gsignond_identity_info_unref (tmp_info); @@ -724,7 +720,7 @@ START_TEST(test_query_identities) fail_if (g_variant_n_children (v_identities) != 1, "Expected no of identities '%d', got '%d'", 1, g_variant_n_children(v_identities)); - tmp_info = gsignond_dictionary_new_from_variant ( + tmp_info = gsignond_identity_info_new_from_variant ( g_variant_get_child_value (v_identities, 0)); fail_if (gsignond_identity_info_compare (info2, tmp_info) == FALSE); gsignond_identity_info_unref (tmp_info); @@ -744,7 +740,7 @@ START_TEST(test_query_identities) fail_if (g_variant_n_children (v_identities) != 1, "Expected no of identities '%d', got '%d'", 1, g_variant_n_children(v_identities)); - tmp_info = gsignond_dictionary_new_from_variant ( + tmp_info = gsignond_identity_info_new_from_variant ( g_variant_get_child_value (v_identities, 0)); fail_if (gsignond_identity_info_compare (info2, tmp_info) == FALSE); diff --git a/test/db/Makefile.am b/test/db/Makefile.am index 5301171..73174bf 100644 --- a/test/db/Makefile.am +++ b/test/db/Makefile.am @@ -11,6 +11,7 @@ dbtest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src/ \ -I$(top_srcdir)/include/ diff --git a/test/db/Makefile.in b/test/db/Makefile.in index 6805be4..c490846 100644 --- a/test/db/Makefile.in +++ b/test/db/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,23 +15,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -108,11 +91,6 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(dbtest_SOURCES) DIST_SOURCES = $(dbtest_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -126,6 +104,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -152,6 +131,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -164,6 +144,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -264,6 +245,7 @@ dbtest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src/ \ -I$(top_srcdir)/include/ diff --git a/test/db/dbtest.c b/test/db/dbtest.c index 72d830a..de45a08 100644 --- a/test/db/dbtest.c +++ b/test/db/dbtest.c @@ -71,39 +71,6 @@ _compare_key_value( user_data->status = 0; } -static gboolean -_compare_sequences ( - GSequence *one, - GSequence *two) -{ - GSequenceIter *iter1 = NULL, *iter2 = NULL; - gboolean equal = TRUE; - - if (one == NULL && two == NULL) - return TRUE; - - if ((one != NULL && two == NULL) || - (one == NULL && two != NULL) || - (g_sequence_get_length (one) != g_sequence_get_length (two))) - return FALSE; - - if (one == two) - return TRUE; - - iter1 = g_sequence_get_begin_iter (one); - while (!g_sequence_iter_is_end (iter1)) { - iter2 = g_sequence_get_iter_at_pos (two, - g_sequence_iter_get_position (iter1)); - if (g_strcmp0 (g_sequence_get (iter1), g_sequence_get (iter2)) != 0) { - equal = FALSE; - break; - } - iter1 = g_sequence_iter_next (iter1); - } - - return equal; -} - static GSignondIdentityInfo * _get_filled_identity_info_2 ( GSignondIdentityInfo **identity_inp, @@ -186,194 +153,6 @@ _get_filled_identity_info (void) TRUE, TRUE, TRUE, TRUE, TRUE); } -START_TEST (test_identity_info) -{ - guint32 id = 125; - guint32 type = 456; - const gchar *username = "username1"; - const gchar *secret = "secret1"; - const gchar *caption = "caption1"; - GSignondIdentityInfo *identity = NULL; - GSignondIdentityInfo *identity2 = NULL; - GSignondSecurityContextList *ctx_list = NULL, *list = NULL; - GSignondSecurityContext *ctx, *ctx1, *ctx2, *ctx3 ; - GHashTable *methods = NULL, *methods2; - GSequence *seq1 = NULL, *seq_realms, *seq21, *mechs; - GList *list2; - - identity = gsignond_identity_info_new (); - fail_if (identity == NULL); - - fail_unless (gsignond_identity_info_get_id (identity) == 0); - fail_unless (gsignond_identity_info_get_is_identity_new (identity)== TRUE); - fail_unless (gsignond_identity_info_get_username (identity) == NULL); - fail_unless (gsignond_identity_info_get_is_username_secret ( - identity) == FALSE); - fail_unless (gsignond_identity_info_get_secret (identity) == NULL); - fail_unless (gsignond_identity_info_get_store_secret (identity) == FALSE); - fail_unless (gsignond_identity_info_get_caption (identity) == NULL); - fail_unless (gsignond_identity_info_get_realms (identity) == NULL); - fail_unless (gsignond_identity_info_get_methods (identity) == NULL); - fail_unless (gsignond_identity_info_get_mechanisms ( - identity, "testmech") == NULL); - fail_unless (gsignond_identity_info_get_access_control_list ( - identity) == NULL); - fail_unless (gsignond_identity_info_get_owner (identity) == NULL); - fail_unless (gsignond_identity_info_get_validated (identity) == FALSE); - fail_unless (gsignond_identity_info_get_identity_type (identity) == -1); - - fail_unless (gsignond_identity_info_set_id (identity, id) == TRUE); - - fail_unless (id == gsignond_identity_info_get_id (identity)); - - fail_unless (gsignond_identity_info_set_identity_new (identity) == TRUE); - - fail_unless (gsignond_identity_info_get_is_identity_new ( - identity) == TRUE); - - fail_unless (gsignond_identity_info_set_username ( - identity, NULL) == FALSE); - - fail_unless (gsignond_identity_info_get_username (identity) == NULL); - - fail_unless (gsignond_identity_info_set_username ( - identity, username) == TRUE); - - fail_unless (g_strcmp0 (username, gsignond_identity_info_get_username ( - identity)) == 0); - - fail_unless (gsignond_identity_info_set_username_secret ( - identity, TRUE) == TRUE); - - fail_unless (gsignond_identity_info_get_is_username_secret ( - identity) == TRUE); - - fail_unless (gsignond_identity_info_set_secret (identity, NULL) == FALSE); - - fail_unless (gsignond_identity_info_get_secret (identity) == NULL); - - fail_unless (gsignond_identity_info_set_secret (identity, secret) == TRUE); - - fail_unless (g_strcmp0 (secret, gsignond_identity_info_get_secret ( - identity)) == 0); - - fail_unless (gsignond_identity_info_set_store_secret ( - identity, TRUE) == TRUE); - - fail_unless (gsignond_identity_info_get_store_secret ( - identity) == TRUE); - - fail_unless (gsignond_identity_info_set_caption (identity, NULL) == FALSE); - - fail_unless (gsignond_identity_info_get_caption (identity) == NULL); - - fail_unless (gsignond_identity_info_set_caption ( - identity, caption) == TRUE); - - fail_unless (g_strcmp0 (caption, gsignond_identity_info_get_caption ( - identity)) == 0); - - /*realms*/ - seq_realms = _sequence_new("realms1"); - fail_unless (gsignond_identity_info_set_realms ( - identity, seq_realms) == TRUE); - - seq1 = gsignond_identity_info_get_realms (identity); - fail_if (seq1 == NULL); - fail_unless (_compare_sequences (seq1, seq_realms) == TRUE); - g_sequence_free (seq1); seq1 = NULL; - g_sequence_free (seq_realms); - - /*methods*/ - methods = g_hash_table_new_full ((GHashFunc)g_str_hash, - (GEqualFunc)g_str_equal, - (GDestroyNotify)NULL, - (GDestroyNotify)g_sequence_free); - seq1 = _sequence_new("mech11"); g_sequence_append (seq1, "mech12"); - fail_unless (gsignond_identity_info_set_methods ( - identity, methods) == TRUE); - g_hash_table_insert (methods, "method1", seq1); - g_hash_table_insert (methods, "method2", _sequence_new("mech21")); - g_hash_table_insert (methods, "method3", _sequence_new("mech31")); - g_hash_table_insert (methods, "method4", _sequence_new("mech41")); - fail_unless (gsignond_identity_info_set_methods ( - identity, methods) == TRUE); - - methods2 = gsignond_identity_info_get_methods (identity); - fail_if (methods2 == NULL); - seq21 = g_hash_table_lookup (methods, "method1"); - fail_if (seq21 == NULL); - fail_unless (_compare_sequences (seq1, seq21) == TRUE); - g_hash_table_unref (methods2); - g_hash_table_unref (methods); - - fail_unless (gsignond_identity_info_get_mechanisms ( - identity, "method20") == NULL); - - mechs = gsignond_identity_info_get_mechanisms ( - identity, "method1"); - fail_if (mechs == NULL); - g_sequence_free (mechs); - - fail_unless (gsignond_identity_info_remove_method ( - identity, "method20") == FALSE); - fail_unless (gsignond_identity_info_remove_method ( - identity, "method4") == TRUE); - - /*acl*/ - ctx1 = gsignond_security_context_new_from_values ("sysctx1", "appctx1"); - ctx2 = gsignond_security_context_new_from_values ("sysctx2", "appctx2"); - ctx3 = gsignond_security_context_new_from_values ("sysctx3", "appctx3"); - ctx_list = g_list_append (ctx_list,ctx1); - ctx_list = g_list_append (ctx_list,ctx2); - ctx_list = g_list_append (ctx_list,ctx3); - fail_unless (gsignond_identity_info_set_access_control_list ( - identity, ctx_list) == TRUE); - - list = gsignond_identity_info_get_access_control_list (identity); - fail_if (list == NULL); - list2 = g_list_nth (list, 0); - ctx = (GSignondSecurityContext *) list2->data; - fail_unless (gsignond_security_context_compare (ctx, ctx1) == 0); - list2 = g_list_nth (list, 1); - ctx = (GSignondSecurityContext *) list2->data; - fail_unless (gsignond_security_context_compare (ctx, ctx2) == 0); - list2 = g_list_nth (list, 2); - ctx = (GSignondSecurityContext *) list2->data; - fail_unless (gsignond_security_context_compare (ctx, ctx3) == 0); - gsignond_security_context_list_free (list); list = NULL; - - /*owners*/ - fail_unless (gsignond_identity_info_set_owner ( - identity, ctx1) == TRUE); - ctx = gsignond_identity_info_get_owner (identity); - fail_if (ctx == NULL); - fail_unless (gsignond_security_context_compare (ctx, ctx1) == 0); - gsignond_security_context_free (ctx); ctx = NULL; - - fail_unless (gsignond_identity_info_set_validated ( - identity, FALSE) == TRUE); - - fail_unless (gsignond_identity_info_get_validated (identity) == FALSE); - - fail_unless (gsignond_identity_info_set_identity_type ( - identity, type) == TRUE); - - fail_unless (type == gsignond_identity_info_get_identity_type (identity)); - - /*copy*/ - identity2 = gsignond_dictionary_copy (identity); - fail_if (identity2 == NULL); - fail_unless (gsignond_identity_info_compare (identity, identity2) == TRUE); - gsignond_identity_info_unref (identity2); - fail_unless (gsignond_identity_info_compare (identity, identity) == TRUE); - - gsignond_security_context_list_free (ctx_list); ctx_list = NULL; - - gsignond_identity_info_unref (identity); -} -END_TEST - static gboolean _gsignond_query_read_int ( sqlite3_stmt *stmt, @@ -1080,7 +859,6 @@ Suite* db_suite (void) Suite *s = suite_create ("Database"); TCase *tc_core = tcase_create ("Tests"); - tcase_add_test (tc_core, test_identity_info); tcase_add_test (tc_core, test_sql_database); tcase_add_test (tc_core, test_secret_storage); diff --git a/test/plugins/Makefile.am b/test/plugins/Makefile.am index 4b77125..12ea54e 100644 --- a/test/plugins/Makefile.am +++ b/test/plugins/Makefile.am @@ -1,9 +1,9 @@ TESTS = digestplugintest passwordplugintest pluginproxytest pluginremotetest -TESTS_ENVIRONMENT= SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ +TESTS_ENVIRONMENT= SSO_GPLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ SSO_STORAGE_PATH=/tmp/gsignond \ - LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" + LD_LIBRARY_PATH="$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE = @@ -15,6 +15,7 @@ digestplugintest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/plugins/digest \ -I$(top_srcdir)/include @@ -30,6 +31,7 @@ passwordplugintest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/plugins/password \ -I$(top_srcdir)/include/ @@ -45,6 +47,7 @@ pluginproxytest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/daemon/plugins \ -I$(top_srcdir)/include @@ -60,14 +63,14 @@ pluginremotetest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/daemon/plugins \ - -I$(top_srcdir)/src/daemon/plugins/plugind \ -I$(top_srcdir)/include pluginremotetest_LDADD = \ $(top_builddir)/src/common/libgsignond-common.la \ $(top_builddir)/src/daemon/plugins/libgsignond-plugins.la \ - $(top_builddir)/src/daemon/plugins/plugind/libgsignond-plugind-daemon.la \ + $(top_builddir)/src/gplugind/libgsignond-plugind-daemon.la \ $(GSIGNOND_LIBS) \ $(CHECK_LIBS) diff --git a/test/plugins/Makefile.in b/test/plugins/Makefile.in index f4bcbd8..dabc7ff 100644 --- a/test/plugins/Makefile.in +++ b/test/plugins/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,23 +15,6 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -112,7 +95,7 @@ pluginremotetest_OBJECTS = $(am_pluginremotetest_OBJECTS) pluginremotetest_DEPENDENCIES = \ $(top_builddir)/src/common/libgsignond-common.la \ $(top_builddir)/src/daemon/plugins/libgsignond-plugins.la \ - $(top_builddir)/src/daemon/plugins/plugind/libgsignond-plugind-daemon.la \ + $(top_builddir)/src/gplugind/libgsignond-plugind-daemon.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) pluginremotetest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ @@ -149,11 +132,6 @@ SOURCES = $(digestplugintest_SOURCES) $(passwordplugintest_SOURCES) \ DIST_SOURCES = $(digestplugintest_SOURCES) \ $(passwordplugintest_SOURCES) $(pluginproxytest_SOURCES) \ $(pluginremotetest_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -167,6 +145,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_STORAGE_DIR = @BASE_STORAGE_DIR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -193,6 +172,7 @@ GREP = @GREP@ GSIGNOND_CFLAGS = @GSIGNOND_CFLAGS@ GSIGNOND_LIBS = @GSIGNOND_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ @@ -205,6 +185,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEYCHAIN_SYSCTX = @KEYCHAIN_SYSCTX@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBECRYPTFS_CFLAGS = @LIBECRYPTFS_CFLAGS@ @@ -297,10 +278,10 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -TESTS_ENVIRONMENT = SSO_PLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ +TESTS_ENVIRONMENT = SSO_GPLUGINS_DIR=$(top_builddir)/src/plugins/.libs \ SSO_BIN_DIR=$(top_builddir)/src/daemon/.libs \ SSO_STORAGE_PATH=/tmp/gsignond \ - LD_LIBRARY_PATH="$(top_builddir)/src/daemon/plugins/plugind/.libs:$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" + LD_LIBRARY_PATH="$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/db/.libs:$(top_builddir)/src/daemon/.libs:$(top_builddir)/src/daemon/db/.libs:$(top_builddir)/src/daemon/dbus/.libs:$(top_builddir)/src/daemon/plugins/.libs" VALGRIND_TESTS_DISABLE = SUPPRESSIONS = $(top_srcdir)/test/valgrind.supp @@ -309,6 +290,7 @@ digestplugintest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/plugins/digest \ -I$(top_srcdir)/include @@ -324,6 +306,7 @@ passwordplugintest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/plugins/password \ -I$(top_srcdir)/include/ @@ -339,6 +322,7 @@ pluginproxytest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/daemon/plugins \ -I$(top_srcdir)/include @@ -354,15 +338,15 @@ pluginremotetest_CFLAGS = \ $(GSIGNOND_CFLAGS) \ $(CHECK_CFLAGS) \ -I$(top_builddir) \ + -I$(top_builddir)/src/ \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/daemon/plugins \ - -I$(top_srcdir)/src/daemon/plugins/plugind \ -I$(top_srcdir)/include pluginremotetest_LDADD = \ $(top_builddir)/src/common/libgsignond-common.la \ $(top_builddir)/src/daemon/plugins/libgsignond-plugins.la \ - $(top_builddir)/src/daemon/plugins/plugind/libgsignond-plugind-daemon.la \ + $(top_builddir)/src/gplugind/libgsignond-plugind-daemon.la \ $(GSIGNOND_LIBS) \ $(CHECK_LIBS) diff --git a/test/plugins/digestplugintest.c b/test/plugins/digestplugintest.c index 4dfe3c6..8743301 100644 --- a/test/plugins/digestplugintest.c +++ b/test/plugins/digestplugintest.c @@ -31,7 +31,9 @@ #include "gsignond/gsignond-error.h" #include "gsignond/gsignond-log.h" #include "gsignond/gsignond-config.h" -#include "common/gsignond-plugin-loader.h" +#include "gsignond/gsignond-utils.h" + +static const gchar *realm_list[] = { "realm1", "realm2", "realm3", NULL }; static void check_plugin(GSignondPlugin* plugin) { @@ -128,6 +130,9 @@ START_TEST (test_digestplugin_request) // set all the required stuff so that no ui-action is required gsignond_session_data_set_realm(data, "realm1"); + GSequence *allowed_realms = gsignond_copy_array_to_sequence(realm_list); + gsignond_session_data_set_allowed_realms(data, allowed_realms); + g_sequence_free(allowed_realms); gsignond_dictionary_set_string(data, "Algo", "md5-sess"); gsignond_dictionary_set_string(data, "Nonce", "abg10b1234ee1f0e8b11d0f600bfb0c093"); @@ -237,6 +242,10 @@ START_TEST (test_digestplugin_user_action_finished) //correct values data = gsignond_dictionary_new (); gsignond_session_data_set_username (data, "user1"); + gsignond_session_data_set_realm(data, "realm1"); + GSequence *allowed_realms = gsignond_copy_array_to_sequence(realm_list); + gsignond_session_data_set_allowed_realms(data, allowed_realms); + g_sequence_free(allowed_realms); gsignond_session_data_set_realm (data, "realm1"); gsignond_dictionary_set_string (data, "Algo", "md5-sess"); gsignond_dictionary_set_string (data, "Nonce", diff --git a/test/plugins/passwordplugintest.c b/test/plugins/passwordplugintest.c index 5c7670a..5459544 100644 --- a/test/plugins/passwordplugintest.c +++ b/test/plugins/passwordplugintest.c @@ -31,7 +31,6 @@ #include "gsignond/gsignond-plugin-interface.h" #include "gsignond/gsignond-error.h" #include "gsignond/gsignond-config.h" -#include "common/gsignond-plugin-loader.h" static void check_plugin(GSignondPlugin* plugin) diff --git a/test/plugins/pluginproxytest.c b/test/plugins/pluginproxytest.c index 811b541..9b2ced2 100644 --- a/test/plugins/pluginproxytest.c +++ b/test/plugins/pluginproxytest.c @@ -33,7 +33,6 @@ #include "gsignond-plugin-remote.h" #include "gsignond/gsignond-error.h" #include "gsignond/gsignond-log.h" -#include "common/gsignond-plugin-loader.h" static GMainLoop *main_loop = NULL; @@ -261,6 +260,16 @@ check_plugin_proxy( } } +static GSignondPluginProxy* _make_plugin_proxy(GSignondConfig* config, const gchar* plugin_type) +{ + gchar* loader_path = g_build_filename (g_getenv("SSO_BIN_DIR"), "gsignond-plugind", NULL); + + GSignondPluginProxy* proxy = gsignond_plugin_proxy_new(loader_path, plugin_type, + gsignond_config_get_integer (config, GSIGNOND_CONFIG_PLUGIN_TIMEOUT)); + g_free(loader_path); + return proxy; +} + START_TEST (test_pluginproxy_create) { DBG("test_pluginproxy_create\n"); @@ -270,11 +279,11 @@ START_TEST (test_pluginproxy_create) GSignondConfig* config = gsignond_config_new(); fail_if(config == NULL); - GSignondPluginProxy* proxy2 = gsignond_plugin_proxy_new(config, + GSignondPluginProxy* proxy2 = _make_plugin_proxy(config, "absentplugin"); fail_if (proxy2 != NULL); - GSignondPluginProxy* proxy = gsignond_plugin_proxy_new(config, "password"); + GSignondPluginProxy* proxy = _make_plugin_proxy(config, "password"); fail_if (proxy == NULL); check_plugin_proxy(proxy, "password", pass_mechs); @@ -290,7 +299,7 @@ START_TEST (test_pluginproxy_process) GSignondConfig* config = gsignond_config_new(); fail_if(config == NULL); - GSignondPluginProxy* proxy = gsignond_plugin_proxy_new(config, "password"); + GSignondPluginProxy* proxy = _make_plugin_proxy(config, "password"); fail_if (proxy == NULL); GSignondSessionData* data = gsignond_dictionary_new(); @@ -324,7 +333,7 @@ START_TEST (test_pluginproxy_process_cancel) GSignondConfig* config = gsignond_config_new(); fail_if(config == NULL); - GSignondPluginProxy* proxy = gsignond_plugin_proxy_new(config, "ssotest"); + GSignondPluginProxy* proxy = _make_plugin_proxy(config, "ssotest"); fail_if (proxy == NULL); GSignondSessionData* data = gsignond_dictionary_new(); @@ -356,7 +365,7 @@ START_TEST (test_pluginproxy_process_queue) GSignondConfig* config = gsignond_config_new(); fail_if(config == NULL); - GSignondPluginProxy* proxy = gsignond_plugin_proxy_new(config, "password"); + GSignondPluginProxy* proxy = _make_plugin_proxy(config, "password"); fail_if (proxy == NULL); GSignondSessionData* data = gsignond_dictionary_new(); @@ -388,7 +397,7 @@ START_TEST (test_pluginproxy_process_queue_cancel) GSignondConfig* config = gsignond_config_new(); fail_if(config == NULL); - GSignondPluginProxy* proxy = gsignond_plugin_proxy_new(config, "ssotest"); + GSignondPluginProxy* proxy = _make_plugin_proxy(config, "ssotest"); fail_if (proxy == NULL); GSignondSessionData* data = gsignond_dictionary_new(); @@ -482,30 +491,6 @@ START_TEST (test_pluginproxyfactory_get) } END_TEST -START_TEST (test_pluginproxyfactory_add) -{ - DBG(""); - GSignondConfig* config = gsignond_config_new(); - fail_if(config == NULL); - - GSignondPluginProxyFactory* factory = gsignond_plugin_proxy_factory_new( - config); - fail_if(factory == NULL); - - GSignondPluginProxy* proxy = gsignond_plugin_proxy_new(config, "password"); - fail_if (proxy == NULL); - fail_if(gsignond_plugin_proxy_factory_add_plugin(factory, proxy) == FALSE); - fail_if(gsignond_plugin_proxy_factory_add_plugin(factory, proxy) == TRUE); - fail_if(gsignond_plugin_proxy_factory_get_plugin(factory, "password") - != proxy); - g_object_unref(proxy); - - g_object_unref(proxy); - g_object_unref(factory); - g_object_unref(config); -} -END_TEST - typedef struct { GSignondPluginProxyFactory *factory; GSignondPluginProxy *proxy; @@ -517,10 +502,15 @@ _validate_new_proxy(gpointer userdata) ProxyTimeoutData *data = (ProxyTimeoutData *)userdata; fail_if (data == NULL); + fail_if(g_hash_table_size(data->factory->plugins) != 0); + GSignondPluginProxy *proxy = gsignond_plugin_proxy_factory_get_plugin (data->factory, "ssotest"); fail_if (proxy == NULL); + fail_if(g_hash_table_size(data->factory->plugins) != 1); - fail_if (proxy == data->proxy, "expected new proxy object, but got cached object"); + // This is unreliable: the proxy object may be allocated to the same location + // as the old object! + //fail_if (proxy == data->proxy, "expected new proxy object, but got cached object"); g_object_unref(proxy); g_free (userdata); @@ -536,8 +526,10 @@ _validate_cached_proxy (gpointer userdata) ProxyTimeoutData *data = (ProxyTimeoutData *)userdata; fail_if (data == NULL); + fail_if(g_hash_table_size(data->factory->plugins) != 1); GSignondPluginProxy *proxy = gsignond_plugin_proxy_factory_get_plugin (data->factory, "ssotest"); fail_if (proxy == NULL); + fail_if(g_hash_table_size(data->factory->plugins) != 1); fail_unless (proxy == data->proxy, "expected cached proxy object, but got new object"); @@ -556,20 +548,21 @@ START_TEST (test_pluginproxyfactory_proxy_timeout) GSignondConfig *config = NULL; /* CASE 1: proxy timeout disabled */ - g_setenv ("SSO_PLUGIN_TIMEOUT", "0", TRUE); - config = gsignond_config_new(); fail_if(config == NULL); + gsignond_config_set_integer (config, GSIGNOND_CONFIG_PLUGIN_TIMEOUT, 0); - factory = gsignond_plugin_proxy_factory_new ( config); + factory = gsignond_plugin_proxy_factory_new (config); fail_if (factory == NULL); proxy1 = gsignond_plugin_proxy_factory_get_plugin (factory, "ssotest"); fail_if (proxy1 == NULL); g_object_unref (proxy1); + fail_if(g_hash_table_size(factory->plugins) != 1); proxy2 = gsignond_plugin_proxy_factory_get_plugin (factory, "ssotest"); fail_if (proxy2 == NULL); + fail_if(g_hash_table_size(factory->plugins) != 1); fail_unless (proxy1 == proxy2, "got new plugin proxy object, " "where expected cached object(%p,%p)", @@ -580,10 +573,9 @@ START_TEST (test_pluginproxyfactory_proxy_timeout) g_object_unref (factory); /* CASE 2: proxy timeout enbled */ - g_setenv ("SSO_PLUGIN_TIMEOUT", "1", TRUE); - config = gsignond_config_new(); fail_if(config == NULL); + gsignond_config_set_integer (config, GSIGNOND_CONFIG_PLUGIN_TIMEOUT, 1); factory = gsignond_plugin_proxy_factory_new (config); fail_if (factory == NULL); @@ -591,7 +583,6 @@ START_TEST (test_pluginproxyfactory_proxy_timeout) proxy1 = gsignond_plugin_proxy_factory_get_plugin (factory, "ssotest"); fail_if (proxy1 == NULL); g_object_unref (proxy1); - ProxyTimeoutData *data = g_new0(ProxyTimeoutData, 1); data->factory = factory; data->proxy = proxy1; @@ -603,9 +594,9 @@ START_TEST (test_pluginproxyfactory_proxy_timeout) g_object_unref(factory); /* CASE 3: proxy timeout enable - request recently closed plugin */ - g_setenv ("SSO_PLUGIN_TIMEOUT", "2", TRUE); config = gsignond_config_new (); fail_if (config == NULL); + gsignond_config_set_integer (config, GSIGNOND_CONFIG_PLUGIN_TIMEOUT, 2); factory = gsignond_plugin_proxy_factory_new(config); fail_if (factory == NULL); @@ -643,7 +634,6 @@ Suite* pluginproxy_suite (void) tcase_add_test (tc_core, test_pluginproxy_process_queue_cancel); tcase_add_test (tc_core, test_pluginproxyfactory_methods_and_mechanisms); tcase_add_test (tc_core, test_pluginproxyfactory_get); - tcase_add_test (tc_core, test_pluginproxyfactory_add); tcase_add_test (tc_core, test_pluginproxyfactory_proxy_timeout); suite_add_tcase (s, tc_core); diff --git a/test/plugins/pluginremotetest.c b/test/plugins/pluginremotetest.c index 18d1475..2cb5a97 100644 --- a/test/plugins/pluginremotetest.c +++ b/test/plugins/pluginremotetest.c @@ -30,7 +30,7 @@ #include "daemon/gsignond-types.h" #include "gsignond-plugin-remote-private.h" #include "gsignond-plugin-remote.h" -#include "plugind/gsignond-plugin-daemon.h" +#include "gplugind/gsignond-plugin-daemon.h" #include #include #include @@ -223,7 +223,9 @@ START_TEST (test_pluginremote_create) GSignondConfig* config = gsignond_config_new (); fail_if (config == NULL); - plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(config, plugin_type)); + gchar* loader_path = g_build_filename (g_getenv("SSO_BIN_DIR"), "gsignond-plugind", NULL); + plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(loader_path, plugin_type)); + g_free(loader_path); g_object_unref (config); check_plugin (plugin); @@ -241,7 +243,9 @@ START_TEST (test_pluginremote_plugind_create) GSignondConfig* config = gsignond_config_new (); fail_if (config == NULL); - plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(config, plugin_type)); + gchar* loader_path = g_build_filename (g_getenv("SSO_BIN_DIR"), "gsignond-plugind", NULL); + plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(loader_path, plugin_type)); + g_free(loader_path); g_object_unref (config); fail_if (plugin == NULL); @@ -267,7 +271,9 @@ START_TEST (test_pluginremote_plugind_unref) GSignondConfig* config = gsignond_config_new (); fail_if (config == NULL); - plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(config, plugin_type)); + gchar* loader_path = g_build_filename (g_getenv("SSO_BIN_DIR"), "gsignond-plugind", NULL); + plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(loader_path, plugin_type)); + g_free(loader_path); fail_if (plugin == NULL); priv = (GSignondPluginRemotePrivate *)GSIGNOND_PLUGIN_REMOTE (plugin)->priv; @@ -293,7 +299,9 @@ START_TEST (test_pluginremote_plugind_kill) GSignondConfig* config = gsignond_config_new (); fail_if (config == NULL); - plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(config, plugin_type)); + gchar* loader_path = g_build_filename (g_getenv("SSO_BIN_DIR"), "gsignond-plugind", NULL); + plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(loader_path, plugin_type)); + g_free(loader_path); fail_if (plugin == NULL); priv = (GSignondPluginRemotePrivate *)GSIGNOND_PLUGIN_REMOTE (plugin)->priv; @@ -322,7 +330,9 @@ START_TEST (test_pluginremote_request) GSignondConfig* config = gsignond_config_new (); fail_if(config == NULL); - plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(config, plugin_type)); + gchar* loader_path = g_build_filename (g_getenv("SSO_BIN_DIR"), "gsignond-plugind", NULL); + plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(loader_path, plugin_type)); + g_free(loader_path); fail_if(plugin == NULL); GSignondSessionData* result = NULL; @@ -418,7 +428,9 @@ START_TEST (test_pluginremote_user_action_finished) GSignondConfig* config = gsignond_config_new (); fail_if(config == NULL); - plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(config, plugin_type)); + gchar* loader_path = g_build_filename (g_getenv("SSO_BIN_DIR"), "gsignond-plugind", NULL); + plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(loader_path, plugin_type)); + g_free(loader_path); fail_if(plugin == NULL); GSignondSessionData* result = NULL; @@ -501,7 +513,9 @@ START_TEST (test_pluginremote_refresh) GSignondConfig* config = gsignond_config_new (); fail_if(config == NULL); - plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(config, plugin_type)); + gchar* loader_path = g_build_filename (g_getenv("SSO_BIN_DIR"), "gsignond-plugind", NULL); + plugin = GSIGNOND_PLUGIN (gsignond_plugin_remote_new(loader_path, plugin_type)); + g_free(loader_path); fail_if(plugin == NULL); GSignondSessionData* result = NULL; @@ -533,25 +547,22 @@ START_TEST (test_plugind_daemon) GSignondPluginDaemon *daemon = NULL; const gchar *plugin_type = "password"; - GSignondConfig* config = gsignond_config_new (); - fail_if(config == NULL); + const gchar *plugin_dir = g_getenv("SSO_GPLUGINS_DIR"); + fail_if (plugin_dir == NULL); - gchar *plugin_path = g_module_build_path (gsignond_config_get_string ( - config, GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR), "nonexisting"); + gchar *plugin_path = g_module_build_path (plugin_dir, "nonexisting"); fail_if (plugin_path == NULL); daemon = gsignond_plugin_daemon_new (plugin_path, "nonexisting", 0, 1); g_free (plugin_path); fail_if (daemon != NULL); - plugin_path = g_module_build_path (gsignond_config_get_string ( - config, GSIGNOND_CONFIG_GENERAL_PLUGINS_DIR), plugin_type); + plugin_path = g_module_build_path (plugin_dir, plugin_type); fail_if (plugin_path == NULL); daemon = gsignond_plugin_daemon_new (plugin_path, plugin_type, 0, 1); g_free (plugin_path); fail_if (daemon == NULL); g_object_unref (daemon); daemon = NULL; - g_object_unref(config); } END_TEST diff --git a/test/valgrind.supp b/test/valgrind.supp index 6155af4..8b01870 100644 --- a/test/valgrind.supp +++ b/test/valgrind.supp @@ -44,6 +44,18 @@ fun:g_type_register_dynamic Memcheck:Leak ... +fun:g_type_register_fundamental +} +{ + +Memcheck:Leak +... +fun:gobject_init_ctor +} +{ + +Memcheck:Leak +... fun:g_type_class_ref } { diff --git a/tools/prepare-tizen.sh b/tools/prepare-tizen.sh index 7c4f4e2..c94ad1c 100755 --- a/tools/prepare-tizen.sh +++ b/tools/prepare-tizen.sh @@ -14,10 +14,11 @@ echo "CURR dir = $currdir" mkdir -p $2 && \ cd $2 && \ -git rm -r * && \ +git rm -r *; rm -rf packaging; tar -xzvf $currdir/$1 -C $2 --strip-components 1 && \ mkdir -p packaging && \ -cd packaging && \ -cp -f ../dists/rpm/gsignond-tizen.spec gsignond.spec && \ -cp -f ../dists/rpm/gsignond-tizen.changes gsignond.changes && \ -cd .. && git add *; +cp -f dists/rpm/gsignond-tizen.spec packaging/gsignond.spec && \ +cp -f dists/rpm/gsignond-tizen.changes packaging/gsignond.changes && \ +cp -f dists/rpm/gsignond-tizen.manifest packaging/gsignond.manifest && \ +cp $currdir/.gitignore $2/ && \ +git add -f *; diff --git a/tools/setup-and-start-daemon.sh b/tools/setup-and-start-daemon.sh index 62dc071..8795cc6 100755 --- a/tools/setup-and-start-daemon.sh +++ b/tools/setup-and-start-daemon.sh @@ -5,7 +5,7 @@ with_gdb=0 if test $# -ge 1 ; then if test "$1" == "--with-duma" ; then with_duma=1 - with_gdb=1 + with_gdb=0 else with_duma=0 if test "$1" == "--with-gdb" ; then @@ -23,13 +23,13 @@ else export SSO_KEYCHAIN_SYSCTX="$SRC_HOME/test/daemon/.libs/daemontest" fi export SSO_BIN_DIR=$SRC_HOME/src/daemon/.libs -export SSO_PLUGINS_DIR=$SRC_HOME/src/plugins/.libs +export SSO_GPLUGINS_DIR=$SRC_HOME/src/plugins/.libs export LD_LIBRARY_PATH="$SRC_HOME/src/daemon/plugins/plugind/.libs:$SRC_HOME/src/daemon/plugins/.libs" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SRC_HOME/src/common/.libs:$SRC_HOME/src/common/db/.libs:$SRC_HOME/src/daemon/.libs:$SRC_HOME/src/daemon/db/.libs:$SRC_HOME/src/daemon/dbus/.libs" export G_MESSAGES_DEBUG="all" # Clean db -rm -rf /tmp/gsignond +#rm -rf /tmp/gsignond echo "--------------------------" echo "with_duma: $with_duma" @@ -40,7 +40,7 @@ if test $with_duma -eq 1 ; then export DUMA_PROTECT_FREE=1 export DUMA_PROTECT_BELOW=1 - LD_PRELOAD="libduma.so" $SRC_HOME/src/daemon/.libs/gsignond & + LD_PRELOAD="libduma.so" $SRC_HOME/src/daemon/.libs/gsignond if test $with_gdb -eq 1 ; then sudo gdb --pid=`pidof gsignond`